Repository navigation
fix(chip): refine visual treatment - #163
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the Chip component’s visual styling to read as a compact chip (vs. a rounded button), and expands Storybook visual-review coverage to better validate variants across themes.
Changes:
- Reworked
chipVariantsto centralize chip styling via shared CSS variables and updated size/variant definitions. - Updated
useChipslot classes (avatar/dot/close/action) and replaced explicitmin-h-11sizing with pseudo-element hit areas. - Added Storybook “VisualReviewMatrix” and “UsageReview” stories, plus theme utilities/tokens needed for chip avatar sizing and focus shadow aliases.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/styles/theme.css |
Adds focus-shadow alias variables and chip avatar sizing utilities backed by chip sizing tokens. |
src/components/atoms/chip/useChip.ts |
Updates slot styling and introduces pseudo-element based hit-area expansion for interactive regions. |
src/components/atoms/chip/types.ts |
Refactors chip CVA variants to use CSS variables for tone/soft/solid styling and adjusts size/variant definitions. |
src/components/atoms/chip/Chip.stories.tsx |
Adds visual review stories and updates docs copy to support manual review workflows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refines the Chip visual treatment so the default reads as a compact solid primary chip, not a rounded button, and improves visual review coverage.
Closes #145
Type of change
Component checklist (skip if not applicable)
types.ts,use*.ts,Component.tsx,index.ts,*.stories.tsx)types.ts, not inlinetheme.cssanytypes — TypeScript strictChanges
src/components/atoms/chip/types.tssrc/components/atoms/chip/useChip.tsmin-h-11sizing, and preserved expanded hit areas without changing visual height.src/components/atoms/chip/Chip.stories.tsxsrc/styles/theme.cssHow to test
pnpm testpnpm exec vitest run src/components/atoms/chip/Chip.test.tsxpnpm exec tsc --noEmitpnpm run storybook-buildgit diff --checkManual review:
pnpm run storybookAtoms/Chip / UsageReviewandAtoms/Chip / Stress.Screenshots / recordings (if applicable)
Not attached.
Notes for reviewer
min-h-11target sizing was removed because Storybook action injection made the default chip render too tall.