Skip to content

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

Merged
mj12albert merged 3 commits into
mui:masterfrom
mj12albert:fix/scrollarea-dir
Jan 2, 2025
Merged

[ScrollArea] Read DirectionProvider and use logical positioning CSS props#1194
mj12albert merged 3 commits into
mui:masterfrom
mj12albert:fix/scrollarea-dir

Conversation

@mj12albert

@mj12albert mj12albert commented Dec 20, 2024

Copy link
Copy Markdown
Member

Fixes #1189

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

@mj12albert mj12albert added type: bug It doesn't behave as expected. component: scroll area Changes related to the scroll area component. labels Dec 20, 2024
@mui-bot

mui-bot commented Dec 20, 2024

Copy link
Copy Markdown

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
const contextValue = React.useMemo(
() => ({
dir,
direction,

Copy link
Copy Markdown
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
Copy Markdown
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
@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

component: scroll area Changes related to the scroll area component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scroll area] Does not read DirectionProvider for rtl

4 participants