-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Stop root exporting locales
#11612
[pickers] Stop root exporting locales
#11612
Conversation
Localization writing tips ✍️Seems you are updating localization 🌍 files. Thank you for contributing to the localization! 🎉 To make your PR perfect, here is a list of elements to check: ✔️
Deploy preview: https://deploy-preview-11612--material-ui-x.netlify.app/ Updated pages: |
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
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.
OK to go with it since the discussion for depth 3 are far from over 👌
We just need some migration guide and maybe codemod before merging |
I've added the migration guide entry. I have given some thought about adding a codemod and concluded that IMHO it's not worth the effort to maybe replace 1 import for 1 in 100 user cases. |
I'd be in favor of doing the codemod because it's fairly easy to do and adding a green check on the migration guide improves the overall feeling that the migration is easy. |
I would agree with you and kind of think that in the Data Grid case, it might make sense (however, they didn't add one, at least for now) because their demos had examples of importing locales from the root. 🤔 |
- import { frFR } from '@mui/x-date-pickers'; | ||
+ import { frFR } from '@mui/x-date-pickers/locales'; |
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.
Same as #11650 (comment)
- import { frFR } from '@mui/x-date-pickers'; | |
+ import { frFR } from '@mui/x-date-pickers/locales'; | |
-import { frFR } from '@mui/x-date-pickers'; | |
+import { frFR } from '@mui/x-date-pickers/locales'; |
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.
Thanks for bringing it up.
Raised a PR fixing it and some other tiny issues. 😉
#11695
Bundle size in https://bundlephobia.com/ is now smaller, cool https://bundlephobia.com/package/@mui/[email protected] |
Nice!. 👏 |
Now, to be fair, technically, people will see an increase in v7 vs. v6 (data grid & date picker) https://bundlephobia.com/package/@mui/[email protected] https://bundlephobia.com/package/@mui/[email protected] This is also visible when using https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost Still, marketing-wise, it's a win 👍 #10918 (comment) |
For the pickers, I think it's due to our double textfield approach, we bundle both the TreeView and the new component. |
Connecting this to #5550 |
Fixes #10918
locales
re-exportingimport { frFR } from '@mui/x-date-pickers';
would no longer work after this, but we never endorse such usage in the docs anyway.l10n
related types.locales
via@mui/x-date-pickers-pro/locales
.Let's review the approach, if we are fine with it, then I'll:
Add codemodDon't see much point in having it given all circumstances