-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Cover Block: Keep the inner contents in a physical direction even in RTL languages #43663
Conversation
Size Change: -70 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @t-hamano 👍
Unfortunately, it doesn't appear to be working for me, assuming I'm not doing something wrong following your test instructions.
The frontend doesn't maintain the physical direction selected within the editor. Here's an example of some of what I'm seeing.
Screen.Recording.2022-09-06.at.12.12.10.pm.mp4
@aaronrobertshaw |
Or, CSS cache might be applied on the front-end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for confirming the test instructions @t-hamano.
Or, CSS cache might be applied on the front end.
What wasn't in the video I recorded for my last comment was that I had dev tools open for each of the tabs and caching disabled.
After restarting my local environment and rebuilding Gutenberg, this is working for me. Apologies for the false alarm.
Click for long video of some re-testing
Screen.Recording.2022-09-07.at.11.30.31.am.mp4
Impact on Consumers
This change flips the position of the inner contents from left to right on sites where the RTL language is applied. Is this impact acceptable?
I'm not sure about what impact is acceptable and what isn't. At the least, I'd say we need to communicate this change. Perhaps @annezazu might be able to offer some insight around the best approach if we choose to proceed landing this change.
For the moment, I'll optimistically approve this PR.
Thank you for the re-test, @aaronrobertshaw! I would like to merge this change because I think it is reasonable. |
@t-hamano Thanks to you its on our radar for the WordPress 6.1 release, and we'll add it to the Field Guide or a Misc Dev note together with other Block editor updates. Thanks for the great work on this PR! |
@bph The cover block now keeps the inner contents in its physical direction to prioritize its original function, regardless of the language orientation. |
This comment is a bit too short, for even a paragraph in a dev note that hasn't been written yet. @jorgefilipecosta @t-hamano are you working on an overall dev note to add this to? Or am I missing something? |
Fix #43625
Follow-up on #43126
What?
This PR physically fixes the position of the content in the cover block, regardless of language direction.
Why?
See: #43625 (comment)
How?
I applied
direction: ltr
to the cover block in the RTL language by usin thertl:raw
comment.However, the direction of the language should be taken into account in the inner content, so in
.wp-block-cover__inner-container
,direction:rtl
is applied only for RTL languages.At the same time, the quick fix done in #43126 was removed as it was no longer needed.
Testing Instructions
Screenshots or screencast
This is an example of setting the inner content to the bottom right.
Impact on Consumers
This change flips the position of the inner contents from left to right on sites where the RTL language is applied. Is this impact acceptable?