Drag 'n Drop Form + JSON-Schema Builder #215
elbakerino
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This serves as discussion for what is required to get a full Drag 'n Drop Form Builder included as UI-Schema packages.
Object Schemas
My biggest issue: dnd should use
array
to work correctly and very safe, thus "add new property schema" would need to "add new item to array" and not just a new keyword to theproperties
key.property
to an existing name and show the user that there is an error{ abc: 1, abcd: 2}
, the user must be able to renameabcd
toab
with deleting the last charactersproperty
would be used, it would be impossible to delete thed
fromabcd
(or the otherproperty
would be overwritten)Conditional Schemas
// todo
Drag 'n Drop
The
@ui-schema/kit-dnd
implementation will get a leaner and fixed implementation - internally already done in the last months, moved milestone tov0.5.x
.First Target
The first step towards this is to define a
schema
anddata
structure which has JSON-Schema as input and JSON-Schema as output - with basic support for all types:object
,array
,string
,number
etc.Together with ideas on how the
object
widget should work with adding/changingproperties
- atm. there is no widget that can change/addstoreKeys
, e.g.{ properties: { <new-key>: {} } }
with arbitrary user-input.Example: Table of Tuples
It is already possible to define a JSON-Schema, which provides an UI that produces JSON-Schema, it only works in simple special cases like
array tuples
with theTable
widget.Copy and paste this schema into the live editor:
Under
data
you see the produced schema, similiar to this:This schema you can now copy and paste again into the
schema
input, now you see your just configured table.Beta Was this translation helpful? Give feedback.
All reactions