Badge status pill #25
escape-llc
announced in
AI Session Summaries
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Goal
Item 2.2 of the new-components hand-off doc: add
<Badge>, a pure-presentational status pill using the toolkit's existing four semantic subthemes.Toolcrib surface touched
src/components/Badge/Badge.tsx. NoThemeSlice, no event-bus emission, no internal state — same minimal-surface treatment as<Button>for a component with no dedicated theme axes of its own.subtheme,size('sm'/'md'),icon.Approach
Resolves colouring via
useResolvedSubtheme()+resolveSubtheme()— the same pair<Progress>/<Card>/<DataTable>/<FormComponents>already use, falling back through the nearest<StyleDomainProvider>and then a neutral grey when nothing resolves. The hand-off doc pointed at<Toast>as an existing consumer ofresolveSubtheme()to match — checkedToast.tsxdirectly and it doesn't call that function at all; it hand-rolls an equivalent switch-per-property lookup instead, which is exactly the kind of duplicationresolveSubtheme()exists to prevent. Not in scope to fix here, but<Progress>turned out to be the real precedent, not<Toast>.Outcome
7 new tests (neutral default; all four subthemes resolving to the correct
--ai-subtheme-*-bg/-textvariables — the doc's own acceptance bar, "same colors as the equivalent Toast/DataTable row treatment"; icon slot; children). Full suite: 57/57 files, 314/314 tests.tscclean,check-index/check-manifest/check-docsall pass. Commit: c130b86Friction
Third small factual gap found across the last three items in this batch (theme-slice doc's off-by-one count, ToolcribProvider's wrong file path, now this). None individually significant, but the pattern is now clear enough to state plainly: every hand-off doc in this repo so far has had at least one concrete, checkable claim that didn't hold up against the actual source, sitting right next to otherwise-sound design reasoning. Continuing to verify each doc's specific factual claims independently before acting on them, not just its overall approach — same as the last two check-ins noted, now with a third data point.
All reactions