Closed 1602 closed 6 years ago
Not at the moment. It seems like it has been ceased during some of the cleanups. I'll restore and let you know in this issue.
Sounds good, and thank you!
Hey @dhruvio , it's been a long time, so I wanted to provide an update on this. Unfortunately old (ceased) form generator update was not feasible to update, because json-schema advanced quite far since first iteration on forms generator and supports all features of JSON Schema, like allOf
, anyOf
, oneOf
which make form generation considerably difficult, so I decided to take my time and implement form generation demo from scratch. It is work in progress, final result will close to something like that:
Please, forgive some badness in styling and example content, this is a very work in progress screenshot. The idea is that you see json schema editor on the left and a result on the right. Both sides rendered using form generator based on JSON Schema draft 6.
Note that this is not just a demo, but also a reusable component, which takes Value
and Schema
and renders form using material design guidelines.
This is a deviation from the initial idea for this demo to be a code snippet which could be reused rather than a dependency. This pivot has been made because of grown complexity of "snippet", which depends on complexity of JSON Schema standard.
If you have any ideas regarding demo capabilities or for component in general, please let me know, this is the right time to influence further direction of this piece of software. Thank you!
It may be worthwhile to look at how it's done at https://github.com/mozilla-services/react-jsonschema-form. We are using this component successfully embedded in Elm, but it would of course be great to have a pure Elm solution.
Basically, what they have is JSON schema, and an additional "uiSchema" that have more information about how the form should look, as there is not always a unique choice to be made for the fields.
Let me know how I can help @1602
@dhruvio thank you kindly.
I realised I took a wrong turn down the road, by choosing both style-elements and google's material design as a stack for this demo. It is technically possible to make them work together, but it has taken too much of my energy allocated for this task. So, as a next step I wanted to rollback to native html module, using BEM as stylesheet coding style, and rewrite the whole thing from ground up.
So, what I'm saying is that current codebase could be used as an example of most of the cases that needs to be covered in attempt to implement forms generation based on json schema, but whole view layer should be scraped.
I planned to dedicate some time this weekend to start this thing over, so if you have time and passion to work on this, we could catch up afterwards.
A quick status update here. I've started rewriting and covered basics:
Demo looks like this:
Published in gh-pages: https://1602.github.io/json-form/
Next steps will be some of those (not necessarily in this order):
I'm going to close this issue, further feedback on json-form is very welcome here: https://github.com/1602/json-form
Is there a demo form generator available using this package?