Page MenuHomePhabricator

Chinese sites [Regression] Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs when 2 different languages are mixed
Closed, DeclinedPublic2 Estimated Story PointsBUG REPORT

Description

It's broken, again :(

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

What happens?:
Baseline of the text of variant tab at top of the page is mispositioned.

image.png (191×742 px, 17 KB)

image.png (374×1 px, 83 KB)

What should have happened instead?:
It should not. Below are screenshots of that in the Legacy Vector.

image.png (227×1 px, 32 KB)

image.png (297×1 px, 93 KB)

Event Timeline

TheDJ renamed this task from Variant tab text in Vector 2022 is mispositioned when language is set to en to Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs.Aug 15 2022, 11:05 AM

These are flex items. I guess we can set align-items: flex-end on them to make them bottom align.. I'm not actually sure how you would do baseline alignment for text nested inside flex like this...

@Jdrewniak if I recall correctly we recently worked on this right?

Interesting. @Jdlrobson yeah I recently made an attempt at unifying the tab & dropdown menu headings. The markup for these elements is different so I added hardcoded pixel value for padding to attempt to unify the baseline alignment.

Screen Shot 2022-08-22 at 11.32.34 AM.png (448×1 px, 232 KB)

I did not take into account mulit-script scenarios though. I guess we can hardcode the height like legacy Vector and vertically-center the text with align-items:center.

Screen Shot 2022-08-22 at 11.40.42 AM.png (462×2 px, 278 KB)

btw, I know that in Legacy Vector the top and bottom paddings on the tabs were different, but that was because of the gradient. I think we can vertically center the labels equally from both top and bottom now. (that'll affect some of the spacing between the tabs and the header though, so I'll make a patchdemo first).

Jdlrobson renamed this task from Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs to [Regression] Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs.Aug 22 2022, 5:36 PM
ovasileva triaged this task as Medium priority.Aug 22 2022, 5:36 PM
Jdlrobson renamed this task from [Regression] Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs to [Regression] Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs when 2 different languages are mixed.Aug 23 2022, 4:38 PM
Jdlrobson moved this task from Incoming to Not ready to estimate on the Web-Team-Backlog board.
Jdlrobson renamed this task from [Regression] Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs when 2 different languages are mixed to Chinese sites [Regression] Baseline of the text in the Variant menu in Vector 2022 is misaligned with other tabs when 2 different languages are mixed.Jun 26 2023, 5:45 PM
LGoto set the point value for this task to 2.Jun 29 2023, 5:43 PM

Change 937187 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Reset line height on tab elements

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

Change 937187 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Reset line height on tab elements

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

Edtadros subscribed.

Test Result - Beta

Status:
Environment: beta
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Open https://zh.wikipedia.beta.wmflabs.org/wiki/%E9%A6%96%E9%A1%B5?uselang=en
or https://zh.wikipedia.beta.wmflabs.org/wiki/%E9%A6%96%E9%A1%B5?uselang=fr
or https://zh.wikipedia.beta.wmflabs.org/wiki/%E9%A6%96%E9%A1%B5?uselang=ru
✅ AC1: The text variant should be positioned similarly to the vector images in the description.
@Jdlrobson, the old vector images look like the text variant should be vertically centered with the full height letters in English (excluding the decenders). This looks to be top justified. Not sure if this is ok.
This is ok per web sprint meeting

Screenshot 2023-07-16 at 7.24.44 PM.png (182×648 px, 13 KB)

As discussed in standup this is likely as good as we're going to get this for now.

Jdlrobson changed the task status from Resolved to Declined.EditedAug 1 2023, 12:43 AM

Declined its probably more accurate here. I just reverted the patch as it caused T343110. In short, we can't easily support mixed languages, and would prefer to invest time in T53242.