Page MenuHomePhabricator

Implement UX to select natural language one reads and edits Wikifunctions
Closed, ResolvedPublic

Assigned To
Authored By
DVrandecic
Jul 10 2023, 5:06 PM
Referenced Files
F37136691: image.png
Jul 12 2023, 8:27 AM
F37136690: image.png
Jul 12 2023, 8:27 AM
F37136031: image.png
Jul 11 2023, 2:54 PM
F37136029: image.png
Jul 11 2023, 2:54 PM
F37136021: image.png
Jul 11 2023, 2:54 PM

Description

The following design sketch is suggested to be implemented:

Such as on Wikidata, on the very top have the language icon with the current setting next to it (e.g. English). This is clickable / tappable.

When actioned on, we get a modal with a text ("Select a language"), a language selector (based on our ZObjectSelector but restricted to languages), and a cancel action (e.g. a X in the corner or a cancel button) and an action button (Switch? OK?) that activates once a language is selected.

Once the language is selected, it takes us to the version of the given page in the respective language (The respective patterns are currently being implemented in T268678 )

It is OK if that link for now only works in Vector22 and is not immediately supported in Minerva. We will set up the default mobile skin to be Vector22. It has to work in both Vector22 and Minerva.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

here's a minimal design proposal, that builds on top of the existing zobject selector, filtered down to objects of type language.

  1. in the top navigation we could display a codex quiet button (with icon) displaying the current language (and icon-only button on smaller viewports).

image.png (1×2 px, 290 KB)

  1. on tap/click we display a lookup component where users can pick a language via a search. in the expanded menu we also display the UN6 languages as suggested items. for recurring editors, it might be beneficial to display as suggested items the languages they contributed to most often.

image.png (1×2 px, 350 KB)

  1. on search, we display results ordered alphabetically. if users select a result, we switch the UI language, and the content language to the selected language. if they move the focus out of the lookup, we switch back to the previous state.

image.png (990×2 px, 189 KB)

link to the figma file https://www.figma.com/file/SXfLGEz8sRZYtwA5gX7zHr/T341500-Natural-language-selector?type=design&node-id=31%3A11797&mode=design&t=Kpd3SDzOeNC6j8Ta-1

Approved the design. Ready for implementation.

Change 932025 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Implement Special:ViewZObject to provide a Special page version of NS0

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

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

[mediawiki/skins/Vector@master] Do not hardcode uls key

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

Change 940373 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Do not hardcode uls key

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

Change 932025 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Implement Special:ViewObject to provide a Special page version of NS0

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

Change 941950 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] [WIP] Implement user control to change language for Special:ViewObject

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

Change 943508 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Create standalone JS module with language selector for page header

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

Change 941950 abandoned by Jforrester:

[mediawiki/extensions/WikiLambda@master] [WIP] Implement user control to change language for Special:ViewObject

Reason:

Going with Ia69f75c9e358d451ee8232dc66e067a3ce174e73

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

Change 943508 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Create standalone JS module with language selector for page header

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

Change 942738 had a related patch set uploaded (by Jforrester; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.19] Create standalone JS module with language selector for page header

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

Change 942738 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.19] Create standalone JS module with language selector for page header

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