Page MenuHomePhabricator

interface Hebrew in left to right from written is query
Closed, ResolvedPublic

Description

(read the title from right to left)
When using Hebrew interface the query textbox is with RTL direction. However, the query is SPARQL query and should ALWAYS use LTR direction whatever is the interface language.

How to reproduce:

  1. https://query.wikidata.org/
  2. select Hebrew or Arabic as interface language
  3. Expected - All elements should swap direction (good!)
  4. Expected: The direction within elements having LTR content should be ltr. Actual: query-editor-container have RTL direction. (bad)

Event Timeline

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

yeah looks funny :) Definitely the edit box should not go RTL.

Also I see that tooltips on the vertical toolbar are on the wrong side for RTL, the submenus appear off-screen and the "Run" arrow arguably points the wrong direction.

On the results submenus alignments are weird - while icons appear (probably correctly) on the right, the menus are still aligned to the left, which creates very chaotic view. Same for the top toolbar menu - icons on the right, alignment to the left.

Also, tag cloud display in examples is kind of messed up - parentheses show up in wrong place.

This all was tested with Hebrew, but I assume every RTL language would have the same issues.

Smalyshev triaged this task as Medium priority.Jul 25 2017, 6:10 PM

BTW it is so broken that it would be better to de-feature it for now.

Change 382402 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[wikidata/query/gui@master] Force query editor and hints left-to-right

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

Jonas raised the priority of this task from Medium to Needs Triage.Oct 5 2017, 3:00 PM
Jonas edited projects, added Wikidata Query UI; removed Wikidata-Query-Service.
Jonas moved this task from Backlog to Doing on the Wikidata Query UI board.

Change 382402 merged by jenkins-bot:
[wikidata/query/gui@master] Force query editor and hints left-to-right

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

Is this how it should be?

image.png (423×1 px, 53 KB)

More or less yes. The most basic aliveness for it is having LTR for the code area/line numbers/cursor, and it looks like once Lucas patch is deployed it will be use-able in RTL languages.

There are some minor issues of much lower priority that we may want to address in the future like what Smalyshev pointed earlier, for example:

  • Splitter - dragging left moves it right and vise versa
  • Dropdown menus show left alignment (it may be valid for "tools", as tools have Latin names, and wrong for "help")
  • It may be more correct to have the arrow icon mirrored in RTL
  • X of the query helper should float left not right
  • Some RTL languages (Arabic, Persian) mirror the question mark for help. In others (Hebrew and probably Yiddish) the question mark is same as in LTR languages (e.g currently shows correct)

It may be more correct to have the arrow icon mirrored in RTL

Hm, I’m not sure about that… on https://mideastunes.com/, the arrow points to the right in both the English and the Arabic version. And on YouTube with language set to Arabic, the play button also points to the right. But perhaps this is another thing like the question mark, where it further depends on language?

X of the query helper should float left not right

float: inline-end is the magical CSS that does the right thing in both directionalities… and which is currently only supported by Firefox :(

Dropdown menus show left alignment (it may be valid for "tools", as tools have Latin names, and wrong for "help")

Also, I assume for the “Help” menu, the order of question mark icon, “help” text, and dropdown arrow should be reversed in rtl locales? (The “tools” button seems to handle this better.)

Change 382758 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[wikidata/query/gui-deploy@production] Merging from 045f94babc293704f10a98c8fdced0216fec7feb:

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

Change 382758 merged by Smalyshev:
[wikidata/query/gui-deploy@production] Merging from 045f94babc293704f10a98c8fdced0216fec7feb:

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

I created an extra ticket for the other issues, so we can close this one.
T178057: Wikidata Query UI: RTL Issues

Jonas moved this task from Doing to Done on the Wikidata Query UI board.