[go: up one dir, main page]

Page MenuHomePhabricator

Languages header should not change on pages without languages
Closed, ResolvedPublic

Description

On https://en.wikipedia.beta.wmflabs.org/wiki/Selenium_diff_test_0.32843365924508916?useskinversion=2 the language button label changes from "0 languages" to "Languages"

This appears to be due to a piece of code in the ext.uls.interface

This code should not be applied to the newer version of Vector.

Event Timeline

Change 661797 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/UniversalLanguageSelector@master] Don't apply heading change to modern Vector

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

Jdlrobson added subscribers: Rileych, Nikerabbit.

cc @Nikerabbit @Rileych - the above patch was the simplest solution I could come up with, without any expertise of the extension. An alternative would be to remove this line of code - I'm not 100% what it's for, as this results in a flash of unstyled content (and inconsistent heading) e.g. compare https://simple.wikipedia.org/wiki/User:Jdlrobson with https://simple.wikipedia.org/ noting the flash of "In other languages" changing to "langguages"

This is connected with the discussion in T273144#6805993. The purpose of keeping the "languages" header even when there was no list was to keep a consistent place for people to find the language settings.
Conceptually, the list to change the content language was the main element, but we wanted to keep an access to settings (secondary but persistent) for consistency.

Makes sense. Then I think my patch here is appropriate as a stopgap for now, while we work out the new design.

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

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

Edtadros subscribed.

@Jdlrobson which is correct, "0 languages" or "Languages"?

@Jdlrobson which is correct, "0 languages" or "Languages"?

"0 languages"

Test Result - Beta

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

Test Artifact(s):

QA Steps

Navigate to a page with 0 languages.
✅ AC1: The Language button should read "0 languages"

Screen Shot 2021-02-23 at 6.40.10 AM.png (601×854 px, 102 KB)

Discussed this with @alexhollender today. I'm a bit concerned with the language used here: "0 languages" could be confusing to new users who don't have expectations for language switching, in particular on smaller wikis. Is it possible to go back to "Languages" without the switch from one to the other?

From standup - will close this task and add note on new copy into T275147: Empty state for language button and menu

Change 684984 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/UniversalLanguageSelector@master] Fire hook when opened via language button

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

Change 684984 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/UniversalLanguageSelector@master] Fire hook when user clicks language button

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

Change 684984 merged by jenkins-bot:

[mediawiki/extensions/UniversalLanguageSelector@master] Fire hook when user clicks language button

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