-
Notifications
You must be signed in to change notification settings - Fork 129
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(cli): add Button codemods #596
Conversation
tech/compile-jsx
Codecov Report
@@ Coverage Diff @@
## alpha #596 +/- ##
=======================================
Coverage 94.22% 94.22%
=======================================
Files 137 137
Lines 2183 2183
Branches 622 622
=======================================
Hits 2057 2057
Misses 103 103
Partials 23 23 |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sumup-oss/circuit-ui/e8i88yqol |
95222af
to
ad48b1c
Compare
tech/compile-jsx tech/compile-jsx
d9b87d0
to
738f90c
Compare
feature/codemod-button
feature/codemod-button
feature/codemod-button
feature/codemod-button
feature/codemod-button
ff3c24b
to
b6685f5
Compare
The flat variant could be used with the primary and secondary variants. It affected the border and shadow, not the color. Mapping it the secondary variant was therefore inaccurate. feature/codemod-button
@connor-baer by looking into it, it doesn't cover dynamic props, right? Not that I think we have to, but just checking it. (Something like |
@fernandofleury Yes, dynamic props are not covered. The codemods are meant to help with the bulk of the work, but cannot cover every edge case. |
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.
In which PR do we cover documentation?
I made some minor comments
@fernandofleury Documentation is covered in #599. |
feature/codemod-button
feature/codemod-button
🎉 This PR is included in version 2.0.0-alpha.22 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Purpose
Circuit UI v2 comes with a lot of breaking changes — most small and component-specific, but together they add up to a lot of manual work for the users. We can automate these changes with codemods, small scripts that modify the source code automatically.
Approach and changes
The output looks something like this:
I chose to only allow one codemod at a time to force the users to apply the transforms incrementally and review the changes before continuing.
Definition of done
Meets minimum browser supportMeets accessibility requirements