feat (CDS-1613): button variant migrator#544
Merged
adrienzheng-cb merged 2 commits intocds-v9from Mar 25, 2026
Merged
Conversation
820858f to
2720497
Compare
haoruikun-cb
commented
Mar 25, 2026
| npx @coinbase/cds-migrator ./src -p v8-to-v9 --partial | ||
|
|
||
| # Run transforms directly (no preset!) | ||
| npx @coinbase/cds-migrator ./src -t button-variant-to-appearance |
Contributor
Author
There was a problem hiding this comment.
Removed the placeholder example button-variant-to-appearance transform and updated all of its references to avoid confusion.
| @@ -0,0 +1,95 @@ | |||
| import type { API, FileInfo } from 'jscodeshift'; | |||
Contributor
There was a problem hiding this comment.
Nit: It would be helpful to add a jsdoc despcription at the top to summarize what the transform is for.
2720497 to
75457f9
Compare
adrienzheng-cb
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed? Why?
Added
button-variant-valuesmigrator transform to the v8-to-v9 preset. Automatically remaps Button/IconButtonvariantprop values for CDS v9 consumers:tertiary→inverse(oldtertiaryusedbgInverse; v9 renamed it toinverse)foregroundMuted→secondary(deprecated per design)Only targets components imported from
@coinbase/cds-web/@coinbase/cds-mobile. AddsTODO(cds-migration)comments for dynamic variant expressions needing manual review.Also: added test infrastructure for the migrator package (15 unit + fixture tests), removed the placeholder
button-variant-to-appearancemanifest entry, and updated doc references.Root cause (required for bugfixes)
UI changes
Testing
How has it been tested?
Testing instructions
Illustrations/Icons Checklist
Required if this PR changes files under
packages/illustrations/**orpackages/icons/**Change management
type=routine
risk=low
impact=sev5
automerge=false