Repository navigation
feat(chip): add semantic variants and a status dot - #8612
talissoncosta wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueNo actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughChip adds status and display variants, a decorative dot, and documentation stories for the variants. StatusBadge now uses Chip and ChipDot, mapping experiment statuses to Chip variants. Its previous stylesheet is removed. Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Merge Risk: ⚪ Minimal · up to Status badges now share Chip styling while retaining their semantic colors. The inspected experiment views show no concrete layout disruption, leaving no identified merge-blocking issue. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change affects shared presentation components, but the reviewed experiment-status path uses fixed labels and colours and does not introduce a new action or authorization path. Some broader coverage remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Docker builds report
|
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20915 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ oss · depot-ubuntu-latest-arm-16 — run #20915 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #20915 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-16 — run #20915 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
The five status colours, the one filled variant, and ChipDot, a leading dot in currentColor so it follows the variant with nothing to wire. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drops 51 lines of hand-written colour pairs the semantic tokens already cover. The badge goes from fully rounded to the 6px the design system fixes for a chip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Chromatic only snapshots what a story renders, so the statuses, the solid fill and ChipDot had no visual coverage. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
00fd156 to
0eab747
Compare
… not obvious The dot's radius and shrink are Bootstrap's job; only its size and colour are the chip's. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The chip frame has three styles, Primary, Secondary and Outline. Solid is Primary; accent is close to Secondary and neutral to Outline, but neither matches its values yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Postponing until the new colour system lands. Nothing needs this yet: StatusBadge works on main with its own stylesheet, the tags stack (#8613) is independent of it, and Branch |
docs/if required so people know about the feature.Changes
Contributes to #8465. Split out of #8569 so the tags work can be reviewed as a contrast change on
its own. Independent of #8613, either can merge first.
Chipgains the five status colours, thesolidfill, andChipDot, a leading dot incurrentColorso it follows the variant with nothing to wire.StatusBadgethen composes it and drops its own stylesheet, 51 lines of hand-written colour pairsthat the semantic tokens already cover.
One visible change: experiment status badges go from fully rounded to 6px, matching the design
system's chip shape. It is the only thing here you will see in the app.
What this does not do
The chip frame
specifies three styles and two sizes. We have seven variants and three sizes, and the values do not
line up:
default,sm,xssolidis the frame's Primary and matches its value.accentis close to Secondary andneutralto Outline, but neither matches: Secondary is a solid
#f5f0ffwith an#e7e1f4border whereaccentis an 8% alpha with an--color-border-actionborder, and the frame's dark values(
#1a0a78/#4f28d8/#d4beff) have no counterpart in our tokens.The five status colours are not in the frame at all.
StatusBadgeneeds them, so they are anextension we are making rather than something specified.
Bringing
Chiponto the frame means renaming variants, dropping a size and changing paddingsacross ~15 call sites. That is its own PR, and this one deliberately stays out of its way.
How did you test this code?
Storybook in both themes:
Chipfor the new variants, the solid and the dot,StatusBadgeon theExperiments list for the shape. Unit suite passes,
tscunchanged against main.To check manually: the Experiments list, for the badge shape and colours.