Page MenuHomePhabricator

skin-invert-image needs a black background
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Follow up work to T365102
Steps to replicate the issue (include links if applicable):

What happens?:

  • Has a white/gray background

Screenshot 2024-06-14 at 11.09.49 AM.png (317×316 px, 23 KB)

What should have happened instead?:

Screenshot 2024-06-14 at 11.09.34 AM.png (316×340 px, 24 KB)

  • Should have black background

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

Other information (browser name/version, screenshots, etc.):

  • We need to set background: white; to .skin-invert-image img

QA Results - Beta

ACStatusDetails
1T367589#9951596

QA Results - PROD

ACStatusDetails
1T367589#9978466

Event Timeline

Background is already set on the outer <figure>-element:

figure[typeof~='mw:File/Thumb'],
figure[typeof~='mw:File/Frame'] {
 border:var(--border-subtle,1px solid #c8ccd1);
 border-bottom:0;
 background-color:var(--background-color-interactive-subtle,#f8f9fa);
}

I don't see any reason why the same background is set again on the <img>:

figure[typeof~="mw:File/Thumb"] > :not(figcaption) .mw-file-element, 
figure[typeof~="mw:File/Frame"] > :not(figcaption) .mw-file-element {
	[...]
	background: var(--background-color-interactive-subtle,#f8f9fa);
}

Removing that line would solve this issue, as .skin-invert-image won't invert anything that is defined outside the <img>.

(Code according to Firefox DevTools; don't know where to find it in the repo.)

bwang triaged this task as Low priority.Jun 17 2024, 5:49 PM
bwang set the point value for this task to 2.
Sjoerddebruin renamed this task from skin-invert-image needs a white background to skin-invert-image needs a black background.Jun 23 2024, 10:08 AM
Sjoerddebruin subscribed.

It works fine with Minerva, this problem only concerns Vector 2022

Do you have an estimate of when this will be resolved? Given the imminent night mode, onwiki documentation needs to be drawn up for contributors. It would be useful to have the class up and running to explain how it works.

I agree, this seems essential for the further roll-out of the dark mode.

Jdlrobson raised the priority of this task from Low to Medium.Jul 1 2024, 4:59 PM
SToyofuku-WMF raised the priority of this task from Medium to High.Jul 2 2024, 4:24 PM
SToyofuku-WMF subscribed.

Raising the priority to reflect the above

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

[mediawiki/core@master] [Figures] Remove redundant background color interfering with invert

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

Change #1051491 merged by jenkins-bot:

[mediawiki/core@master] [Figures] Remove redundant background color interfering with invert

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

@Jdlrobson It's dark but you can't see much of it, as seen in the screenshot.

Test Result - Beta

Status: ❌ FAIL
Environment: Beta
OS: macOS Sonoma 14.5
Browser: Chrome 126
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps
  1. Visit https://fr.wikipedia.org/wiki/Torchage_du_gaz_naturel#Aspects_techniques

Lines are dark

2024-07-03_10-51-45.png (305×299 px, 22 KB)

Hi @GMikesell-WMF the screenshot and URL appears to b beta and this change is going out with MW-1.43-notes (1.43.0-wmf.13; 2024-07-09) ?
Please repeat the test on https://en.wikipedia.beta.wmflabs.org/wiki/T367589

Test Result - Beta

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

Test Artifact(s):

Test Steps
  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/T367589

Lines are dark

2024-07-03_13-20-19.png (615×1 px, 125 KB)

GMikesell-WMF assigned this task to ovasileva.
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF subscribed.

Looks good! Resolving

@Jdlrobson Please review below, thanks!

Test Result - PROD

Status: ❌ FAIL
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/Gas_flare

PROD has a grey background, the same as the light version. It doesn't look like Beta.

PRODBeta
2024-07-12_14-51-10.png (1×1 px, 492 KB)
image.png (578×821 px, 98 KB)