Implement a sample data generation module. #993
Labels
backlog
Queued in backlog
enhancement
New feature or request
needs discussion
Needs further discussion
Is your feature request related to a problem? Please describe.
As I am building a bigger and bigger form, defining the input data manually becomes a pretty tedious task. It would be nice to have a module in place which would allow us to generate some sample data for the input automatically.
This would remain very simple within form-js, but opens up integrations with generative models to generate said data for you and quickly test.
Describe the solution you'd like
The way I see this, we have a module defined at the playground level which would be something like a "sample data generator". This module reads the form tree, and generates an appropriate sample for it. The data itself can just be random numbers and words within the initial implementation.
Or probably even better it would just build up the object tree for you, deep merge it with the existing data and default all the values to empty strings, array and nulls depending on type requirements of the fields.
This also lets us explore into having more type-specific fields, and we could potentially build up on this to provide a typed input data form schema, building it as a utility function so that any other use-cases may hook into it.
Following that, a button would be implemented on the input data window which would call this module, and insert this new sample data into the input. Implementing libraries could extend this module to instead make calls to any generative AI module, which would let them build sensible data which is form context aware.
Describe alternatives you've considered
We could also allow this to be built entirely as an extension outside of the form-js library. In this case, we would need to create extension points here to allow for customization of the input data panel (to add whatever UI interaction we need).
Additional context
The long term UX vision should be kept in mind when thinking about this topic, as I see changes to the input and output panels in the mid-term future.
The text was updated successfully, but these errors were encountered: