Drop message box styling modules from page load

The skins.minerva.messageBox.styles module is loaded on pages with
old revisions, but this message box is already being styled by another
module added by core.

Skins are not responsible for styling Codex. This is the responsibility
of the code that adds the message box to the page.

In addition to this we were loading another set of styles for message boxes
on skins.minerva.codex.styles

Bug: T375287
Change-Id: I0cf5dc6baf2e447b4944f04365addd614d59cfbe
This commit is contained in:
Jon Robson 2024-11-07 09:29:11 -08:00
parent d2be5ce88f
commit e76d536733
2 changed files with 1 additions and 21 deletions

View file

@ -1077,16 +1077,6 @@ class SkinMinerva extends SkinMustache {
$requestAction = $this->getActionName();
$viewAction = $requestAction === 'view';
// Warning box styles are needed when reviewing old revisions
// and inside the fallback editor styles to action=edit page.
if (
$title->getNamespace() !== NS_MAIN ||
$request->getCheck( 'oldid' ) ||
!$viewAction
) {
$styles[] = 'skins.minerva.messageBox.styles';
}
if ( $title->isMainPage() ) {
$styles[] = 'skins.minerva.mainPage.styles';
} elseif ( $this->skinUserPageHelper->isUserPage() ) {

View file

@ -489,7 +489,6 @@
"skins.minerva.mainMenu.icons",
"skins.minerva.mainMenu.styles",
"mediawiki.cookie",
"skins.minerva.messageBox.styles",
"mediawiki.util",
"mediawiki.router",
"mediawiki.Title",
@ -560,13 +559,6 @@
"watchstar.js"
]
},
"skins.minerva.messageBox.styles": {
"class": "MediaWiki\\ResourceLoader\\CodexModule",
"codexStyleOnly": true,
"codexComponents": [
"CdxMessage"
]
},
"skins.minerva.categories.styles": {
"class": "MediaWiki\\ResourceLoader\\SkinModule",
"features": [
@ -577,8 +569,7 @@
"class": "MediaWiki\\ResourceLoader\\CodexModule",
"codexStyleOnly": true,
"codexComponents": [
"CdxButton",
"CdxMessage"
"CdxButton"
]
}
},
@ -587,7 +578,6 @@
"remoteSkinPath": "MinervaNeue/tests/qunit/skins.minerva.scripts",
"dependencies": [
"mediawiki.cookie",
"skins.minerva.messageBox.styles",
"skins.minerva.scripts",
"mobile.startup",
"mediawiki.user",