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

[ScrollArea] Read DirectionProvider and use logical positioning CSS props #1194

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Dec 20, 2024

Fixes #1189

RTL horizontal scroll area demo: https://codesandbox.io/p/sandbox/eloquent-nightingale-s74566

@mui-bot
Copy link

mui-bot commented Dec 20, 2024

Netlify deploy preview

https://deploy-preview-1194--base-ui.netlify.app/

Generated by 🚫 dangerJS against 008e97d

@mj12albert mj12albert marked this pull request as ready for review December 20, 2024 10:26
@@ -35,10 +38,10 @@ const ScrollAreaRoot = React.forwardRef(function ScrollAreaRoot(

const contextValue = React.useMemo(
() => ({
dir,
direction,
Copy link
Member

Choose a reason for hiding this comment

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

I am curious, what's the benefit of adding the direction in a context, when each subcomponent that need it can read the DirectionProvider's context?

Copy link
Member Author

Choose a reason for hiding this comment

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

what's the benefit of adding the direction in a context

It doesn't need to be in the root context anymore, I've updated this ~

@mj12albert mj12albert merged commit 8f8b583 into mui:master Jan 2, 2025
23 checks passed
@mj12albert mj12albert deleted the fix/scrollarea-dir branch January 2, 2025 06:09
onehanddev pushed a commit to onehanddev/base-ui that referenced this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ScrollArea] Does not read DirectionProvider for rtl
4 participants