Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date/Time picker: ensure hour/minute fields are always shown left to right #16375

Merged
merged 2 commits into from Jul 26, 2019

Conversation

@adamsilverstein
Copy link
Contributor

commented Jul 1, 2019

Fix an issue where right to left languages showed the hour and minute fields reversed, with the minutes on the left instead of the hours.

Fixes #16373.

Description

CSS change: set the direction for the .components-datetime__time-field class.

How has this been tested?

Published a post after setting my profile to use Hebrew.

Verified the hour field shown to the left of the minute field.

Screenshots

After this PR, my post published at 8:44am shows correctly in an RTL language:
image

Types of changes

CSS: set the time field order to ltr regardless of page direction.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
@jorgefilipecosta
Copy link
Member

left a comment

Hi @adamsilverstein, in my tests, with these changes the design of the am/pm buttons gets broken in RTL languages:
image

I think if we apply the direction style to the class components-datetime__time-field-time instead of components-datetime__time-field the problem gets solved.

@adamsilverstein

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2019

@jorgefilipecosta Thanks for testing, not sure how I missed that :) Fixed in 683bf21, can you please re-test?

@swissspidy swissspidy requested a review from jorgefilipecosta Jul 2, 2019

@jorgefilipecosta
Copy link
Member

left a comment

LGTM 👍

@youknowriad youknowriad merged commit 45c3169 into master Jul 26, 2019

1 of 3 checks passed

Filter merged Filter merged
Details
Filter merged Filter merged
Details
Travis CI - Pull Request Build Passed
Details

@youknowriad youknowriad deleted the fix/rtl-time branch Jul 26, 2019

@youknowriad youknowriad added this to the Gutenberg 6.2 milestone Jul 26, 2019

sbardian added a commit to sbardian/gutenberg that referenced this pull request Jul 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.