On special page do not show empty more menu to low resolutions

This is a follow up to I34ace0aeb3e23d8f6a8c5a8680bb492f37e343ad
On Special:Userlogin a "more" menu appears that's visible but empty
that should not

 Bug: T306229
Change-Id: I9384b3015de9991db41bde8ccc8f404ac533f198
This commit is contained in:
Jon Robson 2022-04-29 11:16:08 -07:00 committed by Jdlrobson
parent 235c0872a6
commit a1e5fd5fcc
2 changed files with 9 additions and 2 deletions

View File

@ -128,6 +128,11 @@ class SkinVector22 extends SkinVector {
$portlets = $data['data-portlets'];
$actions = $portlets['data-actions'];
$overflow = $portlets['data-views-overflow'];
// if the views overflow menu is not empty, then signal that the more menu despite
// being initially empty now has collapsible items.
if ( !$overflow['is-empty'] ) {
$data['data-portlets']['data-actions']['class'] .= ' vector-has-collapsible-items';
}
$data['data-portlets']['data-actions']['html-items'] = $overflow['html-items'] . $actions['html-items'];
return $data;
}

View File

@ -5,7 +5,9 @@
display: none;
@media ( min-width: @width-breakpoint-tablet ) {
display: block;
&:not( .emptyPortlet ) {
display: block;
}
}
}
@ -18,7 +20,7 @@
}
// Make sure pcactions is displayed (even if .emptyPortlet present)
.mw-portlet-cactions {
.vector-has-collapsible-items {
@media ( max-width: @width-breakpoint-tablet ) {
display: block;
}