gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

__experimentalBlockAlignmentMatrixControl : the positions of the dots should not change when RTL

Open shadigaafar opened this issue 3 years ago • 3 comments

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

  1. console log the values generated on change of __experimentalBlockAlignmentMatrixControl component.
  2. go to the block editor and test your block...
  3. see what has been generate when you change alignment
  4. flip html direction to RTL by changing to any RTL language.
  5. see if the values u get corresponds with UI dot's location.

Screenshots, screen recording, code snippet

image

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

shadigaafar avatar Nov 05 '21 02:11 shadigaafar

changing the label text for RTL is enough for fixing this problem.

shadigaafar avatar Nov 08 '21 17:11 shadigaafar

~~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

ltr

RTL language on Storybook

rtl

RTL language in cover block

cover

I think that to reverse the left and right display labels when in RTL language is the solution.

t-hamano avatar Aug 10 '22 13:08 t-hamano

@shadigaafar Thank you for submitting the issue. I have submitted #43126 to resolve this issue.

t-hamano avatar Aug 10 '22 15:08 t-hamano