Skip to content

Conversation

@ntatoud
Copy link
Member

@ntatoud ntatoud commented Dec 27, 2025

Summary by CodeRabbit

Release Notes

  • Chores

    • Upgraded UI component library dependency to stable 1.0.0 release.
  • Improvements

    • Enhanced form component accessibility with proper ARIA attributes for better label association and screen reader support.
    • Improved NumberInput component's value change handling with better event propagation.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 27, 2025

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

Project Deployment Review Updated (UTC)
start-ui-web-v3 Ready Ready Preview, Comment Jan 9, 2026 9:13am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 27, 2025

Walkthrough

Dependency upgrade from @base-ui-components/react to @base-ui/react with corresponding component import path updates, accessibility enhancements (useId, aria-labelledby, aria-invalid), and prop API adjustments across form and UI components.

Changes

Cohort / File(s) Change Summary
Dependency Migration
package.json
Updated @base-ui-components/react (1.0.0-beta.1) to @base-ui/react (1.0.0)
UI Components - Import & Accessibility Updates
src/components/ui/checkbox.tsx, src/components/ui/checkbox-group.tsx, src/components/ui/radio-group.tsx
Updated import paths to new package; added useId-based accessibility IDs and aria-labelledby attributes on checkbox, radio controls, and label associations
Number Input API Refactoring
src/components/ui/number-input.tsx, src/components/ui/number-input.stories.tsx
Migrated from invalid prop to aria-invalid; updated story to use aria-invalid and data-invalid attributes
Field Number Component Updates
src/components/form/field-number/index.tsx
Removed invalid prop forwarding to NumberInput; extended onValueChange callback to receive and propagate both value and event parameters

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

components

Suggested reviewers

  • ivan-dalmet
  • yoannfleurydev
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the base-ui dependency from beta to the stable 1.0.0 release, which is reflected throughout the changeset in package.json and import updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 926575f and af0d9a0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright E2E Tests

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

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/form/field-number/index.tsx (1)

77-95: Critical: Missing aria-invalid attribute.

The removal of the invalid prop forwarding is correct since NumberInput now uses aria-invalid. However, the aria-invalid attribute is not being set based on fieldState.error. This breaks accessibility as screen readers won't be informed when the field has validation errors.

🔎 Proposed fix
 <NumberInput
   id={ctx.id}
+  aria-invalid={fieldState.error ? true : undefined}
   aria-describedby={
     !fieldState.error
       ? `${ctx.descriptionId}`
       : `${ctx.descriptionId} ${ctx.errorId}`
   }
   {...rest}
   {...fieldProps}
   value={formatValue(value, 'from-cents')}
   onValueChange={(value, event) => {
     onChange(formatValue(value, 'to-cents'));
     rest.onValueChange?.(value, event);
   }}
   onBlur={(e) => {
     field.onBlur();
     rest.onBlur?.(e);
   }}
 />
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec00126 and b6bb785.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • package.json
  • src/components/form/field-number/index.tsx
  • src/components/ui/checkbox-group.tsx
  • src/components/ui/checkbox.tsx
  • src/components/ui/number-input.stories.tsx
  • src/components/ui/number-input.tsx
  • src/components/ui/radio-group.tsx
🧰 Additional context used
🧬 Code graph analysis (3)
src/components/ui/radio-group.tsx (2)
src/components/form/field-radio-group/docs.stories.tsx (7)
  • form (124-147)
  • form (179-233)
  • form (41-63)
  • form (65-92)
  • form (149-177)
  • form (94-122)
  • z (20-25)
src/components/form/field-radio-group/index.tsx (1)
  • field (59-114)
src/components/ui/checkbox.tsx (2)
src/components/form/field-checkbox/docs.stories.tsx (1)
  • props (137-157)
src/components/form/field-checkbox/index.tsx (1)
  • field (50-75)
