Page MenuHomePhabricator

Close button for value popup when editing statements in Wikidata is positioned incorrectly with RTL UI
Open, Needs TriagePublic

Description

To reproduce:

  1. Switch Wikidata to Hebrew UI.
  2. Go to https://www.wikidata.org/wiki/Q6639514
  3. Scroll to birth date (P569, "תאריך לידה").
  4. Add value (הוספת ערך).
  5. Type the date.

Expected: The close button (X, class="ui-icon-close") must be on the left-hand side of the box.

Observed: The close button appears on the right-hand side of the box and overlaps the "will be displayed as" label (הצג בתור). See screenshot:

צילום מסך 2018.02.15 ב.15.42.20.png (826×2 px, 102 KB)

This affects all datatypes which have a popup value box with a close button: Dates, monolingual text, coordinates, quantities

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Nikki renamed this task from In Wikidata, the placement of the close button date input box is placed incorrectly with RTL UI to Close button for value popup when editing statements in Wikidata is positioned incorrectly with RTL UI.Feb 6 2023, 12:54 AM
Nikki updated the task description. (Show Details)

The problem is lines 42-45 here: https://github.com/wikimedia/data-values-value-view/blob/master/lib/jquery.ui/jquery.ui.inputextender.css#L42-L45

CSSJanus already handles flipping the values, so line 23 is turned into left: 0 for RTL languages and then these lines unflip it again. Either lines 42-45 should be removed, or /* @noflip */ should be added for lines 23, 43 and 44 (depending on whether this code is supposed to be usable without CSSJanus or not).

I've added some CSS to Wikidata's common.css (diff) to make it display properly. Once this has been fixed, it can be removed again.