-
-
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
[lab] Remove components which were moved from lab to material #45232
[lab] Remove components which were moved from lab to material #45232
Conversation
21c8867
to
95c948d
Compare
Netlify deploy preview@material-ui/lab: parsed: -45.99% 😍, gzip: -43.76% 😍 Bundle size reportDetails of bundle changes (Toolpad) |
:::warning | ||
The codemod doesn't cover type imports associated with the components. | ||
::: |
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 don't think it's worth our time to add them, there are a lot of them, and I think users are rarely using them. We can add them in the future if enough people ask.
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.
(The default component type, i.e., the Alert
type for the Alert
component, is covered as it's "the same" import as the component)
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.
Looks good! Left some comments about naming:
barrel imports-> named importscomponent file imports-> default import
packages/mui-codemod/src/v7.0.0/lab-removed-components/lab-removed-components.js
Show resolved
Hide resolved
packages/mui-codemod/src/v7.0.0/lab-removed-components/lab-removed-components.js
Show resolved
Hide resolved
packages/mui-codemod/src/v7.0.0/lab-removed-components/lab-removed-components.js
Show resolved
Hide resolved
packages/mui-codemod/src/v7.0.0/lab-removed-components/lab-removed-components.js
Show resolved
Hide resolved
packages/mui-codemod/src/v7.0.0/lab-removed-components/lab-removed-components.js
Show resolved
Hide resolved
Co-authored-by: Aarón García Hervás <[email protected]> Signed-off-by: Diego Andai <[email protected]>
@aarongarciah, the naming is tricky. The codemod is divided into two parts: modifying imports from the lab's index file (which I named barrel) and imports from each of the components files (which I named as such). The named/default import names are not as accurate as you could have both from the components files:
The component file part of the codemod covers both named and default imports. The barrel part of the codemod only covers named imports. That's why I didn't use named/default. What do you think? I agree that barrel and component file is not great naming either 😅 but I couldn't find a better alternative. |
@DiegoAndai I see, then I think it's fine to only do these two changes in the readme? |
Signed-off-by: Diego Andai <[email protected]>
@aarongarciah done 👍🏼 I added a bit more info to be more accurate |
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.
🗑️
Closes #43025.