Page MenuHomePhabricator

Formula cutoff in Russian and Ukrainian
Open, MediumPublic

Description

Reported from OTRS - https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=11026281

User reports - When using Russian or Ukrainian language (maybe some others too) the temperature or catalyst can't be viewed (in attachment you can see what I mean; although you can see temperature, but it can be interpreted as 100 °C or 180 °C, when the right one is 160 °C)

Screenshot_20190324-174815.png (2×1 px, 282 KB)

Note - I am working on finding the specific article to test against with other languages.

Event Timeline

Is this also about formulas being cut off at the right?

I am working on finding the specific article to test against with other languages.

That's https://ru.wikipedia.org/wiki/Ацетат_кальция#Применение

Aklapper added a subscriber: Kizule.

@Zoranzoki21: I don't see how incorrectly rendering images is related to design?

Dbrant subscribed.

It looks like the content service (or Parsoid?) is adding an artificial margin-top to the image that contains the chemical formula, which is causing the topmost text to be clipped.

https://ru.wikipedia.org/api/rest_v1/page/mobile-html/Ацетат_кальция

This margin is not present in the same page in mobile web.

LGoto triaged this task as Medium priority.Apr 24 2019, 3:46 PM
bearND removed bearND as the assignee of this task.EditedMar 6 2020, 6:24 AM

Not sure where the style attribute in the following HTML snippet is originally coming from but it's also in upstream Parsoid output, which is used to build the mobile-sections and mobile-html outputs. It's even in the Desktop output.

<img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7225efe5e8fc4e48d91691e0a307b8e2b915c725" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.838ex; margin-top: -0.425ex; width:40.169ex; height:4.343ex;">

I suspect this is coming somehow from the Math extension or Mathoid.

The mobile web output does't have vertical-align: -0.838ex; margin-top: -0.425ex; in the inline style attribute on these image tags. Also not sure why.

Maybe @Physikerwelt has an idea why the margin-top exists; or @Jdlrobson how it gets removed from the mobile web output but not in other places?

@bearND this is likely a side effect of the lazy loading implementation and the subject of the bug T207929

@Jdlrobson That's good to know. So mobile web would be broken, too, once T207929 is fixed.

I looked at the Parsoid html and math element - the problem is with a little bit less height of the formula image. Looks like it can be fixed in Mathoid.

Screenshot 2023-01-18 at 12.47.42.png (1×3 px, 983 KB)