Skip to content

feat (CDS-1613): button variant migrator#544

Merged
adrienzheng-cb merged 2 commits intocds-v9from
harry/button-variant-migrator
Mar 25, 2026
Merged

feat (CDS-1613): button variant migrator#544
adrienzheng-cb merged 2 commits intocds-v9from
harry/button-variant-migrator

Conversation

@haoruikun-cb
Copy link
Copy Markdown
Contributor

What changed? Why?

Added button-variant-values migrator transform to the v8-to-v9 preset. Automatically remaps Button/IconButton variant prop values for CDS v9 consumers:

  • tertiaryinverse (old tertiary used bgInverse; v9 renamed it to inverse)
  • foregroundMutedsecondary (deprecated per design)

Only targets components imported from @coinbase/cds-web / @coinbase/cds-mobile. Adds TODO(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-appearance manifest entry, and updated doc references.

Root cause (required for bugfixes)

UI changes

iOS Old iOS New
old screenshot new screenshot
Android Old Android New
old screenshot new screenshot
Web Old Web New
old screenshot new screenshot

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

Illustrations/Icons Checklist

Required if this PR changes files under packages/illustrations/** or packages/icons/**

  • verified visreg changes with Terran (include link to visreg run/approval)
  • all illustration/icons names have been reviewed by Dom and/or Terran

Change management

type=routine
risk=low
impact=sev5

automerge=false

@linear
Copy link
Copy Markdown

linear bot commented Mar 25, 2026

@haoruikun-cb haoruikun-cb marked this pull request as ready for review March 25, 2026 15:44
@haoruikun-cb haoruikun-cb force-pushed the harry/button-variant-migrator branch from 820858f to 2720497 Compare March 25, 2026 15:51
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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: It would be helpful to add a jsdoc despcription at the top to summarize what the transform is for.

@haoruikun-cb haoruikun-cb force-pushed the harry/button-variant-migrator branch from 2720497 to 75457f9 Compare March 25, 2026 18:37
@adrienzheng-cb adrienzheng-cb merged commit 1cb54f9 into cds-v9 Mar 25, 2026
17 checks passed
@adrienzheng-cb adrienzheng-cb deleted the harry/button-variant-migrator branch March 25, 2026 18:45
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.

2 participants