feat(forms): signature field type — slice 9c#63
Merged
Conversation
Signature pad: the applicant draws on a canvas; each completed stroke exports a PNG that's uploaded through the existing form upload endpoint, so the answer is a FileAnswer stored exactly like any file field. - shared: add `signature` to FILE_FIELD_TYPES (validated as a file reference, creates a FileUpload row on submit, shown as a download link in summaries). - web: `SignatureField` canvas widget (pointer drawing, clear button, auto upload on stroke end); wired in `FieldInput`. Upload route treats signature like an image (image/* MIME). Builder offers the signature type. `clear` label added to file-field labels; DE/EN strings. - tests: signature validated as a file-reference answer. Completes Slice 9 (rating family + matrix + signature).
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.
Final field-type slice — the signature pad. Completes Slice 9.
Approach
The applicant draws on a canvas; each completed stroke exports a PNG that is uploaded through the existing form upload endpoint (server → MinIO). The answer is a
FileAnswer, so it's stored, validated, and displayed exactly like any other file field — no new storage path.Changes
signaturetoFILE_FIELD_TYPES: validated as a file reference, creates aFileUploadrow on submit, rendered as a download link in answer summaries.SignatureFieldcanvas widget (pointer drawing, clear button, auto-upload on stroke end), wired intoFieldInput. Upload route treats signature like an image (image/*). Builder offers the signature type. Added aclearlabel to the file-field labels; DE/EN strings.Validation
pnpm typecheck,pnpm lint,pnpm test,pnpm build— all green.With this, Slice 9 (new field types) is complete: rating family (9a), matrix (9b), signature (9c).