sanity icon indicating copy to clipboard operation
sanity copied to clipboard

proposal: data agnostic FormField and FormFieldset components

Open bjoerge opened this issue 3 years ago • 1 comments

Description

This takes data concerns away from the FormField, FormFieldSet and their support components in @sanity/base, so that they can be used purely as view components (tl;dr it replaces __unstable-props that currently expects data, with props that expects React nodes). The form-builder package now provides their own internal FormField/FormFieldSet components that's optimized for it's own use case, that still support receiving the data props, convert them to react nodes and delegates to the FormField/FormFieldSet components imported from @sanity/base.

What to review

Naming in particular. It might be confusing operating with two set of components with same names (FormField/FormFieldSet) that isn't actually the same component. We could e.g. call the ones in form-builder for FormBuilderFormField/FormBuilderFormFieldSet, but I'm all ears for suggestions.

Notes for release

n/a

bjoerge avatar Jun 18 '21 09:06 bjoerge

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

perf-studio – ./

🔍 Inspect: https://vercel.com/sanity-io/perf-studio/GkXbKfw6MgXvAtKBGPzC32Pb2kHH
✅ Preview: https://perf-studio-git-ui-ch7680poc-slots-based-formfield-and-f-645355.sanity.build

[Deployment for 7406868 failed]

test-studio – ./

🔍 Inspect: https://vercel.com/sanity-io/test-studio/H13AKoyzuH4vwVo3dhSM8Ck1Ud4P
✅ Preview: https://test-studio-git-ui-ch7680poc-slots-based-formfield-and-f-e03a15.sanity.build

vercel[bot] avatar Jun 18 '21 09:06 vercel[bot]

We've rethought how this works in v3, so I will close this.

rexxars avatar Aug 11 '22 06:08 rexxars