svelte-jsonschema-form icon indicating copy to clipboard operation
svelte-jsonschema-form copied to clipboard

Empty root object message

Open romancow opened this issue 2 years ago • 3 comments
trafficstars

Would probably be nice to show some sort of message conveying that the root object does not have any properties when this is the case, so people aren't confused by just an empty form. Probably should be configurable (via UI options) so it can be tailored to the specific use case.

romancow avatar Oct 09 '23 19:10 romancow

This might not be bad but I would lean toward saying that it is out of scope and then leaving it to the rest of the site to present a meaningful message if there isn't a meaningful JSON schema. The tricky thing about taking this on is that there could be a lot of different opinions about look & feel that might be nice to avoid.

brollb avatar Oct 09 '23 19:10 brollb

My only thought was, with some taxonomies, there is a title, but no properties. So it might be nice to have a way to easily "insert" a message inside the form - between the title and any action buttons. This could easily be customizable by using a slot. It could even just be a generic "message" slot, leaving the consumer the responsibility of testing for emptiness and showing their message.

romancow avatar Oct 09 '23 19:10 romancow

Also, I'd imagine this is pretty low priority. I just noticed when I hit a taxonomy that was empty, I kept wondering if something was broken, so thought I'd take a note of it.

romancow avatar Oct 09 '23 19:10 romancow