gutenberg
gutenberg copied to clipboard
__experimentalBlockAlignmentMatrixControl : the positions of the dots should not change when RTL
Description
I tested it on RTL, and it says about the point that is "top left": "top right", even when console log the values, they are the in the opposite direction of dots:
though if you test it in cover block... the content aligns perfectly in the appropriate location as the dots... but i think that because who ever developed the cover block has used flex and flex direction change on RTL... but that is not the solution. cause now the tooltip text is different from the actual dot's location. so, I guess the direction of the dots should stay in one way for RTL and LTR...
Step-by-step reproduction instructions
- console log the values generated on change of __experimentalBlockAlignmentMatrixControl component.
- go to the block editor and test your block...
- see what has been generate when you change alignment
- flip html direction to RTL by changing to any RTL language.
- see if the values u get corresponds with UI dot's location.
Screenshots, screen recording, code snippet
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
changing the label text for RTL is enough for fixing this problem.
~~I tested this issue using the language direction switcher and RTL Tester on Storybook and was indeed able to reproduce it.~~
Note: In my environment, isRTL
function did not respond correctly when I changed to the RTL via RTL Tester.
Therefore, it may be necessary to actually change the WordPress site language and try it on the cover block instead of following the steps below.
LTR language on Storybook
RTL language on Storybook
RTL language in cover block
I think that to reverse the left and right display labels when in RTL language is the solution.
@shadigaafar Thank you for submitting the issue. I have submitted #43126 to resolve this issue.