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

[docs-infra] Fix @mui/material version used in sandboxes #13260

Merged

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented May 27, 2024

From @mui/monorepo we get next as the resolved version to be used in sandboxes, which is perfectly valid for them.
But @mui/x packages support only v5 releases of @mui/material.
This ensures consistency between docs demos and the opened sandbox examples (StackBlitz or CodeSandbox).

Before

Screenshot 2024-05-27 at 10 41 27

After

Screenshot 2024-05-27 at 10 41 40

@LukasTy LukasTy added the scope: docs-infra Specific to the docs-infra product label May 27, 2024
@LukasTy LukasTy requested review from a team May 27, 2024 07:42
@LukasTy LukasTy self-assigned this May 27, 2024
// #default-branch-switch
// Check which version of `@mui/material` should be resolved when opening docs examples in StackBlitz or CodeSandbox
newDeps['@mui/material'] =
versions['@mui/material'] !== 'next' ? versions['@mui/material'] : 'latest';
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've gone with a solution, which still allows monorepo to provide a specific @mui/material version, but if you think that we should just go for simplicity—we can do that. 👌

-versions['@mui/material'] !== 'next' ? versions['@mui/material'] : 'latest';
+'latest';

@mui-bot
Copy link

mui-bot commented May 27, 2024

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

Generated by 🚫 dangerJS against bfd6e00

Copy link
Member

@MBilalShafi MBilalShafi left a comment

Choose a reason for hiding this comment

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

Thank you. LGTM

@LukasTy LukasTy merged commit 769b00e into mui:master May 27, 2024
17 checks passed
@LukasTy LukasTy deleted the fix-material-package-version-in-sandboxes branch May 27, 2024 12:22
DungTiger pushed a commit to DungTiger/mui-x that referenced this pull request Jul 23, 2024
thomasmoon pushed a commit to thomasmoon/mui-x that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants