Skip to content

chore: remove standalone Label, add orientation to Field.Label#766

Open
rohanchkrabrty wants to merge 1 commit intomainfrom
worktree-label-component-removal
Open

chore: remove standalone Label, add orientation to Field.Label#766
rohanchkrabrty wants to merge 1 commit intomainfrom
worktree-label-component-removal

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Summary

  • Remove the standalone Label component (source, tests, docs, playground, and root export) in favor of using Field.Label everywhere
  • Add an orientation prop ("vertical" | "horizontal") to Field.Label; horizontal drops padding-bottom and uses a pointer cursor for inline use beside Radio/Checkbox controls
  • Make Field.Label fall back to a plain <label> when rendered outside a Field.Root, since Base UI's primitive requires the field context
  • Migrate Radio and Checkbox playground examples to Field.Label orientation="horizontal" to demonstrate the new pattern
  • Switch NumberField.ScrubArea from Label to a plain <label>, moving the required typography into a scrub-area-label class

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Apr 29, 2026 8:57pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Warning

Rate limit exceeded

@rohanchkrabrty has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 31 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0c96248c-6e85-40eb-b446-77f095bd5b70

📥 Commits

Reviewing files that changed from the base of the PR and between fddcf49 and 32f160b.

📒 Files selected for processing (18)
  • apps/www/src/components/playground/checkbox-examples.tsx
  • apps/www/src/components/playground/index.ts
  • apps/www/src/components/playground/label-examples.tsx
  • apps/www/src/components/playground/radio-examples.tsx
  • apps/www/src/content/docs/components/field/props.ts
  • apps/www/src/content/docs/components/label/demo.ts
  • apps/www/src/content/docs/components/label/index.mdx
  • apps/www/src/content/docs/components/label/props.ts
  • packages/raystack/components/field/__tests__/field.test.tsx
  • packages/raystack/components/field/field-misc.tsx
  • packages/raystack/components/field/field.module.css
  • packages/raystack/components/label/__tests__/label.test.tsx
  • packages/raystack/components/label/index.tsx
  • packages/raystack/components/label/label.module.css
  • packages/raystack/components/label/label.tsx
  • packages/raystack/components/number-field/number-field.module.css
  • packages/raystack/components/number-field/number-field.tsx
  • packages/raystack/index.tsx

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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 25 minutes and 31 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@rohanchkrabrty rohanchkrabrty changed the title refactor(label): remove standalone Label, add orientation to Field.Label chore: remove standalone Label, add orientation to Field.Label Apr 29, 2026
@rohilsurana rohilsurana changed the title chore: remove standalone Label, add orientation to Field.Label chore!: remove standalone Label, add orientation to Field.Label Apr 30, 2026
Copy link
Copy Markdown
Member

@rohilsurana rohilsurana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 of chore: since removing the Label export 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.

@rohanchkrabrty rohanchkrabrty changed the title chore!: remove standalone Label, add orientation to Field.Label chore: remove standalone Label, add orientation to Field.Label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants