RFC: Angular package for Formisch - architecture design and open questions #100
sonukapoor
started this conversation in
Ideas
Replies: 1 comment
-
|
This looks good to me! Thank you for your research.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following our conversation about adding Angular support to Formisch, I have done a deep architectural study of Formisch's internals and Angular Signals to understand how an Angular adapter would work. This discussion documents the findings and open design questions before I go further.
How Angular maps to Formisch's signal system
Formisch's
Signal<T>interface ({ value: T }) can be adapted to Angular'sWritableSignalwith a thin getter/setter wrapper:Signal<T> { value }WritableSignal<T>(callable)get value() { return s(); },set value(v) { s.set(v); }batch(fn)untrack(fn)untracked(fn)from@angular/coreNo changes to existing core code.
index.angular.tsis purely additive, following the exact same pattern as the six existing framework adapters.Proposed API
Fields also available declaratively:
Package structure
Follows the exact monorepo layout of every existing adapter:
Why this differs from Angular Signal Forms
Angular Signal Forms (experimental in v21) treats Valibot as a validator plugin layered on top of a separately owned signal. Formisch's approach treats the Valibot schema as the single source of truth - the field tree, types, and validation all derive from it. The validated output type (
v.InferOutput<TSchema>) is preserved at submission, which Angular Signal Forms does not support.Open questions
@formisch/angularlive in the main monorepo (frameworks/angular/) from the start, or begin as a separate community repo and graduate later?@formisch/coreI should be aware of before building the adapter?I am ready to start the prototype and happy to open a draft PR whenever you are ready.
Beta Was this translation helpful? Give feedback.
All reactions