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

CustomSelectControl V2: fix trigger text alignment in RTL languages #62869

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Jun 26, 2024

What?

Part of #55023

Allow the text on the CustomSelectControlV2 trigger button to follow RTL text alignment.

Why?

Following user preferences when using the component in a RTL environment

How?

Using logical properties instead of physical (text-align: start instead of text-align: left)

Testing Instructions

  • Load storybook examples for CustomSelectControlV2
  • Via the Storybook top toolbar controls, change the text direction from LTR to RTL
  • Observe how the select trigger button label aligns correctly to the right (while on trunk is would stay on the left)

Screenshots or screencast

Before (trunk) After (this PR)
Screenshot 2024-06-26 at 13 29 50 Screenshot 2024-06-26 at 13 28 46

@ciampo ciampo force-pushed the fix/custom-select-control-v2-trigger-rtl branch from db175ac to 1db0cd3 Compare June 26, 2024 11:31
@ciampo ciampo self-assigned this Jun 26, 2024
@ciampo ciampo added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Jun 26, 2024
@ciampo ciampo marked this pull request as ready for review June 26, 2024 11:31
@ciampo ciampo requested a review from ajitbohra as a code owner June 26, 2024 11:31
@ciampo ciampo requested a review from a team June 26, 2024 11:31
Copy link

github-actions bot commented Jun 26, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks 🙏

@ciampo ciampo force-pushed the fix/custom-select-control-v2-trigger-rtl branch from 1db0cd3 to d524d09 Compare June 26, 2024 16:44
@ciampo ciampo enabled auto-merge (squash) June 26, 2024 16:44
Copy link

Flaky tests detected in d524d09.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9683547164
📝 Reported issues:

@ciampo ciampo merged commit cea3b8d into trunk Jun 26, 2024
61 checks passed
@ciampo ciampo deleted the fix/custom-select-control-v2-trigger-rtl branch June 26, 2024 17:19
@github-actions github-actions bot added this to the Gutenberg 18.8 milestone Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants