material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[material-ui][Grid] Update Grid props to match PigmentGrid

Open DiegoAndai opened this issue 1 year ago • 3 comments

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

DiegoAndai avatar Jun 24 '24 15:06 DiegoAndai

@danilo-leal may I ask you to review the marketing pages updates? To check everything is still working as expected 😊

DiegoAndai avatar Jun 26 '24 16:06 DiegoAndai

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

DiegoAndai avatar Jun 28 '24 17:06 DiegoAndai

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 🚀

siriwatknp avatar Jul 01 '24 03:07 siriwatknp