I noticed Jdlrobson poking around on enwiki starting to add support for dark mode in TemplateStyles. (And then fixed some things.) One of the qualities I definitely came to the conclusion though looking at the kinds of changes that need to be made is that the two classes currently indicating dark mode *of some kind* are terribly named for arbitrary users who may come later.
.skin-night-mode-clientpref-1 .skin-night-mode-clientpref-2
My principle concern was the clientpref-n which does not describe whatsoever for arbitrary user what the intent of these client preferences are. Right now, clientpref-1 describes someone who has selected "dark mode" and clientpref-2 describes someone who has selected "let the browser decide based on previous settings". Only by inspecting their uses rather than their names are their uses obvious. And moreover, it would be easy to typo them and drop people into darkness while in the light... or vice versa.
Separately, Jdlrobson noted there was some pain with the naming of night mode, and from my perspective I would definitely be concerned that this naming does not extend 'cleanly' to arbitrary other themes (such as the additional currently extent sepia in the app[s]).
Sequencing
- https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/1012442 will allow us to advertise the new class. Merge before the branch is cut.
- Deployment of config change and Minerva patch to wmf.22 (T359152)
- Update https://www.mediawiki.org/wiki/Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis to advertise new class
- Update Special:MobileOptions to work with both old and new class https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/1012438?usp=search
- Update WikimediaEvents to work with both old and new.
- Switch classes in Minerva https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/1010980?usp=search
- revert https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/1012442 as it is no longer needed.
- Update remaining instances in https://codesearch.wmcloud.org/search/?q=skin-night-mode-clientpref- (including Vector)
Acceptance criteria
- The change should be done in a backwards compatible way
- This should not impact the instrumentation defined in WikimediaEvents.
- The new classes should be:
skin-theme-clientpref-night skin-theme-clientpref-day skin-theme-clientpref-os
- The preferences should be renamed to vector-theme and minerva-theme. We do not need to support the old preference given the "Experimental" nature of this feature. This does mean next week editors will lose their preference and have to reset it.
- The query string ?vectornightmode=1 and ?minervanightmode=1 should continue to work because many people are already relying on this and it would be disruptive to change.
Sign off steps
- Document the new classes on recommendations for night mode compatibility on Wikimedia wikis - MediaWikihttps://www.mediawiki.org/wiki/Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis
- [Jon] Update the on-wiki references to the old classes https://global-search.toolforge.org/?q=skin-night-mode-clientpref-1®ex=1&namespaces=&title=