mediawiki-skins-Insurgency/skin.json
jdlrobson c1ca90ce4b Reduce ResourceLoader modules used by Monobook
MonoBook supports two modes - one that is responsive and one that
is not. To do this it adds 3 modules. These can be reduced to 1
module by loading all the code and adding client side checks to
determine whether to use it.

The skin--responsive class is added by core for responsive skins so
can be used to make that check.

This does lead to additional download for all users (particularly
the addition of oojs-ui.styles.icons-alerts) but given the default
behaviour is to load these, and non-responsive skin requires an opt
in I don't see this as a problem.

Thanks to gzip the increase in render blocking styles is minimal:

Before:
skins.monobook.styles: 15.21KB
skins.monobook.responsive: 16.14KB

After:
skins.monobook.styles: 16.63KB

See bug for QA plan.

Bug: T285492
Change-Id: I76bb644145539c8ec0220704c8fe9a78a4819c03
2021-08-03 12:45:59 -07:00

102 lines
2.4 KiB
JSON

{
"name": "MonoBook",
"author": [
"Gabriel Wicke",
"Isarra Yos",
"..."
],
"url": "https://www.mediawiki.org/wiki/Skin:MonoBook",
"descriptionmsg": "monobook-desc",
"namemsg": "skinname-monobook",
"license-name": "GPL-2.0-or-later",
"type": "skin",
"requires": {
"MediaWiki": ">= 1.36.0"
},
"ValidSkinNames": {
"monobook": {
"class": "SkinTemplate",
"args": [
{
"name": "monobook",
"scripts": [ "skins.monobook.scripts" ],
"styles": [ "skins.monobook.styles" ],
"responsive": true,
"template": "MonoBook\\MonoBookTemplate"
}
]
}
},
"SkinOOUIThemes": {
"monobook": "Apex"
},
"SkinLessImportPaths": {
"monobook": "resources/mediawiki.less"
},
"Hooks": {
"OutputPageBodyAttributes": "MonoBook\\Hooks::onOutputPageBodyAttributes"
},
"MessagesDirs": {
"MonoBook": [
"i18n"
]
},
"ResourceModules": {
"skins.monobook.styles": {
"class": "ResourceLoaderSkinModule",
"features": {
"normalize": true,
"elements": true,
"logo": true,
"content": true,
"content-links": true,
"content-thumbnails": true,
"content-tables": true,
"interface": true,
"interface-message-box": true,
"interface-category": true,
"i18n-ordered-lists": true,
"i18n-all-lists-margins": true,
"i18n-headings": true
},
"styles": [
"resources/skin.less",
"resources/skin-responsive.less"
]
},
"skins.monobook.scripts": {
"targets": [ "desktop", "mobile" ],
"packageFiles": [
"resources/skin.js",
"resources/mobile-uls.js",
"resources/mobile-echo.js"
],
"styles": "resources/skin.js.less",
"dependencies": [
"oojs-ui.styles.icons-alerts",
"mediawiki.util"
],
"messages": [
"monobook-notifications-link",
"monobook-notifications-link-none"
]
}
},
"ResourceFileModulePaths": {
"localBasePath": "",
"remoteSkinPath": "MonoBook"
},
"ResourceModuleSkinStyles": {
"monobook": {
"+mediawiki.action.view.redirectPage": "resources/skinStyles/mediawiki.action.view.redirectPage.css",
"+mediawiki.notification": "resources/skinStyles/mediawiki.notification.less",
"+oojs-ui-core.styles": "resources/skinStyles/ooui.less",
"+ext.uls.interface": "resources/skinStyles/ext.uls.interface.less",
"+ext.relatedArticles.readMore": "resources/skinStyles/ext.relatedArticles.readMore.less"
}
},
"AutoloadNamespaces": {
"MonoBook\\": "includes/"
},
"manifest_version": 2
}