Skip to content

[SWC-1668] feat: migrate poc components to full-fidelity production#6122

Open
rise-erpelding wants to merge 37 commits intomainfrom
swc-1668/poc-components
Open

[SWC-1668] feat: migrate poc components to full-fidelity production#6122
rise-erpelding wants to merge 37 commits intomainfrom
swc-1668/poc-components

Conversation

@rise-erpelding
Copy link
Copy Markdown
Collaborator

@rise-erpelding rise-erpelding commented Apr 1, 2026

Description

Apply the standards and code quality patterns to Badge, Progress Circle, Status Light, and Divider components that were used to establish 2nd-gen POC. We will be disabling Asset from storybook until we can reach alignment with Design on a path forward for that pattern.

DOD for all 4 components:

Includes an a11y migration doc in the component project planning directory of CONTRIBUTOR-DOCS
Meets full s2 visual fidelity
Conform to the code style guides
Includes all necessary tests
includes complete documentation in storybook
Is fully accessible and aligns with a11y patterns
Establishes a starting migration guide in the component source directory

DOD for Asset:

Disable this component from Storybook until we align with design

Motivation and context

The branch started from early 2nd-gen POC implementations that predated a formal changeset and complete migration guidance. This PR consolidates and validates the cross-ticket work in one merge point so final review can confirm:

  • Consumer-facing API defaults and breaking behavior are explicit.
  • Styling surfaces are stable and documented for Spectrum 2.
  • Storybook and tests cover expected usage and regressions.
  • Migration guides capture the required 1st-gen to 2nd-gen updates.

Related issue(s)

  • addresses epic SWC-1668

Issues & tasks in epic

