Page MenuHomePhabricator

Select: limit text length with ellipsis when it exceeds the maximum
Open, Stalled, MediumPublic

Description

Background

NOTE: We should not start this task until T364928: [Spike] Investigate ellipsis truncation in Codex components using Tooltip is completed.

In the current Select in Codex, the text wraps to a second line when the text exceeds the maximum of the first line. As decided in T359636: Define an approach to content overflow in Codex components, Select and Button will be maximum of one text line and will use an ellipsis in case the text exceeds. The entire text will be visible using a Tooltip.

Captura de pantalla 2023-09-28 a las 19.44.38.png (812×1 px, 94 KB)
Captura de pantalla 2023-09-28 a las 19.45.59.png (834×1 px, 95 KB)
Current implementationProposal

Previous implementations

Design spec

Open questions

  • Our overflow guidelines for truncation with ellipsis state “Include tooltip support for truncated text, enabling users to access full”.

Tooltip is limited to pointer devices. We should expand the guidelines here.

Acceptance criteria (or Done)

Design

  • Design the Figma spec sheet and add it in this task
  • Update the component in the Codex Figma library. This step will be done by a DST member.
  • Include this maximum limitation in the Select Guidelines

Code

  • Fix Select component in Codex
    • Ensure that full text is available as tooltip and aria-label(?)

Details

Related Changes in Gerrit:

Event Timeline

CCiufo-WMF triaged this task as Medium priority.Sep 29 2023, 5:48 PM
CCiufo-WMF moved this task from Inbox to Design Upcoming on the Design-System-Team board.
bmartinezcalvo moved this task from Design Upcoming to Up Next on the Design-System-Team board.

The Select Figma component is already set to be maximum one line text, so this task is ready to be fixed in Codex. @CCiufo-WMF moving it to Up next to work on it on future sprints.

I think we need to discuss this in the more general context of T358948 and T337865. I was planning to create an umbrella task or Epic to tackle this. We should think about truncation holistically instead of component by component.

Change #1038909 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[design/codex@main] Select: Limit text length with ellipsis

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

I see one usability concern with ellipsis in Select as is. You can't see what the full label of the Select is anywhere anymore. I'm not convinced that we're taking away a good boundary for designers/developers to actually think about a proper (internationalized) label firsthand. @bmartinezcalvo

In addition to above comment, while AT users still have access to the full label, touch screen users wouldn't with a browser default tooltip only solution.

I see one usability concern with ellipsis in Select as is. You can't see what the full label of the Select is anywhere anymore.

You can see the full label of the selected option inside the dropdown.

You can't see the full original label of the Select, but you already can't see it after selecting any option (it goes away irreversibly), so that label can't be used for anything important anyway. We shouldn't bother adding a tooltip for it. Real labels already need to use a Field wrapper.