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

[Fix] Bring experimental_sx back with error code #35528

Merged
merged 5 commits into from Dec 20, 2022

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Dec 19, 2022

close #35501

To prevent the import error for those who install Material UI 5.10.x without an explicit MUI system.


@siriwatknp siriwatknp added package: system Specific to @mui/system package: material-ui Specific to @mui/material labels Dec 19, 2022
@mui-bot
Copy link

mui-bot commented Dec 19, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35528--material-ui.netlify.app/

Details of bundle changes

Generated by 🚫 dangerJS against 1349d74

export function experimental_sx() {
throw new MuiError(
'MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.' +
'You should remove the import and replace the usage with `theme.unstable_sx(…same value you pass to experimental_sx)` instead.',
Copy link
Member

Choose a reason for hiding this comment

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

Is there a specific reason why we don't use the same error message?

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel a bit strange linking the MUI system to Material UI docs.

Copy link
Member

Choose a reason for hiding this comment

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

Alright fair enough. Should we keep ""MUI: The experimental_sx has been moved to theme.unstable_sx.For more details, see #35150" instead of the current value. There are three new error messages in error-codes.js

Copy link
Member Author

Choose a reason for hiding this comment

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

fine for me.

Comment on lines 21 to 24
"20": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.For more details, see https://github.com/mui/material-ui/pull/35150",
"21": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.To migrate, see https://mui.com/material-ui/customization/theme-components/#the-sx-syntax-experimental",
"22": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.You should remove the import and replace the usage with `theme.unstable_sx(…same value you pass to experimental_sx)` instead.",
"23": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.For more details, see https://github.com/mui/material-ui/pull/35150."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"20": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.For more details, see https://github.com/mui/material-ui/pull/35150",
"21": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.To migrate, see https://mui.com/material-ui/customization/theme-components/#the-sx-syntax-experimental",
"22": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.You should remove the import and replace the usage with `theme.unstable_sx(…same value you pass to experimental_sx)` instead.",
"23": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.For more details, see https://github.com/mui/material-ui/pull/35150."
"20": "MUI: The `experimental_sx` has been moved to `theme.unstable_sx`.For more details, see https://github.com/mui/material-ui/pull/35150."

I believe this is sufficient now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, my bad. I thought that the script would reset and collect the new one.

@siriwatknp siriwatknp merged commit c992293 into mui:master Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: material-ui Specific to @mui/material package: system Specific to @mui/system
Projects
None yet
3 participants