[go: up one dir, main page]

Page MenuHomePhabricator

Dark mode shouldn't apply when printing page (mobile and desktop)
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

(Repeat on mobile)

What happens?:

screenshot 456.png (898×1 px, 264 KB)

Screenshot 2024-05-31 at 8.36.28 AM.png (1×2 px, 532 KB)

What should have happened instead?:

  • Black text on white background - as if dark mode is disabled.
  • Fix should apply to both mobile and desktop themes

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Probably can be fixed by applying the same rules in notheme to html using @print media query

QA Results - Beta

ACStatusDetails
1T366362#9951772

Sign off steps

  • Follow up on T366362#9957385 before resolving this ticket creating a new ticket.

T369874

Event Timeline

Jdlrobson triaged this task as Medium priority.May 31 2024, 3:35 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from Incoming to Groomed on the Web-Team-Backlog board.
Jdlrobson raised the priority of this task from Medium to High.Jun 28 2024, 8:08 PM

Change #1050705 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/core@master] Disable night mode while printing and re-enable afterwards

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

This method won't work without JS enabled, but it is a quick and dirty and cross skin way that might be easier to deploy short term, than @media print notheme.

Jdlrobson renamed this task from Dark mode shouldn't apply when printing page to Dark mode shouldn't apply when printing page (mobile and desktop).Jul 1 2024, 4:15 PM
Jdlrobson updated the task description. (Show Details)

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

[mediawiki/skins/MinervaNeue@master] Force light theme in print styles

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

Change #1051425 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Force light theme in print styles, remove unnecessary css variables

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

bwang removed bwang as the assignee of this task.Jul 2 2024, 5:40 PM
bwang moved this task from Doing to Code Review on the Web-Team-Backlog (FY2024-25 Q1 Sprint 1) board.
bwang subscribed.

Note that if we go with:
@media screen and ( prefers-color-scheme: dark ) { we also need to correct all other usages of skin-theme-clientpref-os that have recently been added on the wikis etc. and the documentation.

Change #1051425 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Force light theme in print styles, remove unnecessary css variables

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

Change #1051212 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Force light theme in print styles

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

@Jdlrobson Please review the possible issue below. If that is fine, you can move this to sign-off, thanks!

Test Result - Beta

Status: ❓NMI
Environment: Beta
OS: macOS Sonoma 14.5
Browser: Chrome 126
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps
DesktopMobile
2024-07-03_14-02-51.mp4.gif (760×768 px, 1 MB)
2024-07-03_14-02-24.mp4.gif (766×768 px, 1 MB)

❓Possible Issue

Desktop the linked words are underline and black but on mobile they are light grey

DesktopMobile
2024-07-03_13-37-08.png (1×1 px, 652 KB)
2024-07-03_13-36-38.png (1×1 px, 421 KB)

@Jdlrobson So are we updating all our previous deployed overrides and the documentation to match this, as I pointed out in T366362#9948098 ?

Hey @TheDJ yes. I've updated the documentation now and I need to create a ticket for working out what to do with the existing code before signing off. I'll add this to the sign off steps.

https://global-search.toolforge.org/?q=%5C%40media+%3F%5C%28+%3Fprefers-color-scheme%3A+dark&regex=1&namespaces=&title= ( 859 results)

FWIW I do think there is an argument to be made here that TemplateStyles should support a media parameter and default to @screen when not given given the low usage of print styles (but likely out of scope here):
https://global-search.toolforge.org/?q=%5C%40media+print&regex=1&namespaces=10%2C828&title=

Test Result - PROD

Status: ✅ PASS
Environment: PROD
OS: macOS Sonoma 14.5
Browser: Chrome 126
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps
  1. Visit https://en.wikipedia.org/wiki/California and https://en.m.wikipedia.org/wiki/California
  2. Switch to dark mode
  3. Click print
DesktopMobile
2024-07-13_08-07-57.mp4.gif (786×1 px, 1 MB)
2024-07-13_08-08-47.mp4.gif (790×1 px, 1 MB)

Change #1050705 abandoned by TheDJ:

[mediawiki/core@master] Disable night mode while printing and re-enable afterwards

Reason:

alternative solution was chosen

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