diff --git a/bundlesize.config.json b/bundlesize.config.json index cc6675a8d..6e1284e87 100644 --- a/bundlesize.config.json +++ b/bundlesize.config.json @@ -21,7 +21,7 @@ }, { "resourceModule": "skins.minerva.mainMenu.styles", - "maxSize": "1.0KB" + "maxSize": "1.1KB" }, { "resourceModule": "skins.minerva.scripts", diff --git a/skin.json b/skin.json index 1cf4aefdc..cb279f589 100644 --- a/skin.json +++ b/skin.json @@ -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" ] diff --git a/tests/phpunit/skins/SkinMinervaTest.php b/tests/phpunit/skins/SkinMinervaTest.php index accb158e8..86daf99f0 100644 --- a/tests/phpunit/skins/SkinMinervaTest.php +++ b/tests/phpunit/skins/SkinMinervaTest.php @@ -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