psychoinformatics-de / shacl-vue

Automatic generation of user interfaces from SHACL
https://psychoinformatics-de.github.io/shacl-vue/docs
MIT License
0 stars 0 forks source link

Provide a uniform API for custom input components #42

Closed jsheunis closed 1 week ago

jsheunis commented 3 weeks ago

The current structure for a custom input component:

Ideally, the complexity should be kept low both from the parent component side, as well as from the perspective of developers adding new custom components with possibly complex sub-inputs and logic.

Therefore it would make sense to abstract out some common functionality into a "base component" and "base composable" that any new custom components can inherit from.

jsheunis commented 3 weeks ago

Some progress was made here: https://github.com/psychoinformatics-de/shacl-vue/commit/fe9b9cb3077715c714c3165a07627b9225cf2adb

However, that setup is not functional yet. The plan is to simplify it for now by removing the BaseEditor component, but keeping the useBaseInput composable functionality and tuning that to a leaner implementation.

jsheunis commented 3 weeks ago

A working and simplified implementation (compared to https://github.com/psychoinformatics-de/shacl-vue/commit/fe9b9cb3077715c714c3165a07627b9225cf2adb) has now been added with https://github.com/psychoinformatics-de/shacl-vue/commit/b918ebd467fc45edcf22036a4053064b2d10388a.

jsheunis commented 1 week ago

Closing since the latest update here works sufficiently well for a generalised approach.