Oustanding issues related to this work not addressed here

  • SWC-1831: S2 Badge: Add notification and indicator badge components
  • SWC-1852: S2 Badge: Add Chromatic VRT for icon-only badges across all sizes
  • SWC-1853: S2 Badge: Icon slot control - select from allowed icons
  • SWC-1848: S2 Divider: Add Chromatic VRT for WHCM and static-color size coverage
  • SWC-1891: S2 Progress-Circle: Spike/RFC to look into if we want default indeterminate vs value (addressed in feat(progresscircle): ensure s2 visual fidelity #6151)
  • chore: converted mixins to controllers and refactored badge #6130 would convert Mixins in Badge to Controllers, so that @todo comment would be addressed there

Screenshots (if appropriate)


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • 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

  • Validate each component's default behavior matches migration docs

    1. Go to Storybook stories for badge, divider, progress-circle, and status-light.
    2. Render each component with no optional attributes set.
    3. Confirm defaults and reflected attributes match documented Spectrum 2 behavior.
  • Validate API and styling migrations from 1st-gen

    1. Compare each component's consumer migration guide examples against rendered output.
    2. Verify removed attributes/variants (indeterminate, disabled, accent) are not required and that replacement behavior works.
    3. Verify --swc-* styling hooks work and previous --mod-* hooks are no longer treated as public API.
  • Validate accessibility semantics and naming expectations

    1. Inspect rendered markup for role/name/value attributes where applicable.
    2. Confirm progress-circle label and value semantics, and that non-interactive components do not create focus traps.
    3. Confirm status/badge examples include visible text or explicit labels per migration guidance.

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Accessibility testing checklist

Required: Complete each applicable item and document your testing steps (replace the placeholders with your component-specific instructions).

  • Keyboard (required — document steps below)

    1. Open Storybook docs/canvas for badge, divider, progress-circle, and status-light.
    2. Tab through each story and verify no unexpected focus targets appear for non-interactive examples.
    3. Confirm interactive containers around these components keep a logical focus order and visible focus ring.
  • Screen reader (required — document steps below)

    1. With VoiceOver/NVDA, navigate to each component story and read each example.
    2. Confirm progress-circle announces progressbar with expected name/value in determinate mode and no value in indeterminate mode.
    3. Confirm status/badge/divider usage does not produce duplicate or misleading announcements and that visible labels communicate state.

@rise-erpelding rise-erpelding self-assigned this Apr 1, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: a236565

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 85 packages
Name Type
@adobe/spectrum-wc Major
@spectrum-web-components/core Major
@spectrum-web-components/badge Major
@spectrum-web-components/divider Major
@spectrum-web-components/progress-circle Major
@spectrum-web-components/status-light Major
@spectrum-web-components/bundle Major
@spectrum-web-components/alert-dialog Major
@spectrum-web-components/card Major
@spectrum-web-components/dialog Major
@spectrum-web-components/menu Major
@spectrum-web-components/action-menu Major
@spectrum-web-components/button Major
@spectrum-web-components/combobox Major
@spectrum-web-components/picker Major
@spectrum-web-components/reactive-controllers Major
documentation Patch
@spectrum-web-components/contextual-help Major
@spectrum-web-components/breadcrumbs Major
@spectrum-web-components/custom-vars-viewer Major
@spectrum-web-components/story-decorator Major
@spectrum-web-components/action-bar Major
@spectrum-web-components/action-button Major
@spectrum-web-components/alert-banner Major
@spectrum-web-components/button-group Major
@spectrum-web-components/coachmark Major
@spectrum-web-components/infield-button Major
@spectrum-web-components/picker-button Major
@spectrum-web-components/search Major
@spectrum-web-components/tags Major
@spectrum-web-components/toast Major
@spectrum-web-components/accordion Major
@spectrum-web-components/action-group Major
@spectrum-web-components/color-area Major
@spectrum-web-components/color-field Major
@spectrum-web-components/color-slider Major
@spectrum-web-components/color-wheel Major
@spectrum-web-components/field-label Major
@spectrum-web-components/icon Major
@spectrum-web-components/meter Major
@spectrum-web-components/number-field Major
@spectrum-web-components/overlay Major
@spectrum-web-components/progress-bar Major
@spectrum-web-components/radio Major
@spectrum-web-components/sidenav Major
@spectrum-web-components/slider Major
@spectrum-web-components/swatch Major
@spectrum-web-components/tabs Major
@spectrum-web-components/tooltip Major
@spectrum-web-components/tray Major
@spectrum-web-components/grid Major
@spectrum-web-components/vrt-compare Major
@spectrum-web-components/checkbox Major
@spectrum-web-components/icons-ui Major
@spectrum-web-components/icons-workflow Major
@spectrum-web-components/table Major
@spectrum-web-components/textfield Major
@spectrum-web-components/popover Major
@spectrum-web-components/truncated Major
@spectrum-web-components/top-nav Major
@spectrum-web-components/switch Major
@spectrum-web-components/help-text Major
@spectrum-web-components/field-group Major
@spectrum-web-components/asset Major
@spectrum-web-components/avatar Major
@spectrum-web-components/clear-button Major
@spectrum-web-components/close-button Major
@spectrum-web-components/color-handle Major
@spectrum-web-components/color-loupe Major
@spectrum-web-components/dropzone Major
@spectrum-web-components/icons Major
@spectrum-web-components/iconset Major
@spectrum-web-components/illustrated-message Major
@spectrum-web-components/link Major
@spectrum-web-components/modal Major
@spectrum-web-components/split-view Major
@spectrum-web-components/thumbnail Major
@spectrum-web-components/underlay Major
@spectrum-web-components/base Major
@spectrum-web-components/opacity-checkerboard Major
@spectrum-web-components/shared Major
@spectrum-web-components/styles Major
@spectrum-web-components/theme Major
@spectrum-web-components/eslint-plugin Major
@spectrum-web-components/stylelint-header-plugin Major

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 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-6122

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.

@rise-erpelding rise-erpelding force-pushed the swc-1668/poc-components branch 2 times, most recently from 59b1cda to 2147d55 Compare April 6, 2026 16:07
@marissahuysentruyt marissahuysentruyt force-pushed the swc-1668/poc-components branch from 419e8bf to 5038447 Compare April 8, 2026 13:08
@rise-erpelding rise-erpelding force-pushed the swc-1668/poc-components branch from a099390 to 06a2855 Compare April 9, 2026 13:42
@cdransf cdransf force-pushed the swc-1668/poc-components branch from e0d3061 to b446021 Compare April 14, 2026 17:03
@caseyisonit caseyisonit added Status:WIP PR is a work in progress or draft 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. labels Apr 20, 2026
Comment thread 2nd-gen/packages/core/components/progress-circle/ProgressCircle.base.ts Outdated
@cdransf cdransf force-pushed the swc-1668/poc-components branch from d5935a6 to f5ad47d Compare April 22, 2026 16:27
@cdransf cdransf force-pushed the swc-1668/poc-components branch 2 times, most recently from 68a9a2e to dc14cef Compare April 24, 2026 16:13
Comment thread 2nd-gen/packages/swc/components/status-light/status-light.css Outdated
@cdransf cdransf marked this pull request as ready for review April 24, 2026 16:55
@cdransf cdransf requested a review from a team as a code owner April 24, 2026 16:55
Comment thread 2nd-gen/packages/swc/components/badge/stories/badge.stories.ts Outdated
Comment thread 2nd-gen/packages/swc/components/status-light/status-light.css Outdated
@cdransf cdransf force-pushed the swc-1668/poc-components branch 2 times, most recently from 8a0c24d to f8029c2 Compare April 24, 2026 19:03
cdransf and others added 27 commits April 28, 2026 13:13
* chore(core): remove 1st-gen type references from 2nd-gen core

* chore(badge): move properties to badge base

* chore(badge): update badge todo

* chore(status-light): restore removed comments

* chore(status-light): remove doc block line in status light
* feat(progresscircle): ensure s2 visual fidelity

- Exports `ProgressCircleSize` type from core
- Adds `prefers-reduced-motion` CSS media query
- Adds `dashOffset` variable to ensure contrast at 0% progress
- Replaces hardcoded size templates with `PROGRESS_CIRCLE_VALID_SIZES.map()`
- Removes sizing antipattern in render
- Removes canvas WHCM track color
- Implements a11y improvements per migration analysis

Also includes minor cross-component cleanup:
- Renames `STATUSLIGHT_*` constants to `STATUS_LIGHT_*` convention
- Adds `{ type: String }` to `@property()` decorators in Asset and Icon base classes
- Fixes `customElements` path in swc package.json
- Tags icon internal stories as migrated
- Updates Storybook source type from auto to dynamic
- Minor avatar stories and status-light stories updates

fixes swc-1670
* chore(testing): review and complete test suites

* fix(testing): correct failing tests in 2nd gen

* Update 2nd-gen/packages/swc/components/asset/test/asset.test.ts

Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com>

* Update 2nd-gen/packages/swc/components/asset/test/asset.test.ts

Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com>

* Update 2nd-gen/packages/swc/components/divider/test/divider.test.ts

Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com>

* Update 2nd-gen/packages/swc/components/asset/test/asset.test.ts

Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com>

* chore(testing): address feedback

---------

Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com>
* feat(badge): ensure visual s2 fidelity (#6114)

* docs(badge): update rendering-and-styling migration analysis
Clarify that fixed positioning is documented in design system guidance
and note new S2 badge variants (notification, indicator) tracked in SWC-1831.

* feat(badge): add no-label CSS class when label slot is empty
Add `swc-Badge--no-label` class via classMap when the default slot
has no text content, enabling CSS targeting of icon-only badges.

* fix(badge): updates padding block tokens and icon-only gap

* feat(badge): support for swc-icon internal

* feat(badge): icon only accessibility examples

* fix(badge): size types passing into swc-icon

* docs(badge): adds todo for missing variants

* fix(badge): dynamically passes size to slotted icon

* test(badge): anatomy test checks for children elements
previously, we were checking for text content when the badge icon slot
was just accepting strings. Now the anatomy story is using the swc-icon
internal component, so it never has text content (it's got HTML). the
badge test now checks for children.length instead.

* fix(badge): disabled text control for icon-slot

* fix(badge): a11y roles for icon only badges

* fix(badge): inline padding
- adds new --swc-badge-padding-inline-start custom prop to control the
inline padding start of a badge. it changes when there's an icon + label
vs. just the text label
- also fixes the gap property so that we just redefine the custom prop
for the badge gap instead

* docs(badge): add todo for icon only badge size story

* docs(rules): update docs on template vs custom html rendering

* docs: badge examples updated

* fix(badge): correct fallbacks for sized badge padding
Without this fallback, the start padding on a badge without an icon would
always resolve to the 75-scale token regardless of size, because
--swc-badge-padding-inline-start was never set in the size override blocks.

Adding --swc-badge-padding-inline as an intermediate fallback means
size overrides propagate to both sides automatically, while the :has()
rules can still override --swc-badge-padding-inline-start for the icon case.

* revert(badge): medium stays default size; neutral is default variant

* test(badge): update new default assertions

* docs(badge): adds @todo to default sizing discrepancy comment

* fix(badge): reduce selector specificity and refactor private padding tokens

* fix(badge): padding block properties corrected

* docs: correct updated css style guides with badge examples

* docs: fix typo

* docs(badge): use different badge variants per design docs

* docs(badge): adds tickets to todo comments

* style(progress-circle): clean up code styles (#6146)

* chore(storybook): review and complete storybook docs

* fix(storybook): revert icon test change to debug test failures

* fix(storybook): changes to align w/progress circle being set to indeterminate by default

* fix(storybook): correct test failure caused by string mismatch

* fix(storybook): correct test failures

* fix(testing): correct failing tests in 2nd gen

* fix(storybook): correct test failures

* chore(storybook): address feedback

* chore(storybook): address feedback

---------

Co-authored-by: Marissa Huysentruyt <69602589+marissahuysentruyt@users.noreply.github.com>
Co-authored-by: rise-erpelding <54716846+rise-erpelding@users.noreply.github.com>
* feat(badge): ensure visual s2 fidelity (#6114)

* docs(badge): update rendering-and-styling migration analysis
Clarify that fixed positioning is documented in design system guidance
and note new S2 badge variants (notification, indicator) tracked in SWC-1831.

* feat(badge): add no-label CSS class when label slot is empty
Add `swc-Badge--no-label` class via classMap when the default slot
has no text content, enabling CSS targeting of icon-only badges.

* fix(badge): updates padding block tokens and icon-only gap

* feat(badge): support for swc-icon internal

* feat(badge): icon only accessibility examples

* fix(badge): size types passing into swc-icon

* docs(badge): adds todo for missing variants

* fix(badge): dynamically passes size to slotted icon

* test(badge): anatomy test checks for children elements
previously, we were checking for text content when the badge icon slot
was just accepting strings. Now the anatomy story is using the swc-icon
internal component, so it never has text content (it's got HTML). the
badge test now checks for children.length instead.

* fix(badge): disabled text control for icon-slot

* fix(badge): a11y roles for icon only badges

* fix(badge): inline padding
- adds new --swc-badge-padding-inline-start custom prop to control the
inline padding start of a badge. it changes when there's an icon + label
vs. just the text label
- also fixes the gap property so that we just redefine the custom prop
for the badge gap instead

* docs(badge): add todo for icon only badge size story

* docs(rules): update docs on template vs custom html rendering

* docs: badge examples updated

* fix(badge): correct fallbacks for sized badge padding
Without this fallback, the start padding on a badge without an icon would
always resolve to the 75-scale token regardless of size, because
--swc-badge-padding-inline-start was never set in the size override blocks.

Adding --swc-badge-padding-inline as an intermediate fallback means
size overrides propagate to both sides automatically, while the :has()
rules can still override --swc-badge-padding-inline-start for the icon case.

* revert(badge): medium stays default size; neutral is default variant

* test(badge): update new default assertions

* docs(badge): adds @todo to default sizing discrepancy comment

* fix(badge): reduce selector specificity and refactor private padding tokens

* fix(badge): padding block properties corrected

* docs: correct updated css style guides with badge examples

* docs: fix typo

* docs(badge): use different badge variants per design docs

* docs(badge): adds tickets to todo comments

* docs: add consumer migration guides for 7 S2 components

* docs: additional migration refinements

* docs: migration css info refinement

* docs: a11y updates for migration docs

* chore(migration-guides): add ai skill and contributor docs for migrations

* chore(migration-guides): add @cssprop to doc blocks

* chore(migration-guides): address pr feedback

* chore(migration-guides): fix badge tests

* chore(migration-guides): refactor using migration skill

* fix(migration-docs): remove deprecated files

* fix(migration-docs): remove deprecated ai skill reference

* fix(migration-docs): address pr feedback

* chore(storybook): update preview nav for new accessibility analysis docs

* fix(migration-docs): update progress circle docs

* fix(migration-docs): address missing properties to badge table

* fix(migration-docs): revert application of Canvas to progress circle track in forced colors

* fix(migration-docs): consistently rename status light properties

* Update 2nd-gen/packages/swc/components/badge/consumer-migration-guide.mdx

Co-authored-by: rise-erpelding <54716846+rise-erpelding@users.noreply.github.com>

* fix(migration-docs): badge fallbacks and consistency

* chore(migration-docs): add missing mods

---------

Co-authored-by: Marissa Huysentruyt <69602589+marissahuysentruyt@users.noreply.github.com>
Co-authored-by: rise-erpelding <54716846+rise-erpelding@users.noreply.github.com>
@cdransf cdransf force-pushed the swc-1668/poc-components branch from e1cd323 to 371783d Compare April 28, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. Component:Badge Component:Divider Component:Progress circle Component:Status light Status:Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants