Page MenuHomePhabricator

Inline images invisible on beta cluster main page
Closed, ResolvedPublic

Description

To reproduce: Visit English Wikipedia main page.

MobileFrontend:

Screen Shot 2017-04-01 at 14.00.10.png (968×2 px, 372 KB)

MobileFrontend (auto-scaling disabled):

Screen Shot 2017-04-01 at 14.01.43.png (1×1 px, 498 KB)

The auto-scaling rule uses 100%; for width or height which in this cause seems to make it relate to the anchor tag (or table cell) which has no other content, so it results in 0px - making the image invisible.

See also:
T131812: MinervaNeue auto image scaling causes rendering reflows

Event Timeline

ovasileva triaged this task as Medium priority.Apr 4 2017, 3:55 PM
Jdlrobson subscribed.

I'm confused. Where/how are you seeing this?
https://en.m.wikipedia.org/wiki/Main_Page looks fine to me.

Looking at the HTML however, ideally .content a > img would only apply to image links. e.g. .content .image > img
but I don't think we have consistent markup for thumbnails do we?

I'm confused. Where/how are you seeing this?
https://en.m.wikipedia.org/wiki/Main_Page looks fine to me.

https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page

It looks like the main page in prod hides this section entirely.

Jdlrobson renamed this task from MobileFrontend auto scaling makes linked images invisible to MobileFrontend auto scaling makes inline images invisible.Apr 10 2017, 6:02 PM
Jdlrobson lowered the priority of this task from Medium to Low.Apr 20 2017, 12:22 AM

This is definitely unrelated to lazy loading images and just as you say related to the max-width being applied on an inline image.
I'm not 100% sure how to fix this and given I can't find an article in the wild that does this I don't see this as a big problem, but it seems like we could replace a for .image in the css rule, however I'm not sure how much we can rely on .image to canonically always be on our thumbnails.... or can we?

Jdlrobson renamed this task from MobileFrontend auto scaling makes inline images invisible to Inline images invisible on beta cluster main page.Aug 1 2017, 9:03 PM
Jdlrobson removed a project: MobileFrontend.

This appears to be a local template issue not an issue with MobileFrontend.
The template uses a table with 3 td's with width: 33%.
The td's are taking 33% of space leaving the img tag with zero space to work in.
I've improved this somewhat, https://en.wikipedia.beta.wmflabs.org/wiki/Special:MobileDiff/365653 - maybe TemplateStyles or flex can be used to make this nicer though.

It's not the lazy loaded definitions that cause this, it's the responsive sizing definitions. It's similar to T116318. Specifying an explicit (min-)width on the table cell or something wrapping the inline image will indeed work around this problem.

The change is applied, but the images are still made invisible by the CSS mobile override for image width.

IMG_2278.PNG (1×640 px, 135 KB)

IMG_2277.PNG (922×640 px, 191 KB)