cozemble / monorepo

A data and process canvas
https://cozemble.com
Apache License 2.0
13 stars 1 forks source link

JSON schema based model slots #70

Open mike-hogan opened 1 year ago

mike-hogan commented 1 year ago

Imagine a repl, where I can define jsonschema for the configuration of a slot type. If its a decimal number, that schema might be: number of decimal places, min number, max number, number format.

In response to editing that json schema, the UI to define those values for your new decimal property shapes itself. And you can interact with it to configure the particular slot instance in the repl.

Underneath that slot editor is a preview of the slot viewer and editor in a made up data table. You can click on the value to edit it. But also in the repl are two areas to edit the svelte code of the editor and viewer. They will have fixed initial script sections, because the contract between cozemble and editors/viewers is fixed. You will get a value and an onChange function.

You can edit the svelte in these areas until you get the behaviour you want.

Then you can save your new slot type. Whether that lives only in your tenant or gets published to a global repo is not clear, but possibly should be a user decision.

Also not clear if this slot definer should be in cozemble main, or something separate.