Skip to content
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

feat: add inverted prop codemod #368

Merged
merged 26 commits into from
Nov 6, 2023
Merged

feat: add inverted prop codemod #368

merged 26 commits into from
Nov 6, 2023

Conversation

martimalek
Copy link
Contributor

@martimalek martimalek commented Aug 29, 2023

What:

Adds a codemod that finds components using the inverted prop, removes it and wraps them in a component that forces them to use the inverted color scheme

Why:

To ease the adoption of Wave 2.0

How:

  • Add new inverted-to-wrapper codemod
  • Add tests for the new codemod

Checklist:

  • Currently the codemod wraps every Wave component using inverted with the InvertedColorScheme component, ideally we should identify components that use inverted and are siblings and wrap them together (for performance)
  • Add Breadcrumbs and Logo components to list of components that the codemod checks
  • Add example of siblings being wrapper individually
  • Change component name from FlipTheme to InvertedColorScheme
  • Change codemod name to a more generic inverted-to-wrapper
  • Ready to be merged

Extra:

Closes #365

Base automatically changed from deprecated-icons-codemod to next August 29, 2023 16:05
@nlopin nlopin linked an issue Aug 30, 2023 that may be closed by this pull request
@martimalek
Copy link
Contributor Author

I've started improving the codemod to identify siblings that use the inverted prop to wrap them together for better performance. The work is in branch inverted-codemod-improvements in commit b9db2dc. I've decided to park it for a bit because it's more complex than what I initially thought, I'll go back to it when all the remaining codemods for Wave 2.0 are done.

@martimalek martimalek merged commit e0d0653 into next Nov 6, 2023
10 checks passed
@martimalek martimalek deleted the inverted-prop-codemod branch November 6, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Codemod to migrate from inverted prop to InvertedColorScheme component
3 participants