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] Improve codemod for v7 #11650

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

oliviertassinari
Copy link
Member

No description provided.

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation v7.x labels Jan 10, 2024
If you want to run the codemods one by one, check out the codemods included in the [preset-safe codemod for data grid](https://github.com/mui/mui-x/blob/master/packages/x-codemod/README.md#preset-safe-for-data-grid-v700) for more details.
If you want to run the codemods one by one, check out the codemods included in the [preset-safe codemod for data grid](https://github.com/mui/mui-x/blob/HEAD/packages/x-codemod/README.md#preset-safe-for-data-grid-v700) for more details.
Copy link
Member Author

@oliviertassinari oliviertassinari Jan 10, 2024

Choose a reason for hiding this comment

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

Wrong link. I think we want to always point to the latest active codebase, so HEAD.

npx @mui/x-codemod v7.0.0/pickers/preset-safe <path>
npx @mui/x-codemod@next v7.0.0/pickers/preset-safe <path>
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines -119 to +120
- <DateCalendar defaultCalendarMonth={dayjs('2022-04-01')};
+ <DateCalendar referenceDate{dayjs('2022-04-01')} />
-<DateCalendar defaultCalendarMonth={dayjs('2022-04-01')};
+<DateCalendar referenceDate{dayjs('2022-04-01')} />
Copy link
Member Author

@oliviertassinari oliviertassinari Jan 10, 2024

Choose a reason for hiding this comment

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

The format with the space looks weird. Same reason why we write:

console.log(foo);

and not:

 console.log(foo);

+ cellSelection
- cellSelectionModel={{ 0: { id: true, currencyPair: true, price1M: false } }}
Copy link
Member Author

Choose a reason for hiding this comment

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

Missing unstable_

@oliviertassinari
Copy link
Member Author

I opened a PR rather than pushing straight to HEAD to make sure this passes the CI. These changes are straightforward, merging.

@oliviertassinari oliviertassinari merged commit fed0300 into mui:next Jan 11, 2024
19 checks passed
@oliviertassinari oliviertassinari deleted the codemod-v7 branch January 11, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants