Create new skins.minerva.styles module

This merges the existing modules skins.minerva.base.styles
and skins.minerva.mainMenu.styles into a new module
skins.minerva.styles which is named consistently with
Vector's style module.

The old modules will be kept for caching reasons
for at least one, and possibly two deploy cycles,
after which we will continue this task.

Additional change:
* drop .minerva-icon--{name}-base20 and .minerva-icon--{name}-disabled variants
since these are no longer utilized and only serve cached HTML

Bug: T266361
Change-Id: Iccf415a22e9535603befae25b8cea467f9905437
This commit is contained in:
lmora 2024-11-06 17:34:58 -06:00 committed by Jdlrobson
parent c5b6709e8f
commit ee47c3d0bb
3 changed files with 39 additions and 5 deletions

View file

@ -21,7 +21,7 @@
},
{
"resourceModule": "skins.minerva.mainMenu.styles",
"maxSize": "1.0KB"
"maxSize": "1.1KB"
},
{
"resourceModule": "skins.minerva.scripts",

View file

@ -141,13 +141,12 @@
"skins.minerva.scripts"
],
"styles": [
"skins.minerva.base.styles",
"skins.minerva.styles",
"skins.minerva.content.styles.images",
"mediawiki.hlist",
"skins.minerva.codex.styles",
"skins.minerva.icons.wikimedia",
"skins.minerva.mainMenu.icons",
"skins.minerva.mainMenu.styles"
"skins.minerva.mainMenu.icons"
],
"messages": [
"variants",
@ -323,7 +322,24 @@
}
},
"ResourceModules": {
"skins.minerva.styles": {
"class": "MediaWiki\\ResourceLoader\\SkinModule",
"features": [
"normalize",
"accessibility",
"i18n-ordered-lists",
"content-body",
"content-tables",
"interface-core"
],
"styles": [
"resources/skins.minerva.base.styles/CSSCustomProperties.less",
"resources/skins.minerva.base.styles/skin.less",
"resources/skins.minerva.mainMenu.styles/index.less"
]
},
"skins.minerva.base.styles": {
"deprecated": "Retained for caching reasons. Please use skins.minerva.styles instead.",
"class": "MediaWiki\\ResourceLoader\\SkinModule",
"features": [
"normalize",
@ -397,7 +413,7 @@
]
},
"skins.minerva.icons.wikimedia": {
"selectorWithoutVariant": ".minerva-icon--{name}-base20, .minerva-icon--{name}-disabled, .minerva-icon--{name}",
"selectorWithoutVariant": ".minerva-icon--{name}",
"useDataURI": false,
"defaultColor": "#54595d",
"class": "MediaWiki\\ResourceLoader\\OOUIIconPackModule",
@ -473,6 +489,7 @@
]
},
"skins.minerva.mainMenu.styles": {
"deprecated": "Retained for caching reasons. Please use skins.minerva.styles instead.",
"styles": [
"resources/skins.minerva.mainMenu.styles/index.less"
]

View file

@ -99,6 +99,23 @@ class SkinMinervaTest extends MediaWikiIntegrationTestCase {
];
}
/**
* @covers ::getDefaultModules
*/
public function testGetDefaultModules() {
$context = new RequestContext();
$context->setTitle( Title::makeTitle( 0, 'Hello' ) );
$context->setActionName( 'view' );
$skinFactory = $this->getServiceContainer()->getSkinFactory();
$skin = $skinFactory->makeSkin( 'minerva' );
$skin->setContext( $context );
$this->assertContains( 'skins.minerva.styles', $skin->getDefaultModules()['styles']['skin'],
'Check entry point' );
}
/**
* @dataProvider provideHasPageTabs
* @covers ::hasPageTabs