-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[docs] Add RTL documentation for the pickers #13855
Conversation
Deploy preview: https://deploy-preview-13855--material-ui-x.netlify.app/ Updated pages: |
const theme = React.useMemo( | ||
() => createTheme({ direction: 'rtl' }, existingTheme), | ||
() => createTheme(existingTheme, { direction: 'rtl' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order was wrong, existingTheme
contains direction"=ltr"
so it overrode { direction: 'rtl' }
This, plus the missing stylis plugin meant that our UI was basically a mix of LTR and RTL on those demos.
@@ -397,11 +397,11 @@ export const MultiSectionDigitalClock = React.forwardRef(function MultiSectionDi | |||
return views; | |||
} | |||
const digitViews = views.filter((v) => v !== 'meridiem'); | |||
const result: TimeViewWithMeridiem[] = digitViews.toReversed(); | |||
digitViews.reverse(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.toReversed
is too recent, I avoid using it.
It was causing the following issue in the CI when building the doc:
9:25:02 AM: TypeError: ec.filter(...).toReversed is not a function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle CI is on Node 18, toReversed
is Node 20.
0473a98
to
78798de
Compare
db1bbba
to
24db72d
Compare
24db72d
to
b14ce33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Closes #11523
rtlPlugin
from stylis)dir="rtl"
on pickers (the view are inside a portal, so they were not impacted by thedir="rtl"
set in the demo)