-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
RangeControl: RTL rendering issue #29519
Comments
@hellofromtonya Haii! That's really helpful! Thank you 🙏 I looked into it, and I can confirm the bug. As you noted in your feedback, I've confirmed that the RTL check was based on language (coming from I can create a PR that resolves this issue for RangeControl. However, this (language based) RTL check is used in other parts of the JS code. I suspect the same issue would arise for those instances as well. |
@ItsJonQ Thank you. Would really appreciate you doing this. Update: PR #29522.
What and where should we looking and testing more broadly to surface where else these other potential instances are? |
It's tricky to say. If we do a search in the code for this https://github.com/WordPress/gutenberg/search?l=JavaScript&q=isrtl%28%29 From what I can see, it typically affects icons, position, and alignment for things. In the screenshot below, we can see the In this screenshot, notice how the Toolbar is docked to the left. This is via RTL Tester: However, if we were to swap the language (e.g. Arabic), you can see that it's correctly positioned on the right hand side: |
I'm removing this from the "must have" board, it's seems it's more related to the testing plugin, the actual production behavior is good. |
Thanks for your input @youknowriad ! Realistically, I think detecting RTL from language makes sense. I'm not sure of a realistic scenario where you'd force |
This issue was reviewed today during the Editor Bug Scrub. Given that it appears to be primarily related to the RTL testing plugin, we have decided to close this issue. If anyone feels differently, feel free to reopen and provide additional context. |
Recently, there were reports that the
RangeControl
component wasn't working currently for RTL.(via Slack, https://wordpress.slack.com/archives/C02QB2JS7/p1614770359426200)
When I test it locally at the latest
trunk
, it seemed to work okay:(Screenshot of Gutenberg running locally. Arabic set as the language. Cover block's Opacity slider is rendering correctly)
I've tested this with
release/10.1
andwp/truck
as well, but the range slider is working correctly in RTL for me (for multiple blocks).The text was updated successfully, but these errors were encountered: