Page MenuHomePhabricator

RTL support in Special:Contributions link
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Assigned To
Authored By
dom_walden
Feb 18 2025, 11:38 AM
Referenced Files
F58521418: 2025-02-28_12-12-48.png
Feb 28 2025, 8:21 PM
F58521416: 2025-02-28_12-12-07.png
Feb 28 2025, 8:21 PM
F58521412: 2025-02-28_12-10-18.png
Feb 28 2025, 8:21 PM
F58521409: 2025-02-28_12-13-15.png
Feb 28 2025, 8:21 PM
F58505262: 2025-02-26_08-58-42.png
Feb 26 2025, 5:05 PM
F58505259: 2025-02-26_08-57-41.png
Feb 26 2025, 5:05 PM
F58505253: 2025-02-26_08-52-58.mp4.gif
Feb 26 2025, 5:05 PM
F58505147: 2025-02-26_08-40-32.mp4.gif
Feb 26 2025, 5:05 PM

Description

What is the problem?

In the Special:Contributions link below the target input, some usernames do not look correct in RTL. I think they need to be wrapped in <bdi> element like we use in other places. This particularly effects temporary account usernames, where the tilde appears on the wrong side.

I also notice that the target input does not support RTL well either. This seems to be a wider bug.

Steps to reproduce problem
  1. https://test.wikipedia.beta.wmflabs.org/wiki/Special:Block/~2024-20310?uselang=he

Expected behaviour: The link ~תרומות של 2024-20310
Observed behaviour: The link is תרומות של ~2024-20310

Environment

Wiki(s): https://test.wikipedia.beta.wmflabs.org MediaWiki 1.44.0-alpha (4a859d0) 09:52, 18 February 2025.

Screenshots

How a temporary username looks in Special:Block:

rtl_contributions.png (93×666 px, 5 KB)

How it should look for comparison, from the top of Special:Contributions:

rtl_comparison.png (29×174 px, 2 KB)

Derived Requirement

The Special:Contributions link displayed below the target input on Special:Block should correctly support RTL (right-to-left) languages by ensuring usernames, particularly temporary accounts, are wrapped in a <bdi> element to maintain correct text direction.

Additionally, the target input field on Special:Block should properly support RTL input.

Test Steps

Test Case 1: Ensure Special:Contributions Link Displays Correctly in RTL

  1. Navigate to Special:Block on an RTL-language wiki (e.g., Hebrew).
  2. Enter a temporary username (e.g., ~2024-20310) in the target input field.
  3. Observe the Special:Contributions link displayed below the input field.
  4. ✅❓❌⬜ AC1: Confirm that the username is correctly wrapped in a <bdi> element and appears in the correct order (e.g., ~תרומות של 2024-20310).

Test Case 2: Ensure Target Input Field Supports RTL Properly

  1. Navigate to Special:Block on an RTL-language wiki (e.g., Hebrew).
  2. Enter a temporary username (e.g., ~2024-20310) in the target input field.
  3. ✅❓❌⬜ AC2: Confirm that the text input aligns correctly for RTL and the tilde (~) remains on the correct side of the username.

QA Results - Test Wiki

ACStatusDetails
1T386700#10592358
2T386700#10592358

Event Timeline

Change #1121462 had a related patch set uploaded (by HMonroy; author: HMonroy):

[mediawiki/core@master] Special:Block [Codex]: add RTL support in Special:Contributions link

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

This comment was removed by dmaza.

Change #1121462 merged by jenkins-bot:

[mediawiki/core@master] Special:Block [Codex]: add RTL support in Special:Contributions link

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

@dom_walden We did notice that the username text field shows the ~ on the wrong side in RTL language as well. This is also happening in Special:Contributions so we are going to leave the username textfield alone for now.

@HMonroy Question regarding AC2. The tilde is on the correct spot for the contribution link but it's not on the target search and warning. The tilde stays in the same spot even when you select the correct way in the suggestion name.

  • In Chrome-Minerva, it doesn't show the warning and also has the same issue with the suggestion name tilde not changing.
  • Firefox Monobook, no information shows up at all
  • Safari Timeless- name shows up on the wrong side.

Test Result - Beta|Prod

Status:❌ FAIL AC2
Environment: TestWiki
OS: macOS Sonoma 15.3.1
Browser: Chrome 133, Firefox 135, Safari 18.3
Device: MBA
Emulated Device: NA

