Repository navigation
refactor: replace one-off props with shared names - #980
rohanchkrabrty wants to merge 2 commits into
Conversation
Remove Command.DialogContent width and Search width. Rename Skeleton borderRadius to radius and Breadcrumb.Item current to active. Merge DatePicker and FilterChip onErrorChange into onValidityChange, as on CalendarPreview.Input. Add gap 0 to Flex and Grid, and radius to Toast.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
commit: |
- Remove FilterChip calendarProps.onValidityChange. It repeated calendarProps.slotProps.input.onValidityChange. - Shorten the DatePicker onValidityChange JSDoc and move its usage notes to the Calendar page. - Set the docs search width in CSS instead of an inline style. - List Skeleton and Toast.Provider under per-component radius, and DataView.Search in the upgrading notes.
Summary
widthfromCommand.DialogContentandSearch. Set the palette width withclassNameorstyle. Search fills its parent's width from CSS, so the inline style is gone and the default does not change.borderRadiustoradius, and addradiustoToast.ProviderandToast. Both use the sharednone | small | medium | large | fullscale that Button, Dialog and Command use. Default radii do not change.Breadcrumb.Itemcurrenttoactive, as onSidebar.Item.onErrorChangeand FilterChipcalendarProps.onErrorChangewithonValidityChange, the callbackCalendarPreview.Inputalready has.gap,columnGapandrowGaptake0. Add the old to new mappings to the Upgrading page.Decisions where the proposal is silent:
onValidityChange(validity: { valid: boolean; reason?: 'unparseable' | 'out-of-bounds' | 'unavailable' | 'out-of-order'; message?: string }), the name and typeCalendarPreview.Inputalready uses. DatePicker reportsunparseableorout-of-boundswith the message'Invalid date', and fires when the reason changes. It has one argument. The details argument from the change-callbacks proposal is not added.calendarProps.onValidityChange(renamed fromonErrorChange), so its API matches DatePicker.calendarProps.slotProps.input.onValidityChangestill works.data-active="true"in place ofdata-current="true", to match the prop and Sidebar.Item.widthfrom its props, so TypeScript reports old usages. The docs tell users to size the parent.radiusis onToast.Provider, next toposition, and applies to every toast it renders.docs/V1-migration.mdand the RFCs keep the old names, because they describe earlier releases.No open PR covers this change. Search
sizeandvariantare changed in separate PRs.Checks run:
pnpm lint,pnpm exec tsc --noEmitinpackages/react, andpnpm test:apsarapass. I compared the Skeleton, Breadcrumb, Search, Navbar, Command (and the docs search dialog), Calendar, FilterChip, Flex, Grid, Toast and DataView pages on a local dev server with the deployed docs (main). Skeleton and Command were checked in light and dark themes, the other pages in one of them. Sizes, radii and colors match. I also checked gap0in the Flex and Grid playgrounds and the DatePicker Field error.