src/components/ui/number-input.stories.tsx (1)
src/components/ui/number-input.tsx (1)
  • NumberInput (25-115)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: 🔬 Tests (22)
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: 🔬 Tests (24)
  • GitHub Check: 🔬 Tests (lts/*)
🔇 Additional comments (9)
src/components/ui/checkbox.tsx (1)

1-1: LGTM!

Import path updated consistently with the library migration. No functional changes to the Checkbox component.

src/components/ui/checkbox-group.tsx (1)

1-1: LGTM!

Import path updated consistently with the library migration.

package.json (2)

58-58: New dependency added.

The @radix-ui/react-slot dependency has been added. This is likely required by the new @base-ui/react package for composition patterns.


46-46: Document the breaking changes addressed in the migration to @base-ui/react v1.0.0.

The codebase has successfully migrated the package import (old @base-ui-components/react references are absent), and component usage shows correct patterns (explicit value props on Checkbox/Radio). However, there is no migration documentation or checklist in the repository. Per the v1.0.0 release notes, breaking changes include: event callback signatures (onOpenChange now receives eventDetails object), prop renames (trackAnchor → disableAnchorTracking, loop → loopFocus), and component-specific changes (Accordion explicit values, Checkbox form submission behavior). Create a migration guide documenting which breaking changes were addressed and verify coverage across all @base-ui/react component usage.

src/components/ui/number-input.tsx (2)

1-1: LGTM!

Import path updated to the new @base-ui/react package structure.


14-14: Improved API: aria-invalid is now the public prop.

The change from an invalid prop to aria-invalid is semantically better and aligns with ARIA standards. The prop aliasing syntax ('aria-invalid': invalid) correctly extracts the prop, and the simplified assignment aria-invalid={invalid} on Line 78 is appropriate since the Input component should handle boolean/undefined values correctly.

Also applies to: 34-34, 78-78

src/components/ui/number-input.stories.tsx (1)

18-20: LGTM!

Story correctly updated to use aria-invalid prop instead of the deprecated invalid prop. The data-invalid attribute is a good addition for styling purposes.

src/components/form/field-number/index.tsx (1)

87-90: Good enhancement: event forwarding added.

The extended signature for onValueChange to include the event parameter is a useful improvement, allowing consumers to access the original event if needed.

src/components/ui/radio-group.tsx (1)

1-2: The import migration is straightforward, but verify for breaking changes beyond the rename.

While the package rename from @base-ui-components/react to @base-ui/react is a simple find-and-replace, v1.0.0 is explicitly marked as a breaking release in the official changelog. Beyond the import paths, verify:

  • Render prop pattern differences (Base UI uses useRender) to ensure existing component usage remains compatible
  • No duplicate type or runtime issues from mixing old and new package namespaces
  • Test Radio and RadioGroup functionality end-to-end, especially accessibility behavior

Refer to the v1.0.0 changelog for the full list of breaking changes and complete type/test verification before finalizing.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b6bb785 and 95a4077.

📒 Files selected for processing (3)
  • src/components/form/field-checkbox-group/index.tsx
  • src/components/form/field-checkbox/index.tsx
  • src/components/form/field-radio-group/index.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ivan-dalmet
Repo: BearStudio/start-ui-web PR: 532
File: src/features/auth/PageOAuthCallback.tsx:43-45
Timestamp: 2024-09-30T11:07:14.833Z
Learning: When suggesting changes to `useEffect` dependencies in React components, ensure that removing dependencies doesn't cause React Hook errors about missing dependencies.
🧬 Code graph analysis (2)
src/components/form/field-checkbox-group/index.tsx (2)
src/components/form/field-checkbox-group/docs.stories.tsx (5)
  • form (60-87)
  • form (89-117)
  • form (144-172)
  • form (36-58)
  • form (119-142)
src/components/ui/checkbox.tsx (1)
  • Checkbox (46-85)
src/components/form/field-checkbox/index.tsx (2)
src/components/ui/checkbox.tsx (1)
  • Checkbox (46-85)
src/components/form/field-checkbox/field-checkbox.browser.spec.tsx (3)
  • FormField (31-41)
  • FormField (102-112)
  • FormField (132-143)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright E2E Tests
🔇 Additional comments (1)
src/components/form/field-checkbox-group/index.tsx (1)

90-90: The aria-label is necessary and correct per @base-ui/react v1.0.0 requirements.

The @base-ui/react documentation specifies that each checkbox in a CheckboxGroup must have an accessible name, which can be provided via aria-label or aria-labelledby. The combination of aria-label={label} (line 90) and visible {label} (line 95) is not redundant—the aria-label provides the accessible name for assistive technologies, while the children text provides the visible label. This pattern is the recommended approach for Base UI v1.0.0 and is correctly implemented across all three files.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95a4077 and 926575f.

📒 Files selected for processing (3)
  • src/components/form/field-radio-group/field-radio-group.browser.spec.tsx
  • src/components/ui/checkbox.tsx
  • src/components/ui/radio-group.tsx
💤 Files with no reviewable changes (1)
  • src/components/form/field-radio-group/field-radio-group.browser.spec.tsx
🧰 Additional context used
🧬 Code graph analysis (2)
src/components/ui/checkbox.tsx (3)
src/components/form/field-checkbox/docs.stories.tsx (3)
  • props (137-157)
  • form (39-61)
  • form (122-166)
src/components/form/field-checkbox/index.tsx (1)
  • field (50-75)
src/components/form/field-checkbox-group/index.tsx (1)
  • field (59-101)
src/components/ui/radio-group.tsx (1)
src/components/form/field-radio-group/index.tsx (1)
  • field (59-114)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright E2E Tests
🔇 Additional comments (5)
src/components/ui/checkbox.tsx (2)

56-64: LGTM! Good use of useId for accessibility.

The ID generation pattern correctly prioritizes user-provided IDs and falls back to generated ones, ensuring proper label-control association.


1-1: No changes needed. The import path @base-ui/react/checkbox is correct for version 1.0.0 and the API is properly used with namespaced components (CheckboxPrimitive.Root and CheckboxPrimitive.Indicator).

src/components/ui/radio-group.tsx (3)

5-5: LGTM! Cleaner Fragment usage.

Direct import and usage of Fragment is cleaner than React.Fragment and follows modern React patterns.

Also applies to: 66-66


67-68: LGTM! Good use of useId for accessibility.

The ID generation pattern correctly prioritizes user-provided IDs and falls back to generated ones.

Also applies to: 73-75


1-2: The import paths for @base-ui/react/radio and @base-ui/react/radio-group are correct and match the official documentation for version 1.0.0. No changes needed.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2026

@ivan-dalmet ivan-dalmet merged commit 54e74d8 into main Jan 9, 2026
13 checks passed
@ivan-dalmet ivan-dalmet deleted the chore/update-base-ui branch January 9, 2026 09:14
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.

3 participants