Page MenuHomePhabricator

Improve the UX of the Keyboard Selector
Open, Stalled, LowPublic2 Estimated Story Points

Description

There are several user experience improvements that would benefit the jQuery-based keyboard selector.

Steps to reproduce the issue with keyboard selector visibility:

  1. Go to any Wikimedia wiki (e.g., English Wikipedia).
  2. Make sure you are logged in, as the keyboard selector currently only appears for logged-in users.
  3. Click once inside the search bar at the top of the page.
    • Expected Result: The keyboard icon should appear next to the search bar.
    • Actual Result: The keyboard icon does not appear.
  4. Click a second time in the search bar.
    • Actual Result: The keyboard icon now appears, allowing the user to select a keyboard layout.
  5. Click outside the keyboard selector window or leave it inactive for a few moments.
    • Actual Result: The keyboard icon disappears, requiring the user to click in the search bar again to make it reappear.

Screenshot 2024-11-13 at 3.23.14 PM.png (1×1 px, 180 KB)

Here are a few suggestions for improvements:

  • Button visibility on first click: Currently, when a user first clicks in the search bar on a Wikimedia wiki (e.g., English Wikipedia), the keyboard button that opens the keyboard selector doesn’t appear. It only shows up after the second click in the search bar. Ideally, the button should be visible from the first click to streamline the user experience.
  • Button size and persistence: The current keyboard button is small and easy to miss, especially since it disappears after clicking outside the selector window or following a period of inactivity. Making this button larger, more prominent, and persistent would make it easier for users to discover and use.
  • Enhanced discoverability: Improving the visibility of this keyboard button by making it bolder and more noticeable would help users identify its function more quickly, enhancing usability.
  • Availability for all users: At present, the keyboard selector is only accessible to logged-in users. Ideally, it would be available to non-logged-in users as well.

These changes would make the keyboard selector more intuitive and accessible across Wikimedia projects.

Event Timeline

1. Desktop view

Please put the "gear" icon on the sidebar.

I'm used to monobook skin, and in every page, there's always the gear button on the sidebar (image, bottom left)

image.png (727×394 px, 59 KB)

For non-logged in users (which I think need to be supported), as well as vector-2022 users, the gear button is hidden and non-intuitive

image.png (664×708 px, 40 KB)

I suggest, instead of hiding it, the gear button can be displayed more prominently on the right sidebar ("Appearance" sidebar), alongside "Text" and "Width").
Not moved, but duplicated both in the language dropdown, and Appearance sidebar.

Alternatively, put the gear icon next to the "translate" icon, there's a lot of space anyway, so it will always displayed, never hidden.

Availability for logged-out user:

  • I tested it, and it works (image)

image.png (526×945 px, 71 KB)

2. Mobile view

Testing both as logged in and logged out users, the ULS selector didn't came out, either in the search bar, or when I edit a page.

Additional observation regarding the keyboard selector visibility:

The behavior varies across different wikis:

  • English Wikipedia: Keyboard button remains completely invisible regardless of multiple clicks in the search bar
  • Mediawiki & Hindi or other lang Wikipedia: It appears inconsistently—sometimes on first click, usually on second click

This suggests the issue might be more complex than initially reported and possibly related to wiki-specific configurations or language settings. Could we investigate why the keyboard selector is completely absent on English Wikipedia while partially functional on other wikis?

Change #1115938 had a related patch set uploaded (by Vanshajgupta37; author: Vanshajgupta37):

[mediawiki/extensions/UniversalLanguageSelector@master] Improve the UX of the Keyboard Selector

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

Change #1115938 had a related patch set uploaded (by Vanshajgupta37; author: Vanshajgupta37):

[mediawiki/extensions/UniversalLanguageSelector@master] Improve the UX of the Keyboard Selector

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

Patch updated and ready for review.
@Hridyesh_Gupta

Please do not duplicate notifications by pinging. There already was a notification 2 minutes before here (which you quoted). Thanks.

abi_ changed the task status from Open to In Progress.Feb 10 2025, 1:58 PM
abi_ triaged this task as Medium priority.
abi_ set the point value for this task to 2.
abi_ subscribed.

I'd like to scope this task (or bug) to fixing the issue with the ime selector not appearing on a single click when using Vector 2022. The other items listed can be tackled separately.

I'd like to scope this task (or bug) to fixing the issue with the ime selector not appearing on a single click when using Vector 2022. The other items listed can be tackled separately.

The needful will be done very soon @abi_. Thanks for the guidance.

I'd like to scope this task (or bug) to fixing the issue with the ime selector not appearing on a single click when using Vector 2022. The other items listed can be tackled separately.

The needful will be done very soon @abi_. Thanks for the guidance.

Thanks. Moving this back to ready for dev until there is something more to review here.

Nikerabbit lowered the priority of this task from Medium to Low.Mar 11 2025, 1:45 PM

Summary as of 2025-04-08

Patch: 1115938: ime: Ensure selector appears on 1st click in searchbox on Vector 2022 | https://gerrit.wikimedia.org/r/c/mediawiki/extensions/UniversalLanguageSelector/+/1115938

On https://en.wikipedia.org/wiki/Main_Page?useskin=vector-2022, when you click on the search bar, the ime selector does not appear but if you hover out, and then focus on search bar again, you'll see it.

You can see the issue here: https://phabricator.wikimedia.org/F58383072

I believe this happens because Vector 2022 loads the search module dynamically and replaces the initial textbox with the search component.

Comments from @Jdlrobson:

I wouldn't recommend using #p-search [type="search"] as that could change at any given time as it isn't a stable interface (https://www.mediawiki.org/wiki/Stable_interface_policy/Frontend)

It seems like the following would be useful to make this request for the web team for a more long term solution:

  1. hook that fires when search is focused
  2. hook that fires when search results are shown would be helpful here for making sure it always shows in the correct position.

Once those hooks are added, we can use them instead of using #p-search [type="search"]

Nikerabbit changed the task status from In Progress to Stalled.Apr 14 2025, 11:30 AM

Change #1115938 abandoned by Nikerabbit:

[mediawiki/extensions/UniversalLanguageSelector@master] ime: Ensure selector appears on 1st click in searchbox on Vector 2022

Reason:

abandoning this while waiting for a better hook

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