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] codemod not updating Grid #43621

Closed
shifoc opened this issue Sep 5, 2024 · 3 comments · Fixed by #43794
Closed

[material-ui][Grid] codemod not updating Grid #43621

shifoc opened this issue Sep 5, 2024 · 3 comments · Fixed by #43794
Assignees
Labels
component: Grid The React component. docs Improvements or additions to the documentation

Comments

@shifoc
Copy link

shifoc commented Sep 5, 2024

Steps to reproduce

codemod is not migrating grid to grid2

Current behavior

No response

Expected behavior

No response

Context

No response

Your environment

System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
pnpm: Not Found
Browsers:
Chrome: Not Found
Edge: Chromium (127.0.2651.74)
npmPackages:
@emotion/react: ^11.13.3 => 11.13.3
@emotion/styled: ^11.13.0 => 11.13.0
@mui/core-downloads-tracker: 6.0.2
@mui/icons-material: ^6.0.2 => 6.0.2
@mui/material: ^6.0.2 => 6.0.2
@mui/private-theming: 6.0.2
@mui/styled-engine: 6.0.2
@mui/system: 6.0.2
@mui/types: 7.2.16
@mui/utils: 5.16.6
@mui/x-date-pickers: ^7.15.0 => 7.15.0
@types/react: ^18.3.4 => 18.3.4
react: ^18.3.1 => 18.3.1
react-dom: ^18.3.1 => 18.3.1
typescript: ^4.9.5 => 4.9.5

Search keywords: grid grid2

@shifoc shifoc added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 5, 2024
@DiegoAndai DiegoAndai self-assigned this Sep 5, 2024
@DiegoAndai DiegoAndai changed the title codemod not updating Grid to Grid2 [Grid] codemod not updating Grid Sep 5, 2024
@DiegoAndai DiegoAndai added the component: Grid The React component. label Sep 5, 2024
@DiegoAndai DiegoAndai changed the title [Grid] codemod not updating Grid [material-ui][Grid] codemod not updating Grid Sep 5, 2024
@DiegoAndai DiegoAndai added the docs Improvements or additions to the documentation label Sep 5, 2024
@DiegoAndai
Copy link
Member

DiegoAndai commented Sep 5, 2024

Hey @shifoc! Thanks fro the report.

The v6.0.0/grid-v2-props won't update the Grid, only Grid2. If you are migrating from Grid to Grid2, then the steps are:

  1. Change the imports:
    -import Grid from '@mui/material/Grid';
    +import Grid from '@mui/material/Grid2';
  2. Run the codemod
    npx @mui/codemod@latest v6.0.0/grid-v2-props <path/to/folder>
    

Can you confirm if this is working for you?

@DiegoAndai DiegoAndai removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 5, 2024
@shifoc
Copy link
Author

shifoc commented Sep 6, 2024

Property 'item' does not exist on type 'IntrinsicAttributes & GridBaseProps & { sx?: SxProps<Theme> | undefined; } & SystemProps<Theme> & Omit<...>'.ts(2769)

it changed xs={12} to size={12} but item is still there

Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @shifoc! How was your experience with our support team?
If you could spare a moment, we'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Grid The React component. docs Improvements or additions to the documentation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants
@DiegoAndai @shifoc and others