Page MenuHomePhabricator

ULS button shows empty popup when no languages (if compact language selector setting is off)
Open, HighPublicBUG REPORT

Description

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

  • Disable this preference:

Screen Shot 2022-10-06 at 10.24.57 AM.png (131×515 px, 16 KB)

What happens?:
An empty dialog appears

Screen Shot 2022-10-06 at 10.58.53 AM.png (204×436 px, 21 KB)

What should have happened instead?:
Some better kind of fallback. Perhaps we could use SkinAfterPortlet to add a more meaningful message.

Event Timeline

Pginer-WMF renamed this task from ULS button shows empty popup when no languages to ULS button shows empty popup when no languages (if compact language selector setting is off).Oct 21 2022, 7:53 AM
Pginer-WMF triaged this task as High priority.

As @Pginer-WMF recently explained in a recent discussion regarding this task, this preference was intended to control whether to show all languages directly or show just a few of them (with option to search for the rest) instead. This makes sense only if the language selection takes place at the sidebar when some (or all) languages can be displayed. With the new Vector 2022 skin, there is only a button to access language selection. The proposed solution here is to:
a. not show the setting when the new Vector skin is selected and/or
b. ignore its selected state in such case.

Change 851592 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/UniversalLanguageSelector@master] Compact language list preference should be ignored for Vector 2022 skin

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

Change 851593 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/UniversalLanguageSelector@master] Compact language list setting should be hidden for Vector 2022 skin

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

@Pginer-WMF how will editors disable the language button feature instead? The preference is used to fallback to the dropdown intentionally as many editors using the new Vector skin strongly disliked the ULS experience and wanted a dropdown instead. Perhaps you could instead update the behaviour of the preference to always launch ULS when there are no languages?

This however wouldn't resolve the issue for non-JavaScript and users of older browsers - as this is the fallback state. What's the plan for that?

Change 851592 merged by jenkins-bot:

[mediawiki/extensions/UniversalLanguageSelector@master] Compact language list preference should be ignored for Vector 2022 skin

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

@Pginer-WMF how will editors disable the language button feature instead? The preference is used to fallback to the dropdown intentionally as many editors using the new Vector skin strongly disliked the ULS experience and wanted a dropdown instead. Perhaps you could instead update the behaviour of the preference to always launch ULS when there are no languages?

Users speak a few languages while a page can be available in hundreds of them. The language selector provides aids to help users to find their language such as flexible search (research showing as the most common way to look for it), surfacing previous choices (providing the languages you need at hand), and grouping languages by region and script so that those not using search can skip as many groups as possible when they browse them. In contrast, a flat list of potentially hundreds of languages using different scripts (i.e., without a clear alphabetical order) goes against common usability guidelines and I don't think makes much sense to be provided as an option once the languages that were provided directly on the page sidebar were moved inside the language selector as in the new Vector.

There are some administrative scenarios where having a flat list of links can be convenient (e.g., going through all languages to check they don't lack an image), and that can be supported by using the list of links on the Wikidata page for example. If there are other relevant cases, we can consider them and figure out how to better support them.

This however wouldn't resolve the issue for non-JavaScript and users of older browsers - as this is the fallback state. What's the plan for that?

I think support for non-Javascript, if needed, is better to provide it automatically based on the lack of Javascript. I don't think it is practical to have a setting (that users have to enable) for access the non-Javascript version of individual features. Being Javascript an integral part of HTML5 I'd consider a very simple fallback that avoids work duplication and maintenance. For example, making the language button to link to the list of links on the Wikidata page in such cases.

The Wikidata sitelink list MUST NOT be the fallback, for the simple reason that Wikidata sitelinks and interlanguage links are not 100% the same, there are several cases when they differ:

  • Third-party wikis that don’t use Wikidata. I very much hope that you don’t want to make the new default skin of MediaWiki unusable on third-party wikis.
  • Pages on WMF wikis that cannot be connected to Wikidata (user pages, Special:RecentChanges etc.).
  • Pages that are connected to Wikidata, but have some wikitext interlanguage links (e.g. links to sections where no redirect exists on the target wiki that could be connected to Wikidata, or complicated cases where all articles are about slightly different topics, so there are several Wikidata items, but it still makes sense to connect them with interlanguage links).

While it’s not a must, it would be good to keep it as a user option as well, for the above reasons, plus some additional ones:

  • The code-based alphabetized list may not be intuitive at first, but for someone who got used to it years ago, it’s not less usable than a native name-based or per-continent native name-based one. In fact, it may be more intuitive, as that’s what one’s used to.
  • ULS is slow. On my computer, it may take a few seconds after opening it for it to be usable, while the non-ULS-based list is immediately usable.

The Wikidata sitelink list MUST NOT be the fallback, for the simple reason that Wikidata sitelinks and interlanguage links are not 100% the same, there are several cases when they differ:

Thanks for sharing your perspective. I agree that Wikidata cannot be a complete alternative for 100% of the cases. However, I think that the fragmentation a setting like this introduce has a cost. Especially when users will have the languages they look for right there in the "suggested languages" section (and searching is the most common access path when they don't). I think the efforts to maintain two separate versions would be better spent towards making the default version faster instead.

This bug still exists if UniversalLanguageSelector is not installed on a wiki and/or JavaScript is disabled.

Thanks for sharing your perspective. I agree that Wikidata cannot be a complete alternative for 100% of the cases. However, I think that the fragmentation a setting like this introduce has a cost. Especially when users will have the languages they look for right there in the "suggested languages" section (and searching is the most common access path when they don't). I think the efforts to maintain two separate versions would be better spent towards making the default version faster instead.

Then can you at least share a code snippet that forces the non-compact list (even if it might stop working in the future)? I hate Compact Language Links so much it broke my willingness to switch to Vector 2022.

Change 851593 abandoned by Nik Gkountas:

[mediawiki/extensions/UniversalLanguageSelector@master] Compact language list setting should be hidden for Vector 2022 skin

Reason:

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

ngkountas subscribed.