inrupt / solid-sdk-forms

A Form Library for the Solid SDK
MIT License
6 stars 0 forks source link

request for site to convert shex to ui forms #47

Open sideshowtom opened 4 years ago

sideshowtom commented 4 years ago

I wonder if its possible for Inrupt to offer an online converter from shex to ui forms using the code at https://github.com/inrupt/solid-sdk-forms#usage. I couldn't find anything online. I don't think the forms playground does that. I've been trying to make one on github pages, which should be easy, but with my poor javascript skills its taking a long time.

james-martin-jd commented 4 years ago

You can actually see this exact thing in action at https://generator.inrupt.com/formModel/converter - this can be found under the profile dropdown menu at the top right. It also lets you test rendering as well.

It's a two step process - first convert the shex to a form model, then save the form model and input it into the form model renderer page.

Code examples are available in the generator app as well, as the conversion and solid-sdk-forms code is executed there (though the renderer is part of the components library since it is React specific).

scenaristeur commented 4 years ago

@james-martin-jd I've tried your converter with this shex https://holacratie.solid.community/public/Schema/tension.shex but it can't read with ' cannot read property 'startswith' of undefined' . Is my shape incorrect? I can read it with https://scenaristeur.github.io/holon/?shape_url=https://holacratie.solid.community/public/Schema/tension.shex