pr zod and ui fixes - #41
Open
johnchun10 wants to merge 2 commits into
Open
Conversation
…rofile/application forms
❌ Deploy Preview for bigredhacks-fa25 failed. Why did it fail? →
|
Keobkeig
requested changes
Apr 21, 2026
| try { | ||
| const saved = JSON.parse(localStorage.getItem(STORAGE_KEY) || "{}"); | ||
| if (!saved.firstName && !saved.lastName && !saved.email) return null; | ||
| // Dietary may be stored as a string (legacy single-select) or array |
Contributor
There was a problem hiding this comment.
get rid of the legacy single-select should be a multi select by default.
|
|
||
| export const SHIRT_SIZES = ["XS", "S", "M", "L", "XL", "2XL"] as const; | ||
|
|
||
| export const LEVEL_OF_STUDY_OPTIONS = [ |
Contributor
There was a problem hiding this comment.
this is silly, clean this up to make more sense as to who the people actually filling out the form would enter
| "31+", | ||
| ] as const; | ||
|
|
||
| export const MAJOR_SUGGESTIONS = [ |
Contributor
There was a problem hiding this comment.
these "majors" dont make sense, manually review and clean up the list section
| description?: string; | ||
| fields: FormField[]; | ||
| // Optional runtime validation schema. When present, DynamicForm uses | ||
| // safeParse instead of the built-in required-only check. |
Contributor
There was a problem hiding this comment.
I think we should make Zod schema mandatory. And so the developer cannot create a form config with a zod schema, we have enough examples for even a new person to create a form using the old code
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.
Summary