Skip to content

chore(status-light): add VRT coverage - #6620

Merged
cdransf merged 3 commits into
mainfrom
cdransf/status-light-vrt-coverage
Aug 19, 2026
Merged

chore(status-light): add VRT coverage#6620
cdransf merged 3 commits into
mainfrom
cdransf/status-light-vrt-coverage

Conversation

@cdransf

@cdransf cdransf commented Aug 13, 2026

Copy link
Copy Markdown
Member

Description

Adds dedicated test/vrt/ coverage for status-light, following the button/badge VRT pattern: status-light.vrt.ts covers every variant (5 semantic + 14 non-semantic) × size, grouped into one row per variant, plus a Wrapping row and a CJK language row (status-light.css sets a distinct line-height for :lang(ja/zh/ko)); ForcedColors reuses the full permutation set since forced-color-adjust: none is set on the whole component, so every variant's color survives forced-colors mode rather than collapsing to a system color. status-light-custom-properties.vrt.ts covers reference/override rows for all six documented custom properties (dot-size, dot-color, font-size, line-height, text-to-visual, content-color), with verifyCustomPropertyCoverage() checked against the manifest. No global-styles VRT file is included since status-light has no plain-class global stylesheet.

Motivation and context

Closes the VRT coverage gap for status-light called out in SWC-2410.

Related issue(s)

  • Jira: SWC-2410

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed the Accessibility Practices for this feature.
  • 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.

Accessibility testing checklist

  • Keyboard: N/A. Visual-only test coverage; status-light is non-interactive with no focusable parts and no interactive changes.
  • Screen reader: No accessibility-relevant changes. The component's existing semantics are untouched by this test-only addition.

@cdransf
cdransf requested a review from a team as a code owner August 13, 2026 23:03
@cdransf cdransf self-assigned this Aug 13, 2026
@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f32d315

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

@cdransf cdransf added Component:Status light Status:Ready for review PR ready for review or re-review. Spectrum 2 Issues related to Spectrum 2 run_vrt Triggers the Chromatic VRT run for 2nd-gen labels Aug 13, 2026
@cdransf
cdransf force-pushed the cdransf/status-light-vrt-coverage branch from 03a87a3 to 166d2dc Compare August 13, 2026 23:04
@github-actions

Copy link
Copy Markdown
Contributor

📚 Branch Preview Links

🔍 Gen1 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-6620

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/status-light-vrt-coverage branch from 166d2dc to ecdfe9e Compare August 17, 2026 16:42

@rise-erpelding rise-erpelding left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@cdransf
cdransf force-pushed the cdransf/status-light-vrt-coverage branch from ecdfe9e to c6cb8b7 Compare August 18, 2026 15:41

@5t3ph 5t3ph left a comment

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.

For the same reason we don't keep button or badge colors for forced-colors, I don't think we should be keeping them for status light. Reason being that relying on color alone to communicate is a WCAG failure, and we also can't know the intent of those colors out of context.

Can you update the dots to use CanvasText as the background-color for forced-colors mode?

Maybe we also need a ticket to investigate some type of like "retain color" opt-in switch so that contextually colors for status light and maybe badge can be kept for forced-colors, or if we just need to add a demo in our customization docs for how to handle that perhaps.

@cdransf

cdransf commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Can you update the dots to use CanvasText as the background-color for forced-colors mode?

That makes sense (and was something I hadn't considered). I revised the comments and added the background-color change in 134f728. Added SWC-2508 for the retain color research too. ✨

@cdransf
cdransf requested a review from 5t3ph August 18, 2026 18:51
@cdransf
cdransf force-pushed the cdransf/status-light-vrt-coverage branch from 134f728 to 60b21ff Compare August 19, 2026 15:36

@5t3ph 5t3ph left a comment

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.

A little more simplification can be done for the forced-colors.

Comment thread 2nd-gen/packages/swc/components/status-light/status-light.css Outdated
Comment thread 2nd-gen/packages/swc/components/status-light/status-light.css Outdated
@cdransf
cdransf requested a review from 5t3ph August 19, 2026 18:08

@5t3ph 5t3ph left a comment

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.

:shipit:

@cdransf
cdransf force-pushed the cdransf/status-light-vrt-coverage branch from 4c1e3b8 to f32d315 Compare August 19, 2026 20:05
@cdransf
cdransf enabled auto-merge (squash) August 19, 2026 20:05
@cdransf
cdransf merged commit 19d49a8 into main Aug 19, 2026
30 of 35 checks passed
@cdransf
cdransf deleted the cdransf/status-light-vrt-coverage branch August 19, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component:Status light run_vrt Triggers the Chromatic VRT run for 2nd-gen 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.

3 participants