feat: [SC-67391] BoundForm component spike #1122
Draft
+290
−2
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.
Spike to explore the concept of a
BoundForm
which codifies how a standardform-state
"bound" form should be presented as expressed via "config" rather than relying on the correct combination ofBoundFoo
input and layout components.Standard form layout designs: https://www.figma.com/design/OfJJm1CXHRGkrHNcPu2grY/2025-UX-Standardization?node-id=513-19012&t=UZAEe6GPqDn3sXsT-0
Simple Example
With the exception of more complex inputs like select fields that require passing in loaded select options/etc, simple inputs don't require any props to be passed to their input functions as the
FormState
field
will be automatically passed to theBoundFoo
input component based on the field name key.Multi-Section Example
Sections can be defined with titles and option icons. Additionally, the form input functions are simply wrapping the
Bound_
component equivalents and accept all of the same props. However we can selectivelyOmit<...>
unsupported props to drive further consistency.Additional Advantages
There's also an opportunity to bake in UX nice-to-haves that generally aren't worth the time on each feature like improved loading states. Because we express the shape of the form via the config, we can match the loading state skeleton loaders to the form layout. Demo