Page MenuHomePhabricator

Longer language strings break out of language selector interface
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
eamedina
Feb 7 2025, 2:50 PM

Description

Steps to replicate the issue (include links if applicable):

  • Go to the Content Translation dashboard
  • Click on the language selector to change language
  • Type in "el" and select "словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ"

What happens?:

This language string happens to be long enough that it breaks out of the language selector interface (when viewed on mobile)

image.png (1×646 px, 313 KB)

What should have happened instead?:

The language string should not break out of the UI. A possible solution could be applying a text ellipsis (...)

Derived Requirement

  • The language selector interface in the Content Translation dashboard should properly display long language names without breaking out of the UI.
  • If a language name is too long to fit within the designated UI space, it should be truncated with an ellipsis (...).
  • The issue should be tested on mobile to ensure correct display in constrained layouts.
Test Steps

Test Case 1: Verify Long Language Strings Do Not Overflow in the Language Selector

  1. Open the Content Translation dashboard.
  2. Click on the language selector to open the language selection interface.
  3. Type "el" in the search bar and select "словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ".
  4. ✅❓❌⬜ AC1: Confirm that the language name does not break out of the UI.
  5. ✅❓❌⬜ AC2: Confirm that if the language name exceeds the available space, it is truncated with an ellipsis (...).

QA Results - Test Wiki

ACStatusDetails
1T385884#10621464
2T385884#10621464

Event Timeline

ngkountas renamed this task from Longer language strings break out of ULS interface to Longer language strings break out of language selector interface.Feb 7 2025, 2:54 PM
ngkountas triaged this task as High priority.
ngkountas moved this task from Needs Triage to Bugs on the ContentTranslation board.

Change #1118530 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Unified dashboard: Use ellipsis for overflown text in language selector

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

Change #1118530 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Unified dashboard: Use ellipsis for overflown text in language selector

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

Change #1120157 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20250217

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

Change #1120157 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20250217

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

@ngkountas When switching to mobile, the name does not truncate with an ellipsis, as seen in the gif.

Test Result - TestWiki

Status: ❌ FAIL
Environment:TestWiki
OS: macOS Sonoma 15.3.1
Browser: Chrome 133
Device: MBA
Emulated Device: Mobile

Test Artifact(s):

https://test.m.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=cu

https://test.m.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&from=en&to=cu&filter-type=automatic&filter-id=previous-edits

Test Steps

Test Case 1: Verify Long Language Strings Do Not Overflow in the Language Selector

  1. Open the Content Translation dashboard.
  2. Click on the language selector to open the language selection interface.
  3. Type "el" in the search bar and select "словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ".
  4. AC1: Confirm that the language name does not break out of the UI.

{F58480834}

  1. AC2: Confirm that if the language name exceeds the available space, it is truncated with an ellipsis (...).

See AC1

Change #1122941 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Dashboard language selector buttons: Increase specificity to apply style

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

Change #1122941 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Dashboard language selector buttons: Increase specificity to apply style

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

Change #1124141 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20250303

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

Change #1124141 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20250303

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

@ngkountas Confirmed that the language name does not break out of the UI and truncates with an ellipsis as seen in the gif. I will move this to sign-off. Thanks for all your work!

Test Result - TestWiki

Status: ✅ PASS
Environment:TestWiki
OS: macOS Sonoma 15.3.1
Browser: Chrome 133
Device: MBA
Emulated Device: Mobile

Test Artifact(s):

https://test.m.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=cu

https://test.m.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&from=en&to=cu&filter-type=automatic&filter-id=previous-edits

Test Steps

Test Case 1: Verify Long Language Strings Do Not Overflow in the Language Selector

  1. Open the Content Translation dashboard.
  2. Click on the language selector to open the language selection interface.
  3. Type "el" in the search bar and select "словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ".
  4. AC1: Confirm that the language name does not break out of the UI.

2025-03-10_14-33-10.mp4.gif (740×1 px, 1 MB)

  1. AC2: Confirm that if the language name exceeds the available space, it is truncated with an ellipsis (...).

See AC1

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.
Pginer-WMF subscribed.

For the reference breakpoints the adaptation of the language selector works as expected for the narrow and wide cases.

cbk-zam.m.wikipedia.org_w_index.php_title=Especial_Traducci%C3%B3n_de_contenidos&active-list=suggestions&filter-id=previous-edits&filter-type=automatic&from=en&sx=true&to=cbk-zam(Wiki Mobile).png (568×320 px, 77 KB)
cbk-zam.m.wikipedia.org_w_index.php_title=Especial_Traducci%C3%B3n_de_contenidos&active-list=suggestions&filter-id=previous-edits&filter-type=automatic&from=en&sx=true&to=cbk-zam(Wiki Tablet).png (1×768 px, 182 KB)
cbk-zam.m.wikipedia.org_w_index.php_title=Especial_Traducci%C3%B3n_de_contenidos&active-list=suggestions&filter-id=previous-edits&filter-type=automatic&from=en&sx=true&to=cbk-zam(Wiki Tablet) (1).png (768×1 px, 156 KB)

Around 750px wide, the language selector is intended to go next to the header, however a long language name can cause the selector to move to a new line. In this case, it would have been preferred for the language label to be cropped with ellipsis. Illustrated below for reference:

CurrentPreferred
ca.wikipedia.org_w_index.php_title=Special_ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=cbk-zam (1).png (824×750 px, 177 KB)
ca.wikipedia.org_w_index.php_title=Special_ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=cbk-zam.png (824×750 px, 177 KB)

Given this seems more of an edge case, we can consider fixing if there is a simple/quick solution (e.g., adjusting max-width of the selector element) otherwise it can be documented for the future.