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

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

Closed
shadigaafar opened this issue Nov 5, 2021 · 3 comments · Fixed by #43126
Assignees
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@shadigaafar
Copy link

shadigaafar commented Nov 5, 2021

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

@stevenlinx stevenlinx added [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. labels Nov 5, 2021
@shadigaafar
Copy link
Author

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

@t-hamano
Copy link
Contributor

t-hamano commented Aug 10, 2022

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 t-hamano added [Package] Components /packages/components Internationalization (i18n) Issues or PRs related to internationalization efforts and removed Needs Testing Needs further testing to be confirmed. labels Aug 10, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 10, 2022
@t-hamano
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants