Make WordPress Core

Opened 20 months ago

Last modified 3 weeks ago

#60770 assigned enhancement

TimeZone select box compatibility with RTL directions

Reported by: farhad0's profile farhad0 Owned by: audrasjb's profile audrasjb
Milestone: 7.0 Priority: normal
Severity: normal Version: 6.5
Component: I18N Keywords: has-patch has-screenshots has-test-info dev-feedback needs-testing
Focuses: tests, rtl, administration Cc:

Description

This patch fixes the time zone select box compatibility with RTL directions It sets auto direction which makes the options value compatible with both RTL and LTR directions

Attachments (3)

timezone-select-box-rtl-compatibility.jpg (116.6 KB) - added by farhad0 20 months ago.
timezone-select-box-rtl-compatibility-before-after
rtl_before.png (44.0 KB) - added by drysand 20 months ago.
rtl_after.png (43.1 KB) - added by drysand 20 months ago.

Download all attachments as: .zip

Change History (17)

This ticket was mentioned in PR #6268 on WordPress/wordpress-develop by @farhad0.


20 months ago
#1

This patch fixes the time zone select box compatibility with RTL directions It sets auto direction which makes the options value compatible with both RTL and LTR directions

Trac ticket: https://core.trac.wordpress.org/ticket/60770

---

#2 @swissspidy
20 months ago

  • Keywords needs-testing-info needs-screenshots added

@farhad0 Could you perhaps add before/after screenshots so that others looking at this ticket can better understand the problem you're trying to solve? Thanks!

@farhad0
20 months ago

timezone-select-box-rtl-compatibility-before-after

#3 @farhad0
20 months ago

  • Keywords has-screenshots added; needs-screenshots removed

@swissspidy
Hi,
Here you are

Version 0, edited 20 months ago by farhad0 (next)

@drysand
20 months ago

@drysand
20 months ago

#4 @drysand
20 months ago

i tested the patch and it does indeed align english text LTR and RTL text RTL, however it seems to align all the optiongroup headers LTR no matter the language

sorry about the separate images, im still getting used to trac

#5 @sabernhardt
7 months ago

#63184 was marked as a duplicate.

#6 @sabernhardt
7 months ago

  • Component changed from Administration to I18N
  • Milestone changed from Awaiting Review to 6.9
  • Owner set to audrasjb
  • Status changed from new to assigned

In RTL (fa-IR):

  • PR 6268 aligns every optgroup plus 'UTC' and all UTC offset options to the left, and the other options align right.
  • PR 8600 aligns the options for 'UTC' and the UTC offsets to the left, but all optgroup labels and most options align to the right.

I would like to consider using the same alignment for the 'UTC' optgroup and its option (I prefer both aligned left in Firefox but both on the right seems better in Chrome).

#7 @farhad0
7 months ago

@sabernhardt
Hi,
The Chrome detects the direction of the text and align it automatically,
This is a way which many modern applications use and this works on Chrome and may be some other browsers

#8 @SirLouen
6 months ago

  • Keywords has-test-info dev-feedback added; needs-testing-info removed

Updating keywords to reflect current status.

This ticket was mentioned in Slack in #core by wildworks. View the logs.


7 weeks ago

#10 @khoipro
7 weeks ago

  • Focuses tests added
  • Keywords needs-testing added

I agreed with @farhad0 so we should have test if the modern browsers already support alignment without any extra code.

#11 @olmostblue
5 weeks ago

Hi, I have tested this fix with Chrome, Safari, Comet and Firefox.
Everything works fine on Firefox, all the rtl text are aligned to right and latin text on the left like in the After screenshot.
With Safari and Chromium based browser all the texts in the select options are aligned to the right.

Last edited 5 weeks ago by olmostblue (previous) (diff)

This ticket was mentioned in Slack in #core by welcher. View the logs.


3 weeks ago

#13 @welcher
3 weeks ago

  • Milestone changed from 6.9 to 7.0

6.9 Beta 1 is tomorrow and this doesn't look to be ready so I'm going to move it to the 7.0 milestone.

#14 @farhad0
3 weeks ago

@welcher

Hi,
This issue tested and it's ready
Please review that again
Thank you

Note: See TracTickets for help on using tickets.