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

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

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

djhi
Copy link
Collaborator

@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

__dirname,
'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
Collaborator 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants