Skip to content

[Demo] Fix UI glitches due to multiple conflicting MUI packages#10464

Merged
fzaninotto merged 1 commit intomasterfrom
fix-demo-multiple-mui-packages
Jan 23, 2025
Merged

[Demo] Fix UI glitches due to multiple conflicting MUI packages#10464
fzaninotto merged 1 commit intomasterfrom
fix-demo-multiple-mui-packages

Conversation

@djhi
Copy link
Contributor

@djhi djhi commented Jan 23, 2025

Problem

Following release 5.5, the demo shows larger padding than usual. This is because multiple conflicting versions of MUI packages are loaded. This only happens in the monorepo though.

image

instead of
image

Solution

Use Vite aliases to force the resolution of MUI packages to the ones installed in the demo project.

How To Test

  • Run the demo
  • Notice the padding is back to normal

Additional Checks

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

'node_modules/@mui/icons-material'
),
},
// we need to manually follow the symlinks for local packages to allow deep HMR
Copy link
Member

Choose a reason for hiding this comment

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

How about the core MUI packages, which are indirect dependencies ? And how about other major dependencies overridden in the demo package.json (react and react-router)?

Copy link
Contributor Author

@djhi djhi Jan 23, 2025

Choose a reason for hiding this comment

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

The core MUI packages are resolved from the MUI packages that require them. In our case, the packages from the demo node_modules. I haven't seen multiple react-router packages loaded (neither in vite, nor in the node_modules)

@fzaninotto fzaninotto merged commit b6cd03a into master Jan 23, 2025
16 checks passed
@fzaninotto fzaninotto deleted the fix-demo-multiple-mui-packages branch January 23, 2025 09:16
@fzaninotto fzaninotto added this to the 5.5.1 milestone Jan 23, 2025
@fzaninotto fzaninotto changed the title Fix demo has multiple conflicting MUI packages [Demo] Fix UI glitches due to multiple conflicting MUI packages Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Development

Successfully merging this pull request may close these issues.

2 participants