Background
Minerva ships various styles that improve templates for mobile-devices and the night mode theme. We want to start using these on Vector 2022.
User story
As an interface admin I want to benefit from styles shipped by the WMF to reduce the amount of work I have to do to maintain my wiki.
Requirements
- A new ResourceLoader module exists in WikimediaMessages.
- The module should be associated with a dynamic module SiteAdminHelperModule.php that is inspired by SkinModule in core and allows site admins to disable style packages via a MediaWiki message. This will be done by the message wikimedia-styles-exclude which by default is empty but accepts a pipe separated list of feature names to disable.
- The initial version should contain all the styles that are currently enabled in Minerva.
- The module can be added to any skin via a configuration flag.
- By default the module is not added to any skin (this allows us to migrate this bit by bit) e.g. mw.loader.getState('ext.wikimediamessages.styles') === 'registered'
QA steps
To be tested by a developer.
- No visual changes expected on Pixel.
- Initially the module should not be loaded by any skins (deployment will come later)
- If I edit MediaWiki:wikimedia-styles-exclude and change it to "theme-night|theme-night-mainpage" it should disable all the styles.
In beta
- Confirm https://en.m.wikipedia.beta.wmflabs.org/w/load.php?modules=ext.wikimediamessages.styles generates a non-empty CSS file and is not loaded on an article page.
In production:
- @Edtadros will confirm https://en.m.wikipedia.org/w/load.php?modules=ext.wikimediamessages.styles generates a non-empty CSS file and is not loaded on an article page and mark as Verified.
Communication criteria - does this need an announcement or discussion?
Not yet.
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T360386#9702676 |
2 | ✅ | T360386#9702676 |