Page MenuHomePhabricator

Refine styling of ZMultilingualString component
Open, In Progress, MediumPublicBUG REPORT

Description

Description

Here I'm listing some styling concerns I can observe in this component. Please take these critically, they are just observations which definitely need to be filtered out by design.

  1. "n languages" button is highlighted at the same level as the one in the about widget, which makes it feel not really integrated at the level of the Multilingual string component.

Screenshot from 2025-09-25 17-23-09.png (967×1 px, 72 KB)

Goal: make this cta more integrated at the level it is in. Maybe it should not be bold, maybe it should not be a button but a link. Not sure.


  1. vertical separation between elements seems unbalanced.

2.a. Items in the monolingual list are very stuck together, while they generally have a bigger separation in other parts of default view. Having some slight separation between items means that buttons from an item are not stuck to the item above, as seen in the captures below.

multilingual text componentlist of monolinguals
Screenshot from 2025-09-25 19-06-20.png (195×286 px, 10 KB)
Screenshot from 2025-09-25 17-29-38.png (227×296 px, 12 KB)
Screenshot from 2025-09-25 19-07-05.png (322×367 px, 16 KB)
Screenshot from 2025-09-25 19-07-28.png (289×390 px, 11 KB)
Screenshot from 2025-09-25 19-08-43.png (499×371 px, 28 KB)
Screenshot from 2025-09-25 19-10-25.png (455×359 px, 24 KB)

2.b. cta "n languages" button spacing from the list is the same as its separation from the item below, which doesn't help identifying what block this button is related to.

Screenshot from 2025-09-25 19-15-13.png (216×274 px, 16 KB)

Goal: in general give this component and its items some breathing space to make it easier to identify components and their elements.


  1. T405900: Language dialog search bar: close button should only be visible when search field is focused

Related, but seems to be a previous issue in the About widget component, which we had not detected till now. Still, mentioning here for traceability.


  1. [ + ] button seems unnecessary. Do we really need to keep this button while there's already a add new language path (through the languages button).

The path to add a new monolingual item using the language button should also be promoted, as it is much safer, and avoids the possibility of users adding monolinguals with empty languages.

Screenshot from 2025-09-29 13-38-03.png (434×376 px, 16 KB)

Goal: if a user path adds no value, it should not exist. If a user path, apart from not adding any value, it in turn adds more risk, more reasons for it not to exist!


Completion checklist

Event Timeline

2a: fixed
2b: I changed some spacing here aswell. But up to gregory to review if this is ok.
3: done
4: i leave that to gregory

Change #1191016 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] ZMultilingualStringDialog: use server-side language mapping to get language labels

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

Change #1191016 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ZMultilingualStringDialog: use server-side language mapping to get language labels

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

@gengh Regarding 1, the page will benefit if the load more button is a bit quieter because the button is going to be appearing multiple times with multiple lists and may be distracting from the content.

To reduce the prominence, we could make the button quiet neutral. But one problem with quiet neutral is that it doesn't look like a button till you hover (not possible in mobile), this is exacerbated by the fact that the button label isn't an action like 'View all'. So users may not know it is a button until they click on it. If we go with this we might have to change the copy.

Screenshot 2025-10-02 at 1.58.48 PM.png (1×2 px, 244 KB)

Another option is to use the small button created by @DSmit-WMF and I, and use @font-weight-normal.

Screenshot 2025-10-02 at 4.08.30 PM.png (1×2 px, 266 KB)

For 4, the problem with removing the add button is that it is not obvious that to add a language you have to search for it first, then add it. Users might click on the language button, scroll through the list of languages. If the language they want is not there, they will not know how to add it because there is no add button there. They may not search first. We can add an "Add" button that shows by default on the language dialog, but it will not solve the problem of the possibility of users adding monolinguals with empty languages that you mentioned.
We can't rely on searching to add alone.

Let me know what you think @gengh

Change #1208323 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] Refine styling of ZMultilingualString component

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

DSmit-WMF changed the task status from Open to In Progress.Fri, Nov 21, 12:31 PM
DSmit-WMF claimed this task.

Change #1208323 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Refine styling of ZMultilingualString component

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