Repository navigation
Template · Forms on shadcn Field + Controller - #7
Open
matyasmihalka wants to merge 4 commits into
Open
matyasmihalka wants to merge 4 commits into
matyasmihalka wants to merge 4 commits into
Conversation
Quacks can carry a mood (happy, sad, angry, silly), chosen in the new-quack form and shown in the feed. Adds the Mood enum and migration, API support, and the shadcn select component.
The mood is now picked from four lucide icon buttons below the textbox. Swaps the shadcn select component for toggle-group.
…cy Form component shadcn deprecated Form/FormField/FormItem/FormControl/FormMessage in favour of Field (Oct 2025). Its docs and current agents now produce the Field pattern, so the template follows. field.tsx is the registry version with local imports (the registry file imports cn from an npm package of that name).
matyasmihalka
force-pushed
the
template/shadcn-field
branch
from
October 12, 2026 12:53
c1c9b38 to
fda29a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Template · improvement to the starter, independent of any seminar. Worth applying to your own repo: later seminars build on it.
Stacked on #8 (Week 3 · Mood on a post); merge that first. The forms in cvičení 4 (13. 10.) are written this way, and it is what shadcn's docs and current agents produce.
Why
shadcn deprecated
Form/FormField/FormItem/FormControl/FormMessagein October 2025 in favour ofField. Keeping the oldform.tsxwould leave you with two ways of writing the same form.What changes
components/ui/field.tsxadded: the shadcn registry file, importingcnfrom@/lib/utilslike every other component.components/ui/form.tsxremoved.QuackForm,SignInForm,SignUpFormrewritten to React Hook FormController+Field/FieldLabel/FieldError, the mood toggle group included.CLAUDE.md: new Forms rule.Controller+field.tsx,QuackForm.tsxis the example, don't add the oldFormcomponents.Checked
pnpm check-allpasses🤖 Generated with Claude Code