chore: remove standalone Label, add orientation to Field.Label#766
chore: remove standalone Label, add orientation to Field.Label#766rohanchkrabrty wants to merge 1 commit intomainfrom
Conversation
Removes the standalone Label component and folds its inline labeling role
into Field.Label via a new `orientation` prop ("vertical" | "horizontal").
- Field.Label gains orientation="horizontal" for inline use beside Radio
and Checkbox controls (no padding-bottom, pointer cursor)
- Field.Label now falls back to a plain <label> when used outside a
Field.Root (Base UI's primitive requires the context)
- NumberField.ScrubArea switches from Label to a plain <label> with the
required typography moved into the scrub-area-label class
- Radio and Checkbox playground examples migrate from raw <label> to
Field.Label orientation="horizontal" to demonstrate the new pattern
- Removes Label exports, tests, docs, and playground entry
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
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. Review rate limit: 0/1 reviews remaining, refill in 25 minutes and 31 seconds.Comment |
rohilsurana
left a comment
There was a problem hiding this comment.
LGTM — clean consolidation of Label into Field.Label with good test coverage.
A few minor suggestions for consideration (non-blocking):
- Commit prefix should probably be
feat!:instead ofchore:since removing theLabelexport is a breaking change for consumers. - The fallback
<label>path could strip Base UI-specific props before spreading to avoid potential DOM warnings. - Consider a note in Field docs about
Field.Label orientation="horizontal"as the replacement pattern for standalone Label usage with Radio/Checkbox.
Summary
Labelcomponent (source, tests, docs, playground, and root export) in favor of usingField.Labeleverywhereorientationprop ("vertical"|"horizontal") toField.Label; horizontal dropspadding-bottomand uses a pointer cursor for inline use beside Radio/Checkbox controlsField.Labelfall back to a plain<label>when rendered outside aField.Root, since Base UI's primitive requires the field contextField.Label orientation="horizontal"to demonstrate the new patternNumberField.ScrubAreafromLabelto a plain<label>, moving the required typography into ascrub-area-labelclass