-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] Add deprecations when importing pickers from the lab #32950
[pickers] Add deprecations when importing pickers from the lab #32950
Conversation
@material-ui/lab: parsed: +2.57% , gzip: +0.98% |
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.
I thought we already had these deprecations 😁
Could we expand on the PR's description of why we need to make the removal happen so soon (4 weeks/releases down the line)? It might have been discussed on Slack, but nobody from the community has access to this discussion. Thanks
I've also opened a follow-up PR to remove the pickers doc page under the Lab section -> #32961 |
@flaviendelangle Thanks for the context, so I assume it's meant to help fix mui/mui-x#4569. As far as I know, only Option 0 or Option C will solve mui/mui-x#4569 at the root. Here, removing the dependency on July 1st is what I assume is a step in Option A. Sure it will help with this problem but not solve the root, I'm not sure that it's we need to go this far. It seems that the deprecation will be what will have the most impact. If a developer faces the error of mui/mui-x#4569, after this PR, he will get a deprecation warning giving a tip on what to do next. So personally, I would advocate for the lab to keep the dependency on the pickers, until Material UI v6, to make it so developers can update Material UI v5 at their own pace to get React 18 support. |
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.
Nice, this should allow developers to have better transition 👍
The pickers have been moved to
@mui/x-date-pickers
since the 12th of April 2022.Until now, we were re-exporting everything in
@mui/lab
without warning to give some time to stabilize them before forcing a migration.But we now need to end the transition phase which is causing package duplication to some users using both
@mui/x-date-pickers
and@mui/lab
for other components.This PR adds clear warnings when using a picker component from the lab that those are deprecated.
The pickers will stop being re-exported from the lab during the 1st release of July 2022, at that point we will keep the warning but will not render anything anymore (like for
DateRangePicker
in@mui/lab
currently).