mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-15 03:34:25 +00:00
Merge "Fixes orange bar of doom (echo alert)"
This commit is contained in:
commit
d2f6813b1b
|
@ -179,10 +179,14 @@ class VectorComponentUserLinks implements VectorComponent {
|
|||
*
|
||||
* @param array $arrayListItems
|
||||
* @param bool $iconOnlyButton whether label should be visible.
|
||||
* @param array $exceptions list of names of items that should not be converted.
|
||||
* @return array
|
||||
*/
|
||||
private static function makeLinksButtons( $arrayListItems, $iconOnlyButton = true ) {
|
||||
return array_map( static function ( $item ) use ( $iconOnlyButton ) {
|
||||
private static function makeLinksButtons( $arrayListItems, $iconOnlyButton = true, $exceptions = [] ) {
|
||||
return array_map( static function ( $item ) use ( $iconOnlyButton, $exceptions ) {
|
||||
if ( in_array( $item[ 'name'], $exceptions ) ) {
|
||||
return $item;
|
||||
}
|
||||
$item['array-links'] = array_map( static function ( $link ) use ( $iconOnlyButton ) {
|
||||
$link['array-attributes'] = array_map( static function ( $attribute ) use ( $iconOnlyButton ) {
|
||||
if ( $attribute['key'] === 'class' ) {
|
||||
|
@ -247,7 +251,9 @@ class VectorComponentUserLinks implements VectorComponent {
|
|||
$this->stripIcons( $portletData[ 'data-user-page' ]['array-items'] ?? [] )
|
||||
);
|
||||
$notifications = $this->makeLinksButtons(
|
||||
$portletData[ 'data-notifications' ]['array-items'] ?? []
|
||||
$portletData[ 'data-notifications' ]['array-items'] ?? [],
|
||||
true,
|
||||
[ 'talk-alert' ]
|
||||
);
|
||||
|
||||
$overflow = $this->makeItemsCollapsible(
|
||||
|
|
|
@ -10,20 +10,16 @@
|
|||
}
|
||||
|
||||
.vector-user-links {
|
||||
.vector-menu-content-list {
|
||||
.mw-echo-alert {
|
||||
padding: 0.2em 0.5em;
|
||||
white-space: nowrap;
|
||||
// Prevent alert message from pushing user links off screen
|
||||
max-width: 270px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.mw-echo-alert {
|
||||
padding: 0.2em 0.5em;
|
||||
white-space: nowrap;
|
||||
// Prevent alert message from pushing user links off screen
|
||||
max-width: 270px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@media ( max-width: @max-width-breakpoint-desktop ) {
|
||||
.mw-echo-alert {
|
||||
.echo-alert-collapse();
|
||||
}
|
||||
.echo-alert-collapse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue