Page MenuHomePhabricator

Exclude non-functional pages from night mode
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

User story

  • As a reader, I want each page I visit on the site to be accessible so that I can read and navigate without concern

Requirements

  • The following pages/namespaces must appear in night mode when the setting is turned on:
  • Article namespace
  • Main page
  • Settings page

All other pages will appear in day mode.

  • All action pages (e.g. history) should appear in day mode
  • All diff pages should appear in day mode
  • Mobile settings page (Special:MobileOptions) should appear in day mode

Requirements V2

Requirement:
Implement Night Mode in the Wikipedia Minerva and Vector 2022 skins with specific display settings for certain pages and namespaces to enhance the user experience by providing a consistent and expected visual theme across the platform.

Specifications:

  • Night Mode Enabled Pages:
    • Article namespace
    • Main page
    • Settings page
  • Day Mode Exclusive Pages:
    • All core action pages:
      • delete
      • edit
      • history
      • protect
      • purge
      • render
      • submit
      • unprotect
      • view
    • History diff pages

BDD

Feature: Night Mode Implementation for Wikipedia Pages in Minerva and Vector 2022 Skins

  Background:
    Given the user has selected either the Minerva or Vector 2022 skin on Wikipedia

  Scenario: Display Article namespace in Night Mode
    When the user navigates to any page within the Article namespace
    Then the page should be displayed in Night Mode

  Scenario: Display Main page in Night Mode
    When the user navigates to the Main page
    Then the Main page should be displayed in Night Mode

  Scenario: Display Settings page in Night Mode
    When the user navigates to the Settings page
    Then the Settings page should be displayed in Night Mode

  Scenario: Display Action pages in Day Mode
    Given the user is in Night Mode
    When the user navigates to an action page
    Then the page should be displayed in Day Mode
    And the action pages include, but are not limited to: 
      - delete
      - edit
      - history
      - protect
      - purge
      - render
      - submit
      - unprotect
      - view
    Note: For a complete list of action pages, refer to the array of actions at https://www.mediawiki.org/wiki/Manual:$wgActions#Default_value

  Scenario: Display History diff pages in Day Mode
    Given the user is in Night Mode
    When the user views a History diff page
    Then the History diff page should be displayed in Day Mode

Test Steps:

  1. Select Skin and Enable Night Mode:
    • Navigate to Wikipedia and log in if necessary.
    • Access user preferences and select either the Minerva or Vector 2022 skin.
    • Enable Night Mode from the appearance settings or via the available toggle.
  1. Verify Night Mode on Article Namespace:
    • Navigate to any article page.
    • Confirm the page is displayed in Night Mode.
  1. Verify Night Mode on Main Page:
    • Navigate to Wikipedia's Main page.
    • Confirm the Main page is displayed in Night Mode.
  1. Verify Night Mode on Settings Page:
    • Navigate to the Settings page.
    • Confirm the Settings page is displayed in Night Mode.
  1. Verify Day Mode on Action Pages:
    • Navigate to an article and perform the following actions, confirming each page is displayed in Day Mode:
      • delete
      • edit
      • history
      • protect
      • purge
      • render
      • submit
      • unprotect
      • view
  1. Verify Day Mode on History Diff Pages:
    • Navigate to the History section of any article and select a diff view.
    • Confirm the diff page is displayed in Day Mode.

Acceptance criteria

  • Exclude pages from appearing in night mode as per the requirements
  • Deploy Monday, March 11 via a backport

Communication criteria - does this need an announcement or discussion?

  • Document fixes necessary for pages to be included

QA Results - Prod

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 1009790 merged by jenkins-bot:

[operations/mediawiki-config@master] Exclude non-functional pages from night mode

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

Mentioned in SAL (#wikimedia-operations) [2024-03-11T07:44:28Z] <kharlan@deploy2002> Started scap: Backport for [[gerrit:1009790|Exclude non-functional pages from night mode (T359183)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-11T07:56:30Z] <kharlan@deploy2002> kharlan and jdlrobson: Backport for [[gerrit:1009790|Exclude non-functional pages from night mode (T359183)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-11T09:35:45Z] <kharlan@deploy2002> Started scap: Backport for [[gerrit:1009790|Exclude non-functional pages from night mode (T359183)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-11T09:38:00Z] <kharlan@deploy2002> jdlrobson and kharlan: Backport for [[gerrit:1009790|Exclude non-functional pages from night mode (T359183)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-11T09:52:28Z] <kharlan@deploy2002> Finished scap: Backport for [[gerrit:1009790|Exclude non-functional pages from night mode (T359183)]] (duration: 16m 42s)

Unblocked and deployed by @kostajh Thanks a lot

@Mabualruz - this needs to go through QA prior to signoff. @Edtadros could you take a look? I'm testing on testwiki right now and pages are appearing in night mode for me (for example, special pages, history, etc)

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

[operations/mediawiki-config@master] Disable special pages on a per name basis

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

Change 1010286 merged by jenkins-bot:

[operations/mediawiki-config@master] Disable special pages on a per name basis

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

Mentioned in SAL (#wikimedia-operations) [2024-03-11T20:04:23Z] <urbanecm@deploy2002> Started scap: Backport for [[gerrit:1010286|Disable special pages on a per name basis (T359183)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-11T20:06:36Z] <urbanecm@deploy2002> jdlrobson and urbanecm: Backport for [[gerrit:1010286|Disable special pages on a per name basis (T359183)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-11T20:18:06Z] <urbanecm@deploy2002> Finished scap: Backport for [[gerrit:1010286|Disable special pages on a per name basis (T359183)]] (duration: 13m 43s)

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

[mediawiki/skins/MinervaNeue@master] Fix Issue with localization of special page titles in exclusion logic

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

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

[mediawiki/skins/MinervaNeue@master] Fix Issue with localization of special page titles in exclusion logic

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

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

[mediawiki/skins/MinervaNeue@master] Fix Issue with localization of special page titles in exclusion logic

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

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

[operations/mediawiki-config@master] Disable night mode on history pages

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

Change 1010698 merged by jenkins-bot:

[operations/mediawiki-config@master] Disable night mode on history pages

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

Mentioned in SAL (#wikimedia-operations) [2024-03-13T13:06:07Z] <mabualruz@deploy2002> Started scap: Backport for [[gerrit:1010698|Disable night mode on history pages (T359183)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-13T13:08:33Z] <mabualruz@deploy2002> jdlrobson and mabualruz: Backport for [[gerrit:1010698|Disable night mode on history pages (T359183)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-13T13:21:55Z] <mabualruz@deploy2002> Finished scap: Backport for [[gerrit:1010698|Disable night mode on history pages (T359183)]] (duration: 15m 48s)

Test Result - Prod

Status: ❌ FAIL
Environment: testwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps
Test Steps:
  1. Select Skin and Enable Night Mode:
    • Navigate to Wikipedia and log in if necessary.
    • Access user preferences and select either the Minerva or Vector 2022 skin.
    • Enable Night Mode.
  1. Verify Night Mode on Article Namespace:
    • Navigate to any article page.
    • ✅ AC1: Confirm the page is displayed in Night Mode.
MinervaVector 2022
screenshot 2.png (1,360×1,062 px, 514 KB)
screenshot 3.png (1,360×1,062 px, 514 KB)
  1. Verify Night Mode on Main Page:
    • Navigate to Wikipedia's Main page.
    • ✅ AC2: Confirm the Main page is displayed in Night Mode.
MinervaVector 2022
screenshot 6.png (1,360×1,062 px, 296 KB)
screenshot 4.png (1,360×1,062 px, 248 KB)
  1. Verify Night Mode on Settings/Preferences Page:
    • Navigate to the Settings page.
    • ✅ AC3: Confirm the Settings page is displayed in Night Mode.
MinervaVector 2022
screenshot 12.png (1,360×1,062 px, 122 KB)
screenshot 11.png (1,360×1,062 px, 145 KB)
screenshot 10.png (1,360×1,062 px, 164 KB)
  1. Verify Day Mode on Action Pages with Night Mode selected:
    • ❌ AC4: Navigate to an article and perform the following actions, confirming each page is displayed in Day Mode:

@Jdlrobson, in general I'm not sure if this is the correct way to test all of these actions. I had assumed that in testwiki I would be able to enable night mode in Vector2022, but I had to use the query param, so I'm not sure if that is a valid way to test this. I was able to use Settings in Minerva to get night mode, and the results were the same.

StatusActionVector 2022
❓CreditsNo such action
screenshot 13.png (1,370×1,071 px, 116 KB)
❓DeletePermissions error
screenshot 14.png (1,370×1,071 px, 116 KB)
❌Edit
screenshot 15.png (1,370×1,071 px, 258 KB)
❌History
screenshot 16.png (1,370×1,071 px, 200 KB)
❌Info
screenshot 17.png (1,370×1,071 px, 173 KB)
❌Protect
screenshot 18.png (1,370×1,071 px, 148 KB)
❌Purge
screenshot 19.png (1,370×1,071 px, 114 KB)
❌Raw
screenshot 20.png (1,370×1,071 px, 446 KB)
✅Render
screenshot 21.png (1,370×1,071 px, 400 KB)
❓RevertNo such action
screenshot 22.png (1,370×1,071 px, 117 KB)
❓RollbackPermissions error
screenshot 23.png (1,370×1,071 px, 119 KB)
❌Submit
screenshot 24.png (1,370×1,071 px, 249 KB)
❌Unprotect
screenshot 25.png (1,370×1,071 px, 148 KB)
❌Unwatch
screenshot 26.png (1,370×1,071 px, 111 KB)
❌View
screenshot 27.png (1,370×1,071 px, 306 KB)
❌Watch
screenshot 28.png (1,370×1,071 px, 111 KB)
❌Markpatrolled
screenshot 29.png (1,370×1,071 px, 118 KB)
StatusActionMinerva
❓CreditsNo such action
screenshot 30.png (1,370×1,071 px, 105 KB)
❓DeletePermission error
screenshot 31.png (1,370×1,071 px, 98 KB)
❌Edit
screenshot 32.png (1,370×1,071 px, 275 KB)
❌History
screenshot 33.png (1,370×1,071 px, 167 KB)
❌Info
screenshot 34.png (1,370×1,071 px, 167 KB)
❌Protect
screenshot 35.png (1,370×1,071 px, 135 KB)
❌Purge
screenshot 36.png (1,370×1,071 px, 95 KB)
❌Raw
screenshot 37.png (1,370×1,071 px, 446 KB)
✅Render
screenshot 38.png (1,370×1,071 px, 332 KB)
❓Revert
screenshot 39.png (1,370×1,071 px, 105 KB)
❓Rollback
screenshot 40.png (1,370×1,071 px, 106 KB)
❌Submit
screenshot 41.png (1,370×1,071 px, 250 KB)
❌Unprotect
screenshot 42.png (1,370×1,071 px, 136 KB)
❌Unwatch
screenshot 43.png (1,370×1,071 px, 89 KB)
❌View
screenshot 44.png (1,370×1,071 px, 235 KB)
❌Watch
screenshot 45.png (1,370×1,071 px, 88 KB)
❌Markpatrolled
screenshot 46.png (1,370×1,071 px, 103 KB)
  1. Verify Day Mode on History Diff Pages:
    • Navigate to the History section of any article and select a diff view.
    • ❌ AC5: Confirm the diff page is displayed in Day Mode.
MinervaVector 2022
screenshot 48.png (1,370×1,071 px, 163 KB)
screenshot 47.png (1,370×1,071 px, 157 KB)
screenshot 50.png (1,370×1,071 px, 190 KB)
screenshot 49.png (1,370×1,071 px, 402 KB)

I dropped you a note in Slack, but the tests are meant to be performed on one of the pilot wikis in T359152, not test.wikipedia.org.

The goal is to make all pages working in the night theme, so intentionally test wikipedia doesn't disable the theme on any page.

Test Result - Prod

Status: ❌ FAIL
Environment: frwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps
Test Steps:
  1. Select Skin and Enable Night Mode:
    • Navigate to Wikipedia and log in if necessary.
    • Access user preferences and select the Minerva skin or mobile view.
    • Enable Night Mode.
  1. Verify Night Mode on Article Namespace:
    • Navigate to any article page.
    • ✅ AC1: Confirm the page is displayed in Night Mode.

The only WCAG Color Contrast issues in the body content occur in the nav box and in a table within the text.

Minerva
screenshot 68.png (1,370×674 px, 438 KB)
screenshot 69.png (1,370×674 px, 152 KB)
screenshot 72.png (1,370×674 px, 288 KB)
screenshot 70.png (1,370×674 px, 235 KB)
screenshot 71.png (1,370×674 px, 459 KB)
  1. Verify Night Mode on Main Page:
    • Navigate to Wikipedia's Main page.
    • ✅ AC2: Confirm the Main page is displayed in Night Mode.
Minerva
screenshot 73.png (1,370×674 px, 321 KB)
  1. Verify Night Mode on Settings Page:
    • Navigate to the Settings page.
    • ✅ AC3: Confirm the Settings page is displayed in Night Mode.
Minerva
screenshot 74.png (1,370×674 px, 144 KB)
  1. Verify Day Mode on Action Pages with Night Mode selected:
    • ❌ AC4: Navigate to an article and perform the following actions, confirming each page is displayed in Day Mode:
StatusActionMinerva
⬜DeletePermission error appears in night mode when on the Main page.
screenshot 75.png (1,370×674 px, 137 KB)
An permission error from an article is correct.
screenshot 76.png (1,370×674 px, 129 KB)
Still, I can't determine if the permission error would behave the same as the actual delete page.
❌EditBoth VE and Source Editor appear in night mode. Additionally, when going from VE to source editing or vice versa, (only when using action=edit), the one of the editing screens will appear, then after a few moments it will reload.
screenshot 5.mov.gif (1,370×674 px, 2 MB)
✅History
screenshot 82.png (1,370×674 px, 175 KB)
✅Protect
screenshot 83.png (1,370×674 px, 164 KB)
❌Purge
screenshot 84.png (1,370×674 px, 127 KB)
✅Render
screenshot 85.png (1,370×674 px, 364 KB)
❌Submit
screenshot 86.png (1,370×674 px, 219 KB)
✅Unprotect
screenshot 87.png (1,370×674 px, 164 KB)
❌View
screenshot 88.png (1,370×674 px, 412 KB)
  1. Verify Day Mode on History Diff Pages:
    • Navigate to the History section of any article and select a diff view.
    • ✅ AC5: Confirm the diff page is displayed in Day Mode.
Minerva
screenshot 89.png (1,370×674 px, 176 KB)
screenshot 90.png (1,370×674 px, 209 KB)

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

[operations/mediawiki-config@master] Make night theme available on shwiki, exclude additional actions

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

Change 1012755 merged by jenkins-bot:

[operations/mediawiki-config@master] Make night theme available on shwiki, exclude additional actions

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

Mentioned in SAL (#wikimedia-operations) [2024-03-20T21:22:37Z] <catrope@deploy2002> Started scap: Backport for [[gerrit:1012755|Make night theme available on shwiki, exclude additional actions (T359183 T359152)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-20T21:25:04Z] <catrope@deploy2002> catrope and jdlrobson: Backport for [[gerrit:1012755|Make night theme available on shwiki, exclude additional actions (T359183 T359152)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

❌ View

This should be a pass. ?action=view is equivalent to no action so a pass here would contradict QA test 2.

❌ Purge

Purge has no color contrast issues so we should call this a pass.

❌ Submit

Nice catch! This seems like it should be disabled. We just backported a patch to fix this so please run the test again.

❌ Edit

Nice catch! This one should be repeated with JavaScript disabled. Looks like this is also failing so I will fix today.

❌Delete Permission error appears in night mode when on the Main page.

I can confirm this is showing in light theme:

Screenshot 2024-03-20 at 10.56.03 AM.png (1,904×1,908 px, 420 KB)

Mentioned in SAL (#wikimedia-operations) [2024-03-20T21:39:48Z] <catrope@deploy2002> Finished scap: Backport for [[gerrit:1012755|Make night theme available on shwiki, exclude additional actions (T359183 T359152)]] (duration: 17m 10s)

Test Result - Prod

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

Test Artifact(s):

QA Steps
  1. Verify Day Mode on Action Pages with Night Mode selected:
    • ✅ AC4: Navigate to an article and perform the following actions, confirming each page is displayed in Day Mode:
StatusActionMinerva
✅DeleteT359183#9647660
✅Edit
screenshot 118.png (1,460×934 px, 290 KB)
✅PurgeT359183#9647660
✅Submit
screenshot 117.png (1,460×934 px, 400 KB)
✅ViewT359183#9647660

Looks good, thanks for all the work here @Edtadros!