Skip to content

docs: add consumer migration guides for S2 components#6169

Open
cdransf wants to merge 6 commits intoswc-1668/poc-componentsfrom
cdransf/migration-guides
Open

docs: add consumer migration guides for S2 components#6169
cdransf wants to merge 6 commits intoswc-1668/poc-componentsfrom
cdransf/migration-guides

Conversation

@cdransf
Copy link
Copy Markdown
Member

@cdransf cdransf commented Apr 10, 2026

Description

Adds migration.md files for 7 components in 2nd-gen/packages/swc/components/, following the pattern established
by the avatar migration guide:

  • asset — tag/package rename, CSS vars removed (token-based), shadow DOM class changes
  • badge — tag/package rename, CSS var rename, new subtle/outline attributes, 5 new color variants
  • divider — tag/package rename, CSS var rename, shadow DOM structure change
  • icon — tag/package rename, name/src attributes removed, xxs/xxl sizes removed, slot-only SVG
  • progress-circle — tag/package rename, CSS var rename, static-color="black" added, SVG rendering change
  • status-light — tag/package rename, disabled removed, accent variant removed, 5 new color variants
  • typography — class prefix .spectrum-* → .swc-*, light/uppercase/strong-emphasized removed, new Title variant
    and prose container

Each guide includes: installation steps, quick reference table, per-change before/after examples, new features,
and accessibility notes. Follows the same per-component structure proposed in draft #6145.

Motivation and context

Application developers migrating from 1st-gen to 2nd-gen need practical, consumer-focused guidance that goes
beyond internal implementation analysis. These docs cover the day-to-day upgrade path: what to search for, what
to change, and how to validate the result.

Related issue(s)

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed the Accessibility Practices for this feature, see: Aria
    Practices
  • I have added automated tests to cover my changes.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Each migration guide is accurate and complete
    a. Open any migration.md in 2nd-gen/packages/swc/components/[component]/
    b. Follow the "Update your code" steps using a real sp-[component] usage as input
    c. Expect the before/after examples to produce a working swc-[component] with no regressions
  • Breaking changes are clearly surfaced
    a. Review the icon and status-light guides specifically — these have the most significant removals (name/src
    on icon, disabled/accent on status-light)
    b. Confirm the guidance is actionable and the "After" examples are valid 2nd-gen markup

@cdransf cdransf self-assigned this Apr 10, 2026
@cdransf cdransf added the Status:WIP PR is a work in progress or draft label Apr 10, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

⚠️ No Changeset found

Latest commit: ccd3f17

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

📚 Branch Preview Links

🔍 First Generation Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-6169

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@cdransf cdransf force-pushed the cdransf/migration-guides branch 4 times, most recently from 461b6f8 to d4220ba Compare April 10, 2026 23:14
@rubencarvalho
Copy link
Copy Markdown
Contributor

This is looking really good! Could we somehow add a "template" / or instructions to the migration guide, so all future components use this format too?


| Removed (1st-gen) | Replacement (2nd-gen) |
| ------------------------------------------- | ------------------------------ |
| `--mod-badge-height` | `--swc-badge-height` |
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.

Not sure if we want to do it in a separate PR or here, but could we document these in the JSDoc of each of the components? This will make sure these properties surface in the API table 😄
Example:

 * @cssprop --swc-badge-height -  The height of the badge.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I went ahead and added them in 1202c75

@rubencarvalho
Copy link
Copy Markdown
Contributor

This is looking really good! Could we somehow add a "template" / or instructions to the migration guide, so all future components use this format too?
I wonder if we could surface these in the prod Storybook (customer facing). If we do, we can have a dedicated PR for it (doesn't need to be here). cc: @caseyisonit

@cdransf cdransf force-pushed the cdransf/migration-guides branch 2 times, most recently from 74024f7 to f7b8252 Compare April 14, 2026 18:53
@cdransf cdransf added Status:Ready for review PR ready for review or re-review. Spectrum 2 Issues related to Spectrum 2 and removed Status:WIP PR is a work in progress or draft labels Apr 14, 2026
@cdransf cdransf requested a review from caseyisonit April 14, 2026 18:53
@cdransf cdransf marked this pull request as ready for review April 14, 2026 18:53
@cdransf cdransf requested a review from a team as a code owner April 14, 2026 18:53
@cdransf cdransf changed the base branch from main to swc-1668/poc-components April 14, 2026 20:41
@cdransf cdransf force-pushed the cdransf/migration-guides branch from 45cca69 to 40e15d1 Compare April 14, 2026 20:43
@cdransf
Copy link
Copy Markdown
Member Author

cdransf commented Apr 14, 2026

This is looking really good! Could we somehow add a "template" / or instructions to the migration guide, so all future components use this format too? I wonder if we could surface these in the prod Storybook (customer facing). If we do, we can have a dedicated PR for it (doesn't need to be here). cc: @caseyisonit

Added a skill and consumer docs for that here 40e15d1

@cdransf cdransf force-pushed the cdransf/migration-guides branch from 1202c75 to 8dff857 Compare April 14, 2026 21:50
@cdransf cdransf requested a review from rubencarvalho April 14, 2026 21:50
@cdransf cdransf force-pushed the cdransf/migration-guides branch from 8dff857 to ccd3f17 Compare April 15, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Spectrum 2 Issues related to Spectrum 2 Status:Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants