-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[ExpansionPanel] Rename to Accordion #21494
Conversation
@material-ui/core: parsed: +0.05% , gzip: +0.12% |
Ideally the codemod would support the old and new names. If that's not possible then we can always only handle the new names and release the codemod in a major. |
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.
Makes sense now that the material guidelines no longer describe this component.
Though we don't want to loose the legacy ExpansionPanel traffic. We should add the moved pages to docs/public/_redirects
(301)
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.
For the URL, I think that we should continue with the singular: https://material-ui.com/components/accordion/
as we do with the new components in the lab.
docs/src/pages/getting-started/supported-components/supported-components.md
Outdated
Show resolved
Hide resolved
…components.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
What's the deprecation strategy for ExpansionPanel? Reexport with a warning, then remove in v6? |
I didn't help matters by asking a leading question. Sorry!
Am I understanding correctly?:
|
Yes! The idea is generally to avoid:
There's a concern that we might forget to deprecations later (as with any change that is scheduled for later). My hope is that it's far less likely since we can later look at all the breaking changes (filter by label) and see if we have a deprecation in place. |
@eps1lon so should we revert the changes which are refering to the deprecation of the |
At this point that's even more work. This is good to go. Just something to consider in the future. Just to make sure: In its current state this PR isn't breaking (ignoring dev-only warnings). I can still apply this change to existing codebases and have no change in production? |
Exactly. We still have the previous folder structure for preserving the imports and all components and their typings are re-exported by their old names. If there is anything else that should be done that I am not aware of, let me know. If there isn't then this PR is non-breaking. |
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.
Some of the markdown files are not considered as moved in git e.g. docs/src/pages/components/accordion/accordion.md
(while -aa
is correctly marked as moved). This can become problematic when looking through the history.
Most of the time git automatically figures this out. For all the other cases you need to explicitly git mv
. I guess you need revert these moves and then git mv
instead of mv
those files. This might be difficult to get right but may be invalueable later!
@eps1lon Final note: Everything was done in separate commit, but still the end result is unexpected.. |
Tried but it failed ultimately. Didn't find confirmation that renaming is even a separate thing in |
* wip * wip * reverted some changes * sorting * migration * fix in migration * fix in migration * fix in migration * Update docs/src/pages/getting-started/supported-components/supported-components.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * added redirect * fixed material design links * codemod fix * prettier + formatted * changed accordions to accordion * docs:api * renamed accordions to accordion * Update docs/src/pages/components/accordion/accordion.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * Update docs/src/pages/components/accordion/accordion.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * Update docs/src/pages/components/accordion/accordion.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * added deprecated exports for ExpansionPanel components * added motivation for renaming component * Update docs/src/pages/components/accordion/accordion.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * Update docs/src/pages/guides/migration-v4/migration-v4.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * Update docs/src/pages/guides/migration-v4/migration-v4.md Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> * cleandup migration * prettier * changed comments on deprecated components * removed * reverted del files * renamed * fixed d.ts fiels * r * added * renamed * renamed types * redirects * Revert markdown source changes * Move markdown source from expansion-panel to accordion * Expansion Panel -> Accordion * Revert attempt at renaming Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
Breaking changes
[ExpensionPanel] Rename the
ExpansionPanel
components withAccordion
to match the naming convention of the community:This PR is inspired by @oliviertassinari comment #20580 (comment) for renaming the
ExpansionPanel
* components toAccordion
*.TODOs
Questions
material-ui-codemod/src/v5.0.0
)