Page MenuHomePhabricator

The ULS language button doesn't collapse where it should
Closed, ResolvedPublic3 Estimated Story Points

Description

When resizing the window to say 567px the language button doesn't collapse on Office Wiki

Screen Shot 2021-07-27 at 4.18.52 PM.png (690×924 px, 120 KB)

Developer notes

This looks another load order race condition. The issue is the user-links-collapsible-item class is not getting applied to the button.

I can replicate it when I do:

wfLoadSkin( 'Vector' );
wfLoadExtension('UniversalLanguageSelector');

I think the solution here is to stop using the hook in Vector and moving this to SkinVector::getTemplateData where ordering is better guaranteed.

QA steps

QA Results - Beta

ACStatusDetails
1T287533#7263606
2T287533#7263606

QA Results - Prod

ACStatusDetails
1T287533#7263619
2T287533#7263619

Event Timeline

cc @ovasileva potential blocker for rolling out further?

cc @ovasileva potential blocker for rolling out further?

Yeah, I think we should fix this before deploying further

current plan: refactor core to allow skins to extend the class and register the hook by overriding the protected function to guarantee it running last.

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

[mediawiki/core@master] SkinTemplate: Factor out SkinTemplateNavigation hooks

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

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

[mediawiki/skins/Vector@master] Tests should use Universal hook

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

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

[mediawiki/skins/Vector@master] Run Vector's SkinTemplateNavigation hook last

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

I think this will also fix the inconsistency between the "Uploaded media"/"Translation" labels in:

Screen Shot 2021-07-28 at 3.44.06 PM.png (616×458 px, 38 KB)

Change 708578 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Tests should use Universal hook

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

Change 708570 merged by jenkins-bot:

[mediawiki/core@master] SkinTemplate: Factor out SkinTemplateNavigation hooks

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

Change 708580 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Run Vector's SkinTemplateNavigation hook last

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

Test on https://wikidata.beta.wmflabs.org/wiki/Q356553
✅ AC1: Resize browser. When the screen gets too small the language button should disappear.
✅ AC2: Expanding the browser window should make the language button appear again.

Screen Recording 2021-08-05 at 7.58.54 AM.mov.gif (434×780 px, 779 KB)

Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

Test on https://www.wikidata.org/wiki/Wikidata:Main_Page?vectoruserlinks=1
✅ AC1: Resize browser. When the screen gets too small the language button should disappear.
✅ AC2: Expanding the browser window should make the language button appear again.

Screen Recording 2021-08-05 at 8.03.10 AM.mov.gif (396×740 px, 701 KB)

Edtadros updated the task description. (Show Details)

Change 720080 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/skins/Vector@master] Use buildContentNavigationUrls() override instead of odd hook calling

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

Change 720080 abandoned by Krinkle:

[mediawiki/skins/Vector@master] Use buildContentNavigationUrls() override instead of odd hook calling

Reason:

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