Skip to content

fix(shadcn): migrate form components from Form to Field API#1369

Merged
just1and0 merged 3 commits into
mainfrom
fix/migrate-form-to-field-component
Jun 11, 2026
Merged

fix(shadcn): migrate form components from Form to Field API#1369
just1and0 merged 3 commits into
mainfrom
fix/migrate-form-to-field-component

Conversation

@just1and0

@just1and0 just1and0 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #1367

  • Migrated all 9 form components from the removed @/components/ui/form to shadcn's current @/components/ui/field component.
  • Added react-hook-form and @hookform/resolvers to registry dependencies so they are installed when users add components.
  • Deleted unused form.tsx wrapper component.
demo.video.mp4

- Migrated all 9 form components from the removed `@/components/ui/form` to
  shadcn's current `@/components/ui/field` component.
- Added `react-hook-form` and `@hookform/resolvers` to registry dependencies
  so they are installed when users add components.
- Deleted unused `form.tsx` wrapper component.

Fixes #1367

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request migrates several authentication forms in the shadcn package from the old Form API to a new Field API, replacing FormField with Controller and updating the registry specifications and tests accordingly. The review feedback highlights that this migration breaks automatic accessibility linking and error state styling. To resolve this, the reviewer recommends explicitly passing htmlFor to FieldLabel, id and aria-invalid to the input components, and data-invalid to the Field wrappers across all migrated forms.

Comment thread packages/shadcn/src/components/email-link-auth-form.tsx
Comment thread packages/shadcn/src/components/forgot-password-auth-form.tsx
Comment thread packages/shadcn/src/components/phone-auth-form.tsx
Comment thread packages/shadcn/src/components/phone-auth-form.tsx
Comment thread packages/shadcn/src/components/sign-in-auth-form.tsx
Comment thread packages/shadcn/src/components/sms-multi-factor-enrollment-form.tsx
Comment thread packages/shadcn/src/components/sms-multi-factor-enrollment-form.tsx
Comment thread packages/shadcn/src/components/totp-multi-factor-assertion-form.tsx
@just1and0 just1and0 removed the request for review from russellwheatley June 9, 2026 10:00
@just1and0 just1and0 merged commit c330811 into main Jun 11, 2026
10 checks passed
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.

Adding FirebaseUI using the ShadCN tutorial breaks the build

2 participants