Skip to content

Conversation

@marissahuysentruyt
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt commented Oct 17, 2025

Description

This PR adds the missing accent and cyan variants to the Status Light component. These variants existed in the CSS but were not properly exposed in the TypeScript type definitions, and their CSS selectors were using class-based syntax instead of the correct attribute selector format.

Changes made:

  • Added accent and cyan to the variant type definition in StatusLight.ts
  • Fixed CSS selectors from .spectrum-StatusLight--accent and .spectrum-StatusLight--cyan to :host([variant=\"accent\"]) and :host([variant=\"cyan\"])
  • Added examples for accent and cyan variants to all size stories (s, m, l, xl)
  • Updated README documentation to include the cyan variant in the non-semantic variants section

Motivation and context

The accent and cyan variants were defined in the CSS with custom properties but were missing from the TypeScript variant type union, making them unavailable to consumers. Additionally, the CSS selectors were using the class-based format which prevented the variants from working correctly, since the component was not utilizing the classes.

This ensures all first-generation variants are properly available and functional. This implementation gap was identified in the component analysis of status light in preparation for its second-gen migration.

Related issue(s)

  • fixes SWC-1318

Screenshots (if appropriate)

statuslights Screenshot 2025-10-20 at 9 09 50 AM


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

  • Verify new variants render correctly

    • Go to the status light docs page in Storybook
    • Select the "s", "m", "l", or "XL" story
    • Verify the accent & cyan variants display with the correct dot colors (--spectrum-accent-visual-color/--spectrum-accent-color-800 and --spectrum-cyan-visual-color/--spectrum-cyan-600)

statuslights

  • Verify TypeScript types are correct

    • Go to the Variants section of the status light docs page.
    • Inspect one of the status lights in either the Semantic or the Non-semantic tab panels.
    • Change the variant attribute to accent or cyan
    • Verify no errors occur in the browser
  • Additional validation could include importing the status light into a different TS file, calling sp-status-light with one of the new variants, and verifying no TS errors are thrown in your IDE.

Device review

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: 473585a

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

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

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
Contributor

github-actions bot commented Oct 17, 2025

📚 Branch Preview

🔍 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-5813

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.

@github-actions
Copy link
Contributor

Tachometer results

Currently, no packages are changed by this PR...

@coveralls
Copy link
Collaborator

coveralls commented Oct 17, 2025

Pull Request Test Coverage Report for Build 18730377575

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 97.964%

Totals Coverage Status
Change from base Build 18726194186: -0.002%
Covered Lines: 34249
Relevant Lines: 34778

💛 - Coveralls

@marissahuysentruyt marissahuysentruyt self-assigned this Oct 17, 2025
@marissahuysentruyt marissahuysentruyt added bug Something isn't working 1.0.0 Issues that should be addressed for a 1.0 release! Component: Status light labels Oct 17, 2025
<sp-status-light variant="magenta">magenta status</sp-status-light>
<sp-status-light variant="celery">celery status</sp-status-light>
<sp-status-light variant="purple">purple status</sp-status-light>
<sp-status-light variant="cyan">cyan status</sp-status-light>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do we think about the accent variant?

I haven't added it to the documentation because we don't actually have any design guidance (at least recent guidance I'm aware of) for it. However, CSS had selectors for it, has an accent status light on main right now, and there was an SWC selector for it (which you'll see I had to correct).

@marissahuysentruyt marissahuysentruyt marked this pull request as ready for review October 20, 2025 15:49
@marissahuysentruyt marissahuysentruyt requested a review from a team as a code owner October 20, 2025 15:49
@marissahuysentruyt marissahuysentruyt added the Status: Ready for review PR ready for review or re-review. label Oct 20, 2025
Copy link
Contributor

@nikkimk nikkimk left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-missing-statuslight-variants branch 2 times, most recently from b692ba7 to 109f3d3 Compare October 21, 2025 21:28
- added missing cyan and accent to variant list that were identified in
the component analysis
- correct the existing accent and cyan variant selectors
- add example to docs page
- create changeset
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-missing-statuslight-variants branch from ad15ced to 13c4ec9 Compare October 22, 2025 21:11
@marissahuysentruyt marissahuysentruyt merged commit 2811b9e into main Oct 22, 2025
27 checks passed
@marissahuysentruyt marissahuysentruyt deleted the marissahuysentruyt/fix-missing-statuslight-variants branch October 22, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.0.0 Issues that should be addressed for a 1.0 release! bug Something isn't working 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