[material-ui][Grid] Update Grid props to match PigmentGrid
Summary
This PR updates the Grid v2 API to match the upcoming Pigment Grid, so they are interchangeable.
Changes
- Grid API changes explained here: https://github.com/mui/material-ui/pull/42742/files#diff-c55db4ddcf075fc8361b2c85811c886426a5eb61f6bcb1b70046009b2517ffc9R155
- Added codemod for the changes
- Updated docs
- Ran codemod on codebase
Argos failures
The Argos failures are expected as the docs demos labels changes, but please review them as well to check if there's anything you wouldn't expect.
Not covered
There's room for improvement in the Grid's docs structure, and we should also discuss if we should stabilize it, but the scope of this PR is already big so I don't want to cover these here. I created issues for this:
- https://github.com/mui/material-ui/issues/42761
- https://github.com/mui/material-ui/issues/42762
Netlify deploy preview
- docs/data/joy/components/grid/grid.md
- docs/data/material/components/grid2/grid2.md
- docs/data/material/migration/migrating-to-v6/migrating-to-v6.md
- docs/data/system/components/grid/grid.md
- docs/data/system/migration/migrating-to-v6/migrating-to-v6.md
Bundle size report
Details of bundle changes (Toolpad) Details of bundle changes
Generated by :no_entry_sign: dangerJS against 186c18ec91a868eb15f1c1ac22758c2261aa600f
@danilo-leal may I ask you to review the marketing pages updates? To check everything is still working as expected 😊
I think the demos should not change so that it verifies the implementation change
I pushed a temporary commit (https://github.com/mui/material-ui/pull/42742/commits/b3b22f722a7a91fe647b5858db56ad70e3570af6) so that it runs the Argos tests and verifies the implementation, and the test succeeded: https://app.argos-ci.com/mui/material-ui/builds/29397/96799521
To me, it's fine to show xs=8 instead of size=8 etc.
I think the updated labels match better with the new API, though, so after the successful test, I reverted the changes back (https://github.com/mui/material-ui/pull/42742/commits/186c18ec91a868eb15f1c1ac22758c2261aa600f)
This way, we have the improved demos, and we verified with Argos, best of both worlds 😉
Also, I had to do some minor refactoring (https://github.com/mui/material-ui/pull/42742/commits/f5b67465909966d52394778d1ed12775ae9d55ee) after https://github.com/mui/material-ui/pull/42693 was merged. In case you want to review it again.
@siriwatknp
Also, I had to do some minor refactoring (f5b6746) after #42693 was merged. In case you want to review it again.
Looks good to me 🚀