Skip to content

Add support for MUI v6 - #10439

Merged
slax57 merged 13 commits into
nextfrom
mui-6
Jan 13, 2025
Merged

Add support for MUI v6#10439
slax57 merged 13 commits into
nextfrom
mui-6

Conversation

@djhi

@djhi djhi commented Jan 8, 2025

Copy link
Copy Markdown
Contributor

Problem

MUI v6 is out.

Solution

  • Add support for MUI v6. Follow Add support for React 19 #10437
  • react-admin packages will still use v5 in their devDependencies to ensure we don't use v6 only features inadvertently.
  • The tutorial and e-commerce demo will use v6 so that we have an easy way to test v6

How To Test

Works with MUIv5

  • build the RA packages locally from this branch
  • create a new react-admin app: npm init react-admin react-admin-v6
  • add the MUI deps: npm add @mui/material@^5.16.12 @mui/icons-material@^5.16.12
  • copy the built packages to the react-admin-v6/node_modules directory
  • Run the app & check your lock file

Works with MUIv6

  • change the previous app MUI dependencies to ^6.0.0
  • npm install
  • Run the app & check your lock file

Additional Checks

  • The PR targets master for a bugfix, or next for a feature

Comment thread packages/ra-ui-materialui/src/Labeled.tsx Outdated
export const LocalesMenuButtonClasses = {};

const Root = styled(Box, {
const Root = styled('div', {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread packages/ra-ui-materialui/src/button/LocalesMenuButton.tsx Outdated
@djhi djhi added RFR Ready For Review and removed WIP Work In Progress labels Jan 9, 2025
Comment on lines +146 to +147
<ListItem disablePadding>
<ListItemButton

@slax57 slax57 Jan 10, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any changes in the CRM should be backported to https://github.com/marmelab/atomic-crm.

Besides, why do you need those changes? To my understanding, the MUI version used by the CRM demo shouldn't have changed, right?

UPDATE: I take it you kept those changes to prepare the compatibility with MUI v6, so I'm OK to keep them. But still, you'll need to open a PR to backport them to marmelab/atomic-crm.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those changes work in v5 too. We were using deprecated features that have been removed in v6. I'd rather address them now than forget them

Comment thread packages/ra-input-rich-text/src/buttons/LevelSelect.tsx
Comment thread packages/ra-no-code/src/ApplicationsDashboard/ApplicationsDashboard.tsx Outdated
Comment thread packages/ra-ui-materialui/src/Labeled.tsx Outdated
Comment thread yarn.lock Outdated
Comment thread examples/simple/src/tags/TagList.tsx Outdated
@slax57 slax57 added this to the 5.5.0 milestone Jan 13, 2025
@slax57
slax57 merged commit fd587d8 into next Jan 13, 2025
@slax57
slax57 deleted the mui-6 branch January 13, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants