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

[material-ui][Grid v1] Fix regression spacing prop with string value #44376

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Nov 11, 2024

closes #44321

Regression from #42574, test added.

@siriwatknp siriwatknp added component: Grid The React component. regression A bug, but worse labels Nov 11, 2024
@mui-bot
Copy link

mui-bot commented Nov 11, 2024

Netlify deploy preview

https://deploy-preview-44376--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 90a91d1

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Solution looks good 👍🏼 just have a question regarding the test

@@ -746,7 +746,7 @@ describe('Material UI <Grid />', () => {
generateRowGap({
ownerState: {
container: true,
rowSpacing: { xs: 1, sm: 2 },
rowSpacing: { xs: 1, sm: '16px' },
Copy link
Member

@DiegoAndai DiegoAndai Nov 11, 2024

Choose a reason for hiding this comment

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

Shouldn't we keep the sm: 2 test as well instead of replacing it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added md: '16px' instead.

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@siriwatknp siriwatknp merged commit 981b033 into mui:master Nov 13, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Grid The React component. regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In v6, Grid columnSpacing misbehaves with string pixel values like "16px"
3 participants