Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[core] Support @mui/utils v6 #14867

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Oct 8, 2024

Feel free to change the PR title, this fix applies to all mui-x products not just DataGrid

closes #14866

Root cause

From https://codesandbox.io/p/sandbox/elegant-tree-xspyf2?file=%2Finitialize.ts%3A5%2C1,

It's the inconsistency of @mui/utils version.

  • @mui/material => @mui/utils v6
  • @mui-x/data-grid => @mui/utils v5

That's why configuring the classNameGenerator from @mui/material (using @mui/utils v6) does not affect DataGrid which is using @mui/utils v5.

@siriwatknp siriwatknp requested review from a team and michelengelen October 8, 2024 01:57
@siriwatknp siriwatknp added the bug 🐛 Something doesn't work label Oct 8, 2024
Copy link
Member

@michelengelen michelengelen left a comment

Choose a reason for hiding this comment

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

LGTM, but I would like to wait for one more review on this, since I am not aware of all implications this might have.

@michelengelen michelengelen requested review from cherniavskii and LukasTy and removed request for cherniavskii October 8, 2024 06:59
@LukasTy LukasTy added the core Infrastructure work going on behind the scenes label Oct 8, 2024
@LukasTy LukasTy changed the title Support @mui/utils v6 [core] Support @mui/utils v6 Oct 8, 2024
@mui-bot
Copy link

mui-bot commented Oct 8, 2024

Deploy preview: https://deploy-preview-14867--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 20f38a6

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

I've forked the mentioned CodeSandbox and installed a build from this branch.
Class name generation works as expected. 👍

Thank you for taking care of it! 🙏

@@ -42,7 +42,7 @@
},
"dependencies": {
"@babel/runtime": "^7.25.7",
"@mui/utils": "^5.16.6"
"@mui/utils": "^5.16.6 || ^6.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

I had to expand @mui/utils version flexibility on some additional libraries to avoid duplicate downloads (i.e. @mui/x-internals package is used by many other packages).

Copy link
Member

Choose a reason for hiding this comment

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

Nice spot!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🐛 Something doesn't work core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Unstable_ClassNameGenerator (mui v6) didn't transform DataGrid classes
4 participants