Page MenuHomePhabricator

Suggested edits images in dark mode are in inverted colours
Closed, ResolvedPublic

Description

Reported by @Folly_Mox.

Image (source):

Suggested_Edits_x_dark_mode.png (599×313 px, 61 KB)

Suggested fix: add class="mw-no-invert" to the images.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It seems that Dark mode gadget (Special:Preferences#mw-prefsection-gadgets - Dark mode toggle: Enable a toggle for using a light text on dark background color scheme) causes colorshifting in images:

Screen Shot 2023-11-14 at 12.56.19 PM.png (1×1 px, 619 KB)

The native dark mode on mobile devices is handled gracefully:

Screen Shot 2023-11-14 at 12.42.48 PM.png (1×820 px, 328 KB)

Change 983715 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Add mw-no-invert class to background images

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

Thanks for the report. I think this is an occurrence of T345281, fixed adding mw-no-invert class. User impact article thumbnails also present the same problem (with Dark mode gadget, not with the extension). I will ask see if the user impact case makes sense to be solved in the upstream since Codex is already adding a cdx-no-invert class for these.

Sgs moved this task from Needs Discussion to Sprint 5 (Growth Team) on the Growth-Team board.
Sgs edited projects, added Growth-Team (Sprint 5 (Growth Team)); removed Growth-Team.
Sgs moved this task from Incoming to QA on the Growth-Team (Sprint 5 (Growth Team)) board.
Sgs moved this task from QA to Code Review on the Growth-Team (Sprint 5 (Growth Team)) board.

Change 983715 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add mw-no-invert class to background images

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

I don't see any dark mode installed in beta, neither gadget or extension 🤔 Do we have an easy way to test this before deployment @Etonkovidova?

I don't see any dark mode installed in beta, neither gadget or extension 🤔 Do we have an easy way to test this before deployment @Etonkovidova?

testwiki has the Dark mode gadget. And, probably, it's worth to install it on enwiki beta per https://en.wikipedia.org/wiki/Wikipedia:Dark_mode_(gadget).

Checked in testwiki and enwiki wmf.12 - works as expected.

Screen Shot 2024-01-04 at 3.06.53 PM.png (1×658 px, 183 KB)
Screen Shot 2024-01-04 at 3.06.18 PM.png (1×1 px, 678 KB)