-
Notifications
You must be signed in to change notification settings - Fork 236
fix(status-light): add missing accent and cyan variants #5813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(status-light): add missing accent and cyan variants #5813
Conversation
🦋 Changeset detectedLatest commit: 473585a The changes in this PR will be included in the next version bump. This PR includes changesets to release 84 packages
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 |
📚 Branch Preview🔍 Visual Regression Test ResultsWhen 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: If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
Pull Request Test Coverage Report for Build 18730377575Details
💛 - Coveralls |
| <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> |
There was a problem hiding this comment.
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).
nikkimk
left a comment
There was a problem hiding this 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.
b692ba7 to
109f3d3
Compare
- 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
ad15ced to
13c4ec9
Compare
Description
This PR adds the missing
accentandcyanvariants 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:
accentandcyanto the variant type definition inStatusLight.ts.spectrum-StatusLight--accentand.spectrum-StatusLight--cyanto:host([variant=\"accent\"])and:host([variant=\"cyan\"])accentandcyanvariants to all size stories (s, m, l, xl)cyanvariant in the non-semantic variants sectionMotivation and context
The
accentandcyanvariants 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)
Screenshots (if appropriate)
Author's checklist
I have added automated tests to cover my changes.Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Verify new variants render correctly
--spectrum-accent-visual-color/--spectrum-accent-color-800and--spectrum-cyan-visual-color/--spectrum-cyan-600)Verify TypeScript types are correct
accentorcyanAdditional validation could include importing the status light into a different TS file, calling
sp-status-lightwith one of the new variants, and verifying no TS errors are thrown in your IDE.Device review