-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[pickers] Remove the defaultCalendarMonth
prop
#10987
[pickers] Remove the defaultCalendarMonth
prop
#10987
Conversation
defaultCalendarMonth
prop
Deploy preview: https://deploy-preview-10987--material-ui-x.netlify.app/ Updated pages: |
58f8a14
to
ea53fa0
Compare
3a577c3
to
a9c07de
Compare
For me you can remove
Not sure it's worth creating a codemod if not in preset-safe. The reason is that I'm reading the breaking change. If I need to think, it's better to have the part of the codebase using it under my eyes. So I would prefer to do a search in the codebase to know where I'm using |
docs/data/migration/migration-pickers-v6/migration-pickers-v6.md
Outdated
Show resolved
Hide resolved
docs/data/migration/migration-pickers-v6/migration-pickers-v6.md
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. I forgot to deprecate this prop when releasing
referenceDate
. Do you think it's a good enough reason to postpone its removal to v8? The migration toreferenceDate
is very straightforward and the prop is not widely used so I'd say it's fine but if you want we can keep it another year.
WDYT about deprecated it after the fact - add the deprecation in v5 just now.
Imagine users using v6 maybe for 6 or 12 months after the release of new stable. They'd see the deprecation warning and potentially migrate to the referenceDate
before upgrading to v7. 🤔
2. Should we codemod it and add it to the
preset-safe
? This is not a 1-on-1 behavior since thereferenceDate
also applies to other views, so it could lead to unwated behavior. Should we create the codemod but let people run it if they want?
I'd be in favor of creating the codemod if it's not that difficult. 🤔
As for adding it into the preset-safe
. Well, that's debatable. We could omit it just for the sake of complete correctness, although, I'd imagine, that almost no one would mind the slight change of behavior. 🙈 🤷
docs/data/migration/migration-pickers-v6/migration-pickers-v6.md
Outdated
Show resolved
Hide resolved
docs/data/migration/migration-pickers-v6/migration-pickers-v6.md
Outdated
Show resolved
Hide resolved
docs/data/migration/migration-pickers-v6/migration-pickers-v6.md
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/MobileDatePicker/tests/MobileDatePicker.test.tsx
Show resolved
Hide resolved
To deprecate it on the next v6 patch? |
Yes, that's exactly my idea. 🤔 |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Co-authored-by: Lukas <[email protected]> Signed-off-by: Flavien DELANGLE <[email protected]>
Co-authored-by: Lukas <[email protected]> Signed-off-by: Flavien DELANGLE <[email protected]>
Co-authored-by: Lukas <[email protected]> Signed-off-by: Flavien DELANGLE <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👏
Closes #10986
I have two questions here:
I forgot to deprecate this prop when releasing
referenceDate
. Do you think it's a good enough reason to postpone its removal to v8? The migration toreferenceDate
is very straightforward and the prop is not widely used so I'd say it's fine but if you want we can keep it another year.Should we codemod it and add it to the
preset-safe
? This is not a 1-on-1 behavior since thereferenceDate
also applies to other views, so it could lead to unwated behavior. Should we create the codemod but let people run it if they want?Changelog
Breaking changes
The deprecated
defaultCalendarMonth
prop has been removed in favor of the more flexiblereferenceDate
prop.