Page MenuHomePhabricator

Avoid text truncation where possible in OOUI/Codex
Closed, DuplicatePublicBUG REPORT

Description

This is how a dialog from VisualEditor is displayed in Russian:
https://ru.wikipedia.org/wiki/Фасмер,_Макс?veaction=edit

image.png (561×881 px, 44 KB)

In Russian, the text in two of the panel labels says ‘Additional se...’ and ‘Used te...’. At the same time, there is more than enough space to avoid this sort of text truncation. I think that in such cases this sort of text truncation should be entirely avoided, and modern Codex style guide should clarify that text truncation should be the last resort if there is really no space in a component. Although this is probably fine in English, in Russian this makes it a degrading experience for people who wouldn’t entirely know that the text hides ‘settings’ and ‘templates’.

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald Transcript

This is one of the reasons I plan to avoid using OO.ui.BookletLayout in one of my scripts and switch to OO.ui.IndexLayout. Or hack into OO.ui.MenuLayout. For me, this has nothing to do with specific languages. The worst part is that you can't even see the full name on hover. Basically, you are left to guess what's in the part after the ellipsis.

We are sort of already tracking this in T337865, although that's specific to buttons and it sounds like you're request general guidelines on truncation (as opposed to a specific solution for one type of use case).

I think button wrapping is valid to handle separately from general truncation. Since in the buttons, there can be some instances where you cannot put entire button text on the available screen space (e. g. the button in the example screenshot above). Though I would argue that in the ideal world even such cases should be handled by adapting design in the languages where the button gets truncated, or fixing the word usage, etc., and not cutting off text that can be valuable to understanding what the button in question does.

I agree there are two components to this:

  • Providing best practices in the guidelines to avoid situations where truncation happens at all.
  • Providing good built-in tooling for truncation when it is used. There should always be some way to see the entirety of the text being truncated, like through a tooltip as suggested in T337865.

I'm going to close this as a duplicate of the newly created T359636 which I hope will address the issues raised in this task.

It is strange to me to close the older task as a duplcate of the newer one, but alright.