feat!(BREAKING CHANGE): remove misused styling props #828
feat!(BREAKING CHANGE): remove misused styling props #828paanSinghCoder wants to merge 3 commits into
Conversation
Remove one-off styling props that should be handled via className/style, and reshape Callout's `outline` boolean into a `variant` axis. CSS defaults are preserved, so default rendering is unchanged. BREAKING CHANGE: - Callout: removed `width`; `outline` boolean -> `variant="outline"` (new `variant?: 'solid' | 'outline'`, default `solid`; orthogonal to `type`, so `type="success" variant="outline"` still combines) - Button: removed `width`, `maxWidth` - Input: removed `width` - TextArea: removed `width` - List: removed `maxWidth` (root) and `minWidth` (List.Label) - Flex: removed `width="full"` - Dialog.Content: removed `width` - AlertDialog.Content: removed `width` Consumers should migrate these to `style`/`className` (or a sized wrapper). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis pull request removes width-related styling props (width, maxWidth, minWidth) across components and demos, migrating callers to use explicit inline style objects instead. Flex drops its width='full' variant; Callout replaces boolean outline with a variant prop and drops width. Dialog/AlertDialog, Button, Input, TextArea, and List APIs remove width-related props. Demo snippets, docs, Figma mapping, and tests were updated accordingly. Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
FilterChip composes Input via classNames.container and relies on the wrapper's inline width:100% (jsdom can't observe the .input-wrapper CSS rule). Dropping the width prop removed that inline default and broke FilterChip's content-fit tests; restore it so composing components stay fluid. Behavior is identical to pre-PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Removes one-off styling props across components that should be handled via
className/style, and reshapes Callout'soutlineboolean into a propervariantaxis. These props let callers inline layout/width overrides that bypass the design system.CSS defaults are preserved (input/textarea/search containers stay
width: 100%; dialogs stay400px), so default rendering is unchanged — only explicit prop usage needs migration.width.outlineboolean →variant="outline"(variant?: 'solid' | 'outline', defaultsolid)width,maxWidthwidthwidthmaxWidth(onList) andminWidth(onList.Label)width="full"widthwidthvarianton Callout is a separate axis fromtype, so the combination is preserved — e.g.<Callout type="success" variant="outline">still works.Migration
<Callout outline><Callout variant="outline"><Callout width={500}><Callout style={{ width: 500 }}><Button width="100%"><Button style={{ width: '100%' }}><Flex width="full"><Flex style={{ width: '100%' }}><List maxWidth="600px"><List style={{ maxWidth: '600px' }}><List.Label minWidth="88px"><List.Label style={{ minWidth: '88px' }}><Dialog.Content width={500}><Dialog.Content style={{ width: 500 }}><TextArea width="300px"><TextArea style={{ width: '300px' }}><Input width="560px">classNames={{ container }}Not in this PR (follow-up)
Search.widthremoval andInputtype-level hardening are deferred. They're coupled —Search extends InputProps, andDataView.Search/DataView.Search(beta) /TableSearchall forward toSearch— so they'll land together. A fewInputdoc examples still referencewidthand will be migrated in that follow-up.Verification
tscclean for changed areas; Biome cleancallout.figma.tsx) updated to mapvariant, docs/demos/playground migrated