[v2] Port submit metadata support from v1
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 682
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 7
Description
Submit metadata has not yet been implemented in v2. Adding it would allow metadata associated with a submission to remain available throughout the relevant form lifecycle.
Submit metadata should be available in the following places:
- Validators: Optional, because a validator may run for an event other than submission.
- Listeners: Always optional to keep the shared listener context manageable.
onSubmit: Required. The callback should receive the effective metadata, using the per-submission override when provided and the configured default otherwise.
Some thoughts
For validators, a discriminated union with a submit event could make the metadata available with stronger type safety only when the event is a submission. Listener metadata should likely remain optional because expressing the same relationship in the shared listener types may be too cumbersome.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the v1 submit metadata implementation and the corresponding v2 validator, listener, and onSubmit types. Trace how per-submission overrides and configured defaults flow through the form lifecycle. Done means validators can access metadata for submit events, listeners accept optional metadata, and onSubmit receives the effective metadata with type-safe coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100