Page MenuHomePhabricator

Template:Maplink does not display thumbnail with frame-align=center setting
Open, Needs TriagePublic

Description

Template:Maplink does not display thumbnail with frame-align=center setting. The frame-align=center setting is maily used in infoboxes (see https://en.wikipedia.org/wiki/Interstate_70_in_Pennsylvania for example).

Sample page - two maps on the web, only one in Android app: https://en.wikipedia.org/wiki/User:Kozuch/Bug1

Using latest Android production app.

Event Timeline

Charlotte subscribed.

The Android team is not sure if this is a page library or parsoid issue, so sending to the relevant teams to investigate.

This is because the html is missing its css. The html for center elements are not floated, just inline <a> element. normally that makes it sized 0x0

This might be fixed next week because of T157512: Use an <img> element inside the <a> link rather than a background image to facilitate printing which will always have a natural size (no matter if the CSS is present or not).

This might be fixed next week because of

Nope still broken. But honestly i have lost track of where (which api) each app retrieves its Content from.
Parsoid gets it correct: https://en.wikipedia.org/api/rest_v1/page/html/User%3AKozuch%2FBug1
PCS??? seems out of sync with reality: https://en.wikipedia.org/api/rest_v1/page/mobile-html/User%3AKozuch%2FBug1

It seems to me that this is solely due to missing page-specific ResourceLoader styleonly modules.

Unlike https://en.wikipedia.org/api/rest_v1/page/html/ the mobile version https://en.wikipedia.org/api/rest_v1/page/mobile-html doesn't include these Resourceloader style modules. The first does so by loading: https://en.wikipedia.org/w/load.php?modules=mediawiki.skinning.content.parsoid%7Cmediawiki.skinning.interface%7Csite.styles%7Cmediawiki.page.gallery.styles%7Cext.cite.style%7Cext.cite.styles%7Cext.kartographer.style%7Cext.kartographer.style&only=styles&skin=vector

So it is logical that it doesn't work in that case. Definitely not a Kartographer problem.