appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.74k stars 3.76k forks source link

[Feature]: Support schema driven way of generating a JSON form #12995

Open dilippitchika opened 2 years ago

dilippitchika commented 2 years ago

Is there an existing issue for this?

Summary

Users want to provide the data types for the fields in the JSON form rather than inferring in automatically.

Why should this be worked on?

Today JSON form makes assumptions when data is bound to it, users don't want any assumptions to be made by the form and follow a particular schema provided to the JSON form.

Front logo Front conversations

dilippitchika commented 2 years ago

Link to conversation (may get archived) - https://discord.com/channels/725602949748752515/972093976771448912/972093979409645608

Link to upvotes - https://discord.com/channels/725602949748752515/760761686549463060/973152275411394610

dilippitchika commented 2 years ago

Link to conversation - https://discord.com/channels/725602949748752515/725609493974614076/1008465912552243230

SidHiremath commented 2 years ago

ANy progress on this, as it is really good feature which remove the lot of risks involved while using autogenerated json form ?

MrChrisRodriguez commented 2 years ago

I was asked to include my use case in the ticket: I'd like to generate the JSON object that defines the form programmatically (i.e. without having to click in the interface) and use that to dynamically populate a JSON form.

You can look at how Retool handles this:

dilippitchika commented 2 years ago

@MrChrisRodriguez i would like to know more about your use-case. Ideally, all the items you mentioned in schema form can also be achieved here but it's a matter of convenience of one over the other. Will you be open for a call to discuss more?

If yes, can you please block a slot which works for you here - https://calendly.com/dilip_pitchika/30min?month=2022-10 It would really help us improve the json form.

MrChrisRodriguez commented 2 years ago

Echoing what I imagine @SidHiremath is conveying: building a form from a source data object requires me to guess how your interpreter works; it's not outwardly deterministic.

While I agree that it is easier in the simplest of cases (and maybe that's all you intend to support), if I want to do anything besides a simple input field, the current model starts to fall apart.

For example:

These are two simple examples, but if you spend a few minutes you'll be able to come up with so many more.

The way I see it, every component already has a unique key and properties that are likely configured and stored in JSON. Expose that to us so that we can use it to programmatically compose the interface we want while still benefitting from all of AppSmith's wiring capabilities.

dilippitchika commented 1 year ago

Another request on the feature, the customer has more than 300 forms with schemas they want to show for their users with schema details. This means each time they use the json form with radio groups it goes away when they switch between different form types.