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
[Snackbar] Remove RTL
direction specific logic
#32808
Conversation
I wanted to check this same thing when reviewing #31991 today. cc @ZeeshanTamboli The changes makes sense 👍 Let's just make sure we don't break this again in the future by adding a screenshot test. You can follow what is done in https://github.com/mui/material-ui/blob/master/test/regressions/fixtures/Tooltip/PositionedTooltipsRtl.js and add a new one under |
@mnajdova thanks for the link. I added those regression files |
Preview to test manually: https://deploy-preview-32808--material-ui.netlify.app/material-ui/react-snackbar/#main-content |
I will take a look. Will remove the |
RTL
direction specific logic
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.
I've just improved the regression tests, the rest looks great. Thanks for the contribution 👌
Background
The Mui page guidelines for RTL are to use the
stylis-plugin-rtl
(https://mui.com/material-ui/guides/right-to-left/) which handles rewriting directional css properties automatically. With RTL being handled within the component,stylis
will assume LTR styles, even though they are already RTL. So it transforms the styles, which will result in LTR.To avoid this issue, one has to remove RTL handling within the component.
Fixes #32794