Page MenuHomePhabricator

Rename the skin night mode classes to something more sensible before they become widely used
Closed, ResolvedPublic3 Estimated Story Points

Description

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

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

Details

Other Assignee
SToyofuku-WMF
SubjectRepoBranchLines +/-
operations/mediawiki-configmaster+4 -4
mediawiki/skins/Vectormaster+40 -18
mediawiki/extensions/MobileFrontendmaster+3 -3
mediawiki/skins/MinervaNeuemaster+0 -23
mediawiki/extensions/DarkModemaster+11 -11
mediawiki/extensions/MobileFrontendmaster+2 -2
mediawiki/coremaster+2 -2
mediawiki/extensions/WikimediaEventsmaster+15 -1
mediawiki/extensions/Popupsmaster+2 -2
mediawiki/extensions/WikimediaEventsmaster+18 -1
mediawiki/skins/MinervaNeuemaster+59 -39
mediawiki/skins/MinervaNeuemaster+23 -0
mediawiki/extensions/MobileFrontendmaster+5 -0
mediawiki/skins/MinervaNeuewmf/1.42.0-wmf.22+23 -0
mediawiki/extensions/MobileFrontendmaster+24 -12
mediawiki/skins/Vectormaster+10 -0
mediawiki/skins/MinervaNeuemaster+39 -36
Show related patches Customize query in gerrit

Related Objects

StatusSubtypeAssignedTask
Resolvedovasileva
Resolvedovasileva
Resolvedovasileva
ResolvedJdlrobson
Resolvedovasileva
Resolvedovasileva
ResolvedJScherer-WMF
Resolvedovasileva
ResolvedSpikeSToyofuku-WMF
Resolvedovasileva
ResolvedJdrewniak
ResolvedJScherer-WMF
Resolvedovasileva
ResolvedJdlrobson
Resolvedovasileva
ResolvedVolker_E
Resolvedovasileva
Resolvedovasileva
Resolvedovasileva
Resolvedovasileva
Resolvedovasileva
ResolvedFeatureNone
OpenNone
Resolvedovasileva
Resolvedovasileva
Resolvedovasileva
Resolvedovasileva
ResolvedJdlrobson

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson updated the task description. (Show Details)

@Lofhi per sign off step we will be updating any classes currently in use on behalf of editors.

Change 1010980 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/MinervaNeue@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1010980

Change 1011308 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/extensions/MobileFrontend@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1011308

Change 1010981 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/extensions/Popups@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1010981

Change 1010982 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/extensions/WikimediaEvents@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1010982

Change 1010983 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/Vector@master] [future work] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1010983

Change 1011428 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/core@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1011428

Change 1011441 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/MinervaNeue@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1011441

Change 1011441 abandoned by Mabualruz:

[mediawiki/skins/MinervaNeue@master] Rename the skin night mode classes to more readable classes

Reason:

Wrong Change ID

https://gerrit.wikimedia.org/r/1011441

Change 1012437 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Prepare for class rename

https://gerrit.wikimedia.org/r/1012437

Change 1012438 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] Switch to new HTML class

https://gerrit.wikimedia.org/r/1012438

Change 1012442 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] The new class should be present alongside the old class for all page views

https://gerrit.wikimedia.org/r/1012442

Change 1012437 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Prepare for class and preference rename

https://gerrit.wikimedia.org/r/1012437

Change 1011457 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@wmf/1.42.0-wmf.22] The new class should be present alongside the old class for all page views

https://gerrit.wikimedia.org/r/1011457

Change 1012442 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] The new class should be present alongside the old class for all page views

https://gerrit.wikimedia.org/r/1012442

SToyofuku-WMF added a subscriber: Mabualruz.

Picking up this ticket as Mo is out sick today - we'll meet to discuss when he's back

Change 1012438 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Switch to new HTML class and prepare for preference key change

https://gerrit.wikimedia.org/r/1012438

Change 1012742 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/extensions/WikimediaEvents@master] Make sure logging works with new and old night mode client prefs

https://gerrit.wikimedia.org/r/1012742

Change 1012747 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/extensions/MobileFrontend@master] Add back legacy night mode client pref labels

https://gerrit.wikimedia.org/r/1012747

Change 1011457 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@wmf/1.42.0-wmf.22] The new class should be present alongside the old class for all page views

https://gerrit.wikimedia.org/r/1011457

Mentioned in SAL (#wikimedia-operations) [2024-03-19T20:23:49Z] <jdrewniak@deploy2002> Started scap: Backport for [[gerrit:1011457|The new class should be present alongside the old class for all page views (T359983)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-19T20:26:11Z] <jdrewniak@deploy2002> jdrewniak and jdlrobson: Backport for [[gerrit:1011457|The new class should be present alongside the old class for all page views (T359983)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-19T20:39:00Z] <jdrewniak@deploy2002> Finished scap: Backport for [[gerrit:1011457|The new class should be present alongside the old class for all page views (T359983)]] (duration: 15m 11s)

Change 1012747 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Add back legacy night mode client pref labels

https://gerrit.wikimedia.org/r/1012747

Change 1012769 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Revert "The new class should be present alongside the old class for all page views"

https://gerrit.wikimedia.org/r/1012769

Change 1010980 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1010980

Change 1012742 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Make sure logging works with new and old night mode client prefs

https://gerrit.wikimedia.org/r/1012742

Change 1011428 merged by jenkins-bot:

[mediawiki/core@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1011428

Change 1010981 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1010981

Change 1010982 abandoned by Jdlrobson:

[mediawiki/extensions/WikimediaEvents@master] Rename the skin night mode classes to more readable classes

Reason:

Near identical patch done in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/1012742/1/modules/ext.wikimediaEvents/webAccessibilitySettings.js.

Sorry for missing this Mo!

https://gerrit.wikimedia.org/r/1010982

Jdlrobson updated the task description. (Show Details)

Hey @Mabualruz @SToyofuku-WMF and I made some progress on this task today.

When you are back could you work on the following:

I think with that done and merged we can move this into QA.

Hope you have a good Wednesday AM!

Change 1011308 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1011308

Change 1012653 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/extensions/DarkMode@master] Dark Mode - Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1012653

Change 1012989 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[operations/mediawiki-config@master] MW Config - Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1012989

Done

  • Create a patch for Extension:DarkMode

Done

Is already merged. Do you want to review/merge the revert?

Change 1012653 merged by jenkins-bot:

[mediawiki/extensions/DarkMode@master] Dark Mode - Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1012653

Change 1012769 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Revert "The new class should be present alongside the old class for all page views"

https://gerrit.wikimedia.org/r/1012769

Change 1013115 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/extensions/MobileFrontend@master] Mobile Front end update message keys for skin theme

https://gerrit.wikimedia.org/r/1013115

Change 1013115 abandoned by Mabualruz:

[mediawiki/extensions/MobileFrontend@master] Mobile Front end update message keys for skin theme

Reason:

Will handle that from Vector messages, then will do a full cleanup for the old messages

https://gerrit.wikimedia.org/r/1013115

Change 1010983 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Vector - Rename the skin night mode classes to more readable classes

https://gerrit.wikimedia.org/r/1010983

Change #1012989 abandoned by Mabualruz:

[operations/mediawiki-config@master] MW Config - Rename the skin night mode classes to more readable classes

Reason:

Not necessary to change these files - they are just static snapshots.

https://gerrit.wikimedia.org/r/1012989

Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Verified.