Do not load main menu icons in critical path

The icons for the main menu are not needing for the first render,
they have thus always been loaded via JS. While this means the
menu icons do not load for non-JS users, Special:MobileMenu fulfils
that purpose. With AMC we'll need to reconsider this approach
but the 1.8kb added by this module is not acceptable.

Bug: T227929
Change-Id: Ic6a2490fbd3903c5d34ff8267d745fdd93c73fd2
This commit is contained in:
jdlrobson 2019-07-16 09:58:51 -07:00 committed by Jdlrobson
parent 4e2458aeba
commit 502ab6051e
1 changed files with 4 additions and 1 deletions

View File

@ -926,7 +926,6 @@ class SkinMinerva extends SkinTemplate {
'mediawiki.ui.icon',
'mediawiki.ui.button',
'skins.minerva.icons.images',
'skins.minerva.mainMenu.icons',
];
if ( $title->isMainPage() ) {
$styles[] = 'skins.minerva.mainPage.styles';
@ -943,6 +942,10 @@ class SkinMinerva extends SkinTemplate {
$styles[] = 'skins.minerva.amc.styles';
$styles[] = 'wikimedia.ui';
}
if ( $this->skinOptions->get( SkinOptions::OPTION_OVERFLOW_SUBMENU ) ) {
// ToolbarBuilder is reusing the Contributions icon in toolbar @see T224735
$styles[] = 'skins.minerva.mainMenu.icons';
}
return $styles;
}