Form Question Edit Component and Test Page #258
Closed
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.
Built the form question editor component and a test page to try it out (looks pretty clean).
Supports multiple question types with dynamic UI and uses Zod schemas.
Why
To support the new "Blade Form Manager" (which will replace Google Forms for our elections and applications), and needed to build the core frontend component that allows admins to actually create and edit questions. This PR delivers that standalone component so we can start building the larger form builder UI.
What
I added the following:
QuestionEditCardComponent: The main UI for editing a single form question (apps/blade/src/components/admin/forms/question-edit-card.tsx). It looks like the Google Forms and has the following options so far:
Short Answer / Paragraph / Multiple Choice / Checkboxes / Dropdown / Date / Time
Zod Types: are on apps/blade/src/lib/types/form.ts with FormQuestionSchema and QuestionOptionSchema.
To test it out (Dev): I added a temporary page at /admin/forms/test-editor to show and test the component without needing the full backend integration yet.
Test Plan
I ran the blade app locally (pnpm dev:blade) and verified the component at http://localhost:3000/admin/forms/test-editor.


Interaction: confirmed that simple text inputs, type switching, and the "Required" toggle updates the state correctly.
Option Logic: tested adding, editing, and deleting options for multiple-choice/dropdown questions; ensure unique IDs are generated correctly using crypto.randomUUID().
Responsiveness: validated that the card layout holds up on smaller screens.
(If any features are to be added feel free to add em in)
P.S. I will change the name and clean up descriptions after.