Skip to content

chore: export isRTL utility function #8619

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

Merged
merged 1 commit into from
Jul 25, 2025
Merged

chore: export isRTL utility function #8619

merged 1 commit into from
Jul 25, 2025

Conversation

yihuiliao
Copy link
Member

Closes #6985

seems like we said it was okay some time ago? i don't really remember the conversation tho lol

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@@ -18,6 +18,7 @@ export {useDateFormatter} from './useDateFormatter';
export {useNumberFormatter} from './useNumberFormatter';
export {useCollator} from './useCollator';
export {useFilter} from './useFilter';
export {isRTL} from './utils';
Copy link
Member

Choose a reason for hiding this comment

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

Seems fine, however, i was looking at their example, couldn't they just move the i18n provider outside of the html element then consume useLocale to get the direction? then there's no worry about it not updating accidentally or something like that?

@yihuiliao yihuiliao added this pull request to the merge queue Jul 25, 2025
Merged via the queue into main with commit 5643fd7 Jul 25, 2025
31 checks passed
@yihuiliao yihuiliao deleted the export-rtl-function branch July 25, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose isRTL utility function
3 participants