Page MenuHomePhabricator

Clicking the language button should load Universal Language Selector
Closed, ResolvedPublic3 Estimated Story Points

Description

Following up to T260738, clicking the language button with JavaScript enabled should load the universal language selector dialog.

UniversalLanguageSelector will enhance an existing button with the mw-interlanguage-selector class.

Acceptance criteria

  • The class mw-interlanguage-selector class is added to the button.
  • When ULS enhances the button, the hover effect should be disabled.

Notes

We may need to check the existence/state of the ULS module and use client-js to determine whether to disable the ULS hover effect.

QA steps

Event Timeline

@nray https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/635080 may be interesting reading prior to taking this on. I did try out a few things there.
,

Change 661804 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/skins/Vector@master] POC: Add mw-interlanguage-selector class to language button & hide menu

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

nray removed nray as the assignee of this task.Feb 5 2021, 12:58 AM
nray added a subscriber: nray.

The new button has 2 problems

  1. The label changes on pages without languages
  2. When the button is clicked no languages are showing due to a now invalid assumption in the UniversalLanguageSelector about where to find languages.

I've posted https://gerrit.wikimedia.org/r/c/mediawiki/extensions/UniversalLanguageSelector/+/661797 but we'll need to coordinate with the language team to get that merged.

The cog is currently hidden, but we're discussing that separately.

Change 661797 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/UniversalLanguageSelector@master] Modern Vector should be compatible with ULS

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

Change 661804 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Add mw-interlanguage-selector class to language button & hide menu/arrow when appropriate

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

Change 661797 merged by jenkins-bot:
[mediawiki/extensions/UniversalLanguageSelector@master] Modern Vector should be compatible with ULS

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

Edtadros added a subscriber: Edtadros.

Test Result - Beta{F34105087

Status:
Environment: beta
OS: macOS Big Sur
Browser: Chrome, Firefox, Safari, Edge
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

Visit https://en.wikipedia.beta.wmflabs.org/wiki/Test_indicators and confirm you can switch to all 7 available languages

ChromeFirefoxSafariEdge

Check Firefox, Chrome, Safari, Edge (this can be deferred if a general QA of the feature later is being planned).
See Above.

@Jdlrobson The navigation works, but the target page shows 0 languages. Is that functioning as expected?

@Jdlrobson The navigation works, but the target page shows 0 languages. Is that functioning as expected?

That's fine.

ovasileva claimed this task.