Page MenuHomePhabricator

flip the location of Kartographer maximize and zoom buttons in RTL user interface
Closed, ResolvedPublic

Description

In the Hebrew translation of Kartographer help I see that the maps are aligned to the left by default. This is similar to the default alignment for images, and this is correct.

The UI inside the map is translated correctly to Hebrew. I'm referring to the tooltips on the zoom and maximize buttons and to the copyright text at the bottom.

So far so good.

However, the location of the maximize and zoom buttons should probably be flipped. The map is usable as-is, but the flipping should probably be consistent.

Event Timeline

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

Change 291100 had a related patch set uploaded (by JGirault):
Flip controls when the page is partially in RTL

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

The map seems to be rendering correctly when the entire page is in RTL (Hebrew).
The problem you mention only happens when the page is LTR (English) and only the webpage content is RTL (translating to Hebrew) (sounds a bit weird to me to have half of the page LTR, half RTL, but this seems to be the case during a translation - see example above).

Here is a screenshot with the patch applied:

Screen Shot 2016-05-26 at 1.55.27 PM.png (214×410 px, 94 KB)

Note to @Esanders : In this translation case, the OOui Dialog would open, but since it would be outside of the #bodyContent, it doesn't carry over the RTL context (.mw-content-rtl) so the popup is renderer LTR. This seems like something that must be supported/fixed within OOui Dialog.

Change 291100 merged by jenkins-bot:
Flip controls when the page is partially in RTL

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

Change 291112 had a related patch set uploaded (by JGirault):
Revert "Flip controls when the page is partially in RTL"

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

@Amire80 After a discussion with the team, we think the controls position should be based on UI language rather than content language.

  • In the case the UI+content is RTL, ResourceLoader flips the CSS properties so the map controls are flipped as expected. Example
  • In the case the UI is LTR (English) and the content is RTL (Hebrew), the map controls will be positioned LTR.
  • In the case the UI is RTL (Hebrew) and the content is LTR (English), the map controls will be positioned RTL. Example

@Amire80 Let us know if you see any issue with this decision.

@JGirault, thx, well put. Should the above patch be reverted or modified?

Change 291112 merged by jenkins-bot:
Revert "Flip controls when the page is partially in RTL"

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

JGirault claimed this task.