mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Merge "Remove .mw-ui-button styles from user-links overflow menu"
This commit is contained in:
commit
310bf970bd
|
@ -290,7 +290,8 @@ class Hooks implements
|
|||
if ( isset( $content_navigation['user-page']['userpage'] ) ) {
|
||||
$content_navigation[$overflow]['userpage'] = array_merge(
|
||||
$content_navigation['user-page']['userpage'], [
|
||||
'button' => true,
|
||||
// T312157: Style the userpage link as a blue link rather than a quiet button.
|
||||
'button' => false,
|
||||
'collapsible' => true,
|
||||
// Remove icon
|
||||
'icon' => '',
|
||||
|
@ -320,7 +321,8 @@ class Hooks implements
|
|||
$content_navigation[$overflow]['createaccount'] = array_merge(
|
||||
$content_navigation['user-menu']['createaccount'], [
|
||||
'id' => 'pt-createaccount-2',
|
||||
'button' => true,
|
||||
// T312157: Style the userpage link as a blue link rather than a quiet button.
|
||||
'button' => false,
|
||||
'collapsible' => true,
|
||||
// Remove icon
|
||||
'icon' => '',
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
@import '../../common/variables.less';
|
||||
@import '../../common/mixins.less';
|
||||
@import 'mediawiki.mixins.less';
|
||||
@import 'mediawiki.ui/variables.less';
|
||||
|
||||
@font-size-user-links: unit( 14 / @font-size-browser, em ); // Equals `0.875em`.
|
||||
// Applies to links in the overflow menu that do not have the .mw-ui-button class.
|
||||
@overflow-link-margin: 0 8px;
|
||||
|
||||
/**
|
||||
* Container that holds both the horizontal menu and dropdown menus.
|
||||
|
@ -57,6 +60,11 @@
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
// Add margin to links that don't have the .mw-ui-button or related icon classes.
|
||||
a:not( .mw-ui-button ):not( .mw-echo-notifications-badge ) {
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.user-links-collapsible-item {
|
||||
@media ( max-width: @max-width-mobile ) {
|
||||
display: none;
|
||||
|
@ -108,10 +116,15 @@
|
|||
border-top: @border-width-base @border-style-base @colorGray14;
|
||||
}
|
||||
|
||||
//User-page link in personal (dropdown) menu.
|
||||
//User-page link in personal (overflow) menu.
|
||||
#pt-userpage-2 {
|
||||
max-width: unit( 155 / @font-size-browser / @font-size-user-links, em );
|
||||
|
||||
a {
|
||||
// T312157 Override redlink (.new) color for non-existant userpage
|
||||
color: @color-primary;
|
||||
}
|
||||
|
||||
span {
|
||||
.text-overflow( @visible: false );
|
||||
}
|
||||
|
|
|
@ -451,11 +451,6 @@ class VectorHooksTest extends MediaWikiIntegrationTestCase {
|
|||
$this->assertFalse( isset( $contentNav['user-page']['login'] ),
|
||||
'updateUserLinksDropdownItems is called when not legacy'
|
||||
);
|
||||
$this->assertContains( 'mw-ui-button',
|
||||
$contentNav['vector-user-menu-overflow']['userpage']['link-class'],
|
||||
'updateUserLinksOverflowItems is called when not legacy'
|
||||
);
|
||||
|
||||
Hooks::onSkinTemplateNavigation( $vectorLegacySkin, $contentNavLegacy );
|
||||
$this->assertFalse( isset( $contentNavLegacy['user-page'] ),
|
||||
'user-page is unset for legacy vector'
|
||||
|
@ -564,14 +559,6 @@ class VectorHooksTest extends MediaWikiIntegrationTestCase {
|
|||
$content['vector-user-menu-overflow']['userpage']['class'],
|
||||
'User page link in user links overflow requires collapsible class'
|
||||
);
|
||||
$this->assertContains( 'mw-ui-button',
|
||||
$content['vector-user-menu-overflow']['userpage']['link-class'],
|
||||
'User page link in user links overflow requires button classes'
|
||||
);
|
||||
$this->assertContains( 'mw-ui-quiet',
|
||||
$content['vector-user-menu-overflow']['userpage']['link-class'],
|
||||
'User page link in user links overflow requires quiet button classes'
|
||||
);
|
||||
$this->assertNotContains( 'mw-ui-icon',
|
||||
$content['vector-user-menu-overflow']['userpage']['class'],
|
||||
'User page link in user links overflow does not have icon classes'
|
||||
|
|
Loading…
Reference in a new issue