Test Artifact(s):
https://test.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Block/~2024-20310&uselang=he
https://test.wikipedia.beta.wmflabs.org/wiki/Special:Block/~2024-20310?title=Special:Block/~2024-20310&uselang=he&useskin=monobook
https://test.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Block/~2024-20310&uselang=he&useskin=timeless

Test Steps

Test Case 1: Ensure Special:Contributions Link Displays Correctly in RTL

  1. Navigate to Special:Block on an RTL-language wiki (e.g., Hebrew).
  2. Enter a temporary username (e.g., ~2024-20310) in the target input field.
  3. Observe the Special:Contributions link displayed below the input field.
  4. AC1: Confirm that the username is correctly wrapped in a <bdi> element and appears in the correct order (e.g., ~תרומות של 2024-20310).

2025-02-26_08-37-32.png (752×1 px, 150 KB)

Test Case 2: Ensure Target Input Field Supports RTL Properly

  1. Navigate to Special:Block on an RTL-language wiki (e.g., Hebrew).
  2. Enter a temporary username (e.g., ~2024-20310) in the target input field.
  3. AC2: Confirm that the text input aligns correctly for RTL and the tilde (~) remains on the correct side of the username.
Chrome- Vector

2025-02-26_08-40-32.mp4.gif (752×938 px, 522 KB)

Chrome- MinervaFirebox- MonobookSafari- Timeless
2025-02-26_08-52-58.mp4.gif (756×1 px, 411 KB)
2025-02-26_08-57-41.png (777×1 px, 153 KB)
2025-02-26_08-58-42.png (746×1 px, 123 KB)

Change #1123465 had a related patch set uploaded (by HMonroy; author: HMonroy):

[mediawiki/core@master] Special:Block [Codex]: add RTL support to already blocked message

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

The already blocked error message also needs RTL support.

Good catch @GMikesell-WMF !

Change #1123465 merged by jenkins-bot:

[mediawiki/core@master] Special:Block [Codex]: add RTL support to already blocked message

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

@HMonroy Confirmed that RTL support us now with the username and "already blocked message" as seen in the screenshots below. I will now mark this as Resolved. Thanks for all your work!
UPDATE:

  • Search bar tilde per conversation is fine being on the other side
  • Firefox- Monobook info is running.
  • RTL support to already blocked message

Test Result - TestWiki

Status:✅ PASS
Environment: TestWiki
OS: macOS Sonoma 15.3.1
Browser: Chrome 133, Firefox 135, Safari 18.3
Device: MBA
Emulated Device: NA

Test Artifact(s):
https://test.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Block/~2024-20310&uselang=he
https://test.wikipedia.beta.wmflabs.org/wiki/Special:Block/~2024-20310?title=Special:Block/~2024-20310&uselang=he&useskin=monobook
https://test.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Block/~2024-20310&uselang=he&useskin=timeless

Test Steps

Test Case 1: Ensure Special:Contributions Link Displays Correctly in RTL

  1. Navigate to Special:Block on an RTL-language wiki (e.g., Hebrew).
  2. Enter a temporary username (e.g., ~2024-20310) in the target input field.
  3. Observe the Special:Contributions link displayed below the input field.
  4. AC1: Confirm that the username is correctly wrapped in a <bdi> element and appears in the correct order (e.g., ~תרומות של 2024-20310).

2025-02-26_08-37-32.png (752×1 px, 150 KB)

Test Case 2: Ensure Target Input Field Supports RTL Properly

  1. Navigate to Special:Block on an RTL-language wiki (e.g., Hebrew).
  2. Enter a temporary username (e.g., ~2024-20310) in the target input field.
  3. AC2: Confirm that the text input aligns correctly for RTL and the tilde (~) remains on the correct side of the username.

Search bar is fine how it is but the RTL support to already blocked message is now woking

Chrome- VectorChrome- MinervaFirebox- MonobookSafari- Timeless
2025-02-28_12-13-15.png (716×965 px, 120 KB)
2025-02-28_12-10-18.png (431×977 px, 73 KB)
2025-02-28_12-12-07.png (603×757 px, 103 KB)
2025-02-28_12-12-48.png (477×707 px, 76 KB)
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.