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

RadioGroup: Fix arrow key navigation in RTL #66202

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Oct 17, 2024

What?

Part of #64963

Respect writing direction when using arrow keys to navigate the tabs in the RadioGroup component

Why?

We should respect the writing direction

How?

using the rtl utility to detect writing direction, and passing that information to the underlying ariakit store

Testing Instructions

  • See default Storybook story for Tabs and TabPanel
  • Toggle the examples to RTL mode in the toolbar.
  • Test that arrow key navigation works as expected.

Screenshots or screencast

Before (trunk) After (this PR)
Kapture.2024-10-17.at.12.45.53.mp4
Kapture.2024-10-17.at.12.46.37.mp4

@ciampo ciampo added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Oct 17, 2024
@ciampo ciampo requested review from t-hamano and a team October 17, 2024 10:47
@ciampo ciampo self-assigned this Oct 17, 2024
@ciampo ciampo requested a review from ajitbohra as a code owner October 17, 2024 10:47
Copy link

github-actions bot commented Oct 17, 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 <[email protected]>
Co-authored-by: tyxla <[email protected]>

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

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Working well in my testing, thank you 🚀

packages/components/CHANGELOG.md Outdated Show resolved Hide resolved
@ciampo ciampo enabled auto-merge (squash) October 17, 2024 15:26
Copy link

Flaky tests detected in ed8fa51.
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/11388113216
📝 Reported issues:

@ciampo ciampo merged commit 4f405ac into trunk Oct 17, 2024
64 of 65 checks passed
@ciampo ciampo deleted the fix/radio-control-rtl-keyboard branch October 17, 2024 16:01
@github-actions github-actions bot added this to the Gutenberg 19.6 milestone Oct 17, 2024
karthick-murugan pushed a commit to karthick-murugan/gutenberg that referenced this pull request Nov 13, 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