Page MenuHomePhabricator

Set up feature flag for night mode on mobile
Closed, ResolvedPublic3 Estimated Story Points

Description

Background & User story

Why are we doing this ticket?

  • This ticket will be used to set up the feature flag for night mode on mobile (Minerva skin). The feature flag will help us and other teams with testing the feature in a production environment

How does it connect to our overall plans? What goal does it link to?

  • See task tree

What previous/central documentation exists?

User Stories

As a WMF or community member, I would like the ability to test the current version of night mode on mobile so that it's easier for me to report and fix issues

Requirements

  • Set up a feature flag with url parameter on the Minerva skin
  • Enabling the feature flag will add the night mode option menu
    New settings logged in.png (1×360 px, 63 KB)
    (See T349210: Refine typography settings interface on mobile for details)
  • The night mode setting will have 3 options
  • Selecting night mode will turn night mode on

Acceptance criteria

  • All product and design requirements above must be complete
  • The dark mode can be enabled via a ?minervadarkmode=1 parameter.

Developer checklist

Complete before passing to QA:

  • When the feature flag is disabled, the class skin-darkmode-0 is NOT present on the HTML element.
  • When the feature flag is enabled, but the user has opted out of night mode, the class skin-darkmode-0 should be present on the HTML element.
  • When the feature flag is enabled, but the user has opted into night mode, the class skin-darkmode-1 should be present on the HTML element.
  • When the feature flag is enabled, and the user has opted into "automatic" mode, the class skin-darkmode-2 should be present on the HTML element.
  • The feature flag should be associated with a user preference

QA steps

Further QA is covered by steps in T350170 and T355065.

Signoff criteria

  • Create task to register the option in the MobileOptions page.

https://phabricator.wikimedia.org/T355118#9514007

QA Results - Beta

ACStatusDetails
1T355118#9514007
2T355118#9514007
3T355118#9514007

QA Results - Beta

QA Results - Prod

Event Timeline

ovasileva updated the task description. (Show Details)
Jdlrobson renamed this task from Set up feature flag and menu for night mode on mobile to Set up feature flag for night mode on mobile.Jan 18 2024, 6:22 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson set the point value for this task to 3.

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

[mediawiki/skins/MinervaNeue@master] Add feature flag for night mode

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

Change 994346 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Add feature flag for night mode

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

This is Steph's first priority today. @Mabualruz will help Steph out after this meeting.

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

[mediawiki/skins/MinervaNeue@master] Set up user option for night mode

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

Change 995114 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Set up user option for night mode

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

@SToyofuku-WMF could you run through the developer checklist in the description? Thanks in advance!

Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

In production and the beta cluster with the feature flag disabled there should be no change to the color scheme of Minerva (mobile)
✅ AC1: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=0 night mode should be off

screenshot 421.png (1×749 px, 48 KB)

✅ AC2: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=1 night mode should be forced on

screenshot 422.png (1×741 px, 46 KB)

✅ AC3: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=2 night mode should correspond with whatever is enabled at your operating system level.

screenshot 425.png (599×741 px, 77 KB)

screenshot 424.png (608×745 px, 79 KB)

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

[mediawiki/skins/MinervaNeue@master] Query params can set night mode value

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

Change 997599 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Query params can set night mode value

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: In production and the beta cluster with the feature flag disabled there should be no change to the color scheme of Minerva (mobile)
See below
✅ AC2: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=0 night mode should be off with operating system set to light mode

screenshot 456.png (991×1 px, 198 KB)

✅ AC3: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=0 night mode should be off with operating system set to night mode
screenshot 457.png (991×1 px, 180 KB)

✅ AC4: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=1 night mode with operating system OFF it should be forced on
screenshot 458.png (986×1 px, 195 KB)

✅ AC5: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=1 night mode with operating system ON i should be forced on
screenshot 459.png (972×1 px, 174 KB)

✅ AC6: When you visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MobileOptions&returnto=T352930&minervanightmode=2 night mode should correspond with whatever is enabled at your operating system level.
screenshot 461.png (976×1 px, 192 KB)

screenshot 460.png (978×1 px, 180 KB)

Looks great! Dev checklist needs to be checked off before resolving.

ovasileva claimed this task.

Thanks @SToyofuku-WMF, all done and resolving!

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: In production and the beta cluster with the feature flag disabled there should be no change to the color scheme of Minerva (mobile)

screenshot 506.png (934×432 px, 243 KB)

✅ AC2: When you visit https://en.m.wikipedia.org/w/index.php?title=Special:MobileOptions&minervanightmode=0 night mode should be off with operating system set to light mode
screenshot 507.png (945×934 px, 120 KB)

✅ AC3: When you visit https://en.m.wikipedia.org/w/index.php?title=Special:MobileOptions&minervanightmode=0 night mode should be off with operating system set to night mode
screenshot 508.png (952×932 px, 123 KB)

✅ AC4: When you visit https://en.m.wikipedia.org/w/index.php?title=Special:MobileOptions&minervanightmode=1 night mode with operating system OFF it should be forced on
screenshot 509.png (958×935 px, 128 KB)

✅ AC5: When you visit https://en.m.wikipedia.org/w/index.php?title=Special:MobileOptions&minervanightmode=1 night mode with operating system ON i should be forced on
screenshot 510.png (951×935 px, 126 KB)

✅ AC6: When you visit https://en.m.wikipedia.org/w/index.php?title=Special:MobileOptions&minervanightmode=2 night mode should correspond with whatever is enabled at your operating system level.
screenshot 253.mov.gif (1×1 px, 527 KB)