Page MenuHomePhabricator

On diff pages, the logo overlaps the diff summary in dark mode
Open, MediumPublicBUG REPORT

Assigned To
Authored By
Tufor
Jul 24 2024, 6:27 PM
Referenced Files
F57469219: grafik.png
Fri, Sep 6, 3:26 PM
F57469151: grafik.png
Fri, Sep 6, 3:26 PM
F57469221: Screenshot 2024-09-06 at 8.24.11 AM.png
Fri, Sep 6, 3:26 PM
F56654627: image.png
Jul 24 2024, 6:27 PM
F56654615: image.png
Jul 24 2024, 6:27 PM

Description

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

What happens?:
It might not be very visible, but the "Wikipedia" image is stacked on top of the white-ish box with the info about the diff.

image.png (557×602 px, 34 KB)

To make it more visible, I changed the color of the element with a class .mw-diff-ntitle2 to red:

image.png (550×606 px, 35 KB)

What should have happened instead?:
The "Wikipedia" image should "hide"/"slide" under the box like in the day mode.

Also (but it should be probably an another ticket), the box with the diff info should be dark, since it is a dark mode

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

Other information (browser name/version, screenshots, etc.):
Appears on Firefox, Edge, Firefox mobile, haven't tested other browsers.

The image in the footer is this one: https://pl.m.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg
There's no other version of the image for the night mode, it has the colors inverted by (I suppose) this function: https://gerrit.wikimedia.org/g/mediawiki/skins/MinervaNeue/+/90fe9441f24e176400a49828f2632dfe562becdf/minerva.less/minerva.mixins.less#88

It seems like inverting the colors messes up with the stacking (the issue doesn't appear in the light mode). Might be relevant: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context

Event Timeline

Jdlrobson renamed this task from Footer Image stacking issue on Mobile Diff View in dark mode to Footer Image stacking issue on Mobile Diff View.Aug 2 2024, 3:18 PM
Jdlrobson reopened this task as Open.
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson edited projects, added patch-welcome; removed dark-mode.

The use of filter appears to establish a stacking context (https://drafts.fxtf.org/filter-effects/#placement)
So even though this only impacts dark mode, this seems like a general bug with the mobile diff page for any element in the footer that might some day use CSS filters. Thanks for flagging @Tufor!

Jdlrobson renamed this task from Footer Image stacking issue on Mobile Diff View to On diff pages, the logo overlaps the diff summary in dark mode.Aug 2 2024, 3:24 PM
ovasileva triaged this task as Medium priority.Aug 5 2024, 5:41 PM
ovasileva moved this task from Incoming to Groomed on the Web-Team-Backlog board.

Hi @Jdlrobson, I can take this up, if it's still relevant!

Yes please ! patch very much welcome!

Tried reproducing on my local system (Minerva theme and mobile screen with dark mode) and there seems to be no issue right now. I might be wrong about this, though, so is there a specific sequence of steps I need to try? @Tufor

@theprotonade I can reproduce this but only in dark mode!

Screenshot 2024-09-06 at 8.24.11 AM.png (1×1 px, 208 KB)

Steps to reproduce:

@theprotonade thank you for your willingness to investigate and to solve this problem. Problem still exists, I just recreated it again.

Diff: https://pl.m.wikipedia.org/w/index.php?title=Wikipedysta:Tufor/brudnopis&diff=prev&oldid=45236475

grafik.png (779×605 px, 75 KB)

Mobile version (so Minerva skin), dark mode. That's all that is needed. I just used a private mode on my smartphone's mobile browser (Firefox mobile) so I'm logged out, changed the theme to the dark mode and opened a random diff, and the "Wikipedia" logo still is "over" this box, like in the screenshot above. You just have to scroll all the way to the bottom.

The problem 100% stems from the inversion of colors of images by css. I found that other things (images) also can float over the content of this box:

grafik.png (536×636 px, 57 KB)

The problem 100% stems from the inversion of colors of images by css. I found that other things (images) also can float over the content of this box:

grafik.png (536×636 px, 57 KB)

Yep. Please see T370943#10038953 for more context on what's happening here if you missed it!

Got it. For some reason, it shows on the prod site but not on my local, but I'll figure that out.
Thanks for the details! I'll take a look and put in a patch soon.

In case it's helpful here's my local logo setup:

$wgLogos = [
	'wordmark' => [
		'src' => "https://en.m.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg",
		'width' => 120,
		'height' => 18,
	],
	'tagline' =>  [
		'src' => "https://en.m.wikipedia.org/static/images/mobile/copyright/wikipedia-tagline-en.svg",
		'width' => 117,
		'height' => 13,
	],
];

Oh yeah, I have something similar too, but that should help :)