gbv / jskos-vue

A suite of components and plugins for Vue 3 related to JSKOS.
https://gbv.github.io/jskos-vue/
MIT License
0 stars 1 forks source link

Decouple from cocoda-sdk #14

Closed nichtich closed 3 years ago

nichtich commented 3 years ago

This code smells because in contrast to the rest of jskos-vue it depends on a "registry" object that is not part of JSKOS specification:

https://github.com/gbv/jskos-vue/blob/dev/src/components/ItemSearch.vue#L104-L113

A solution may be to remove the registry property, make search required and provide a helper function that generates a search function from registry and/or scheme. Another solution may be to create additional components ConceptSuggest, and SchemeSuggest on top of ItemSuggest in applications that make use of cocoda-sdk.

stefandesu commented 3 years ago

Yeah, I guess you're right. However, I would still like to make it as easy as possible to use it together with a cocoda-sdk registry. Can we still add the helper utilities or the additional components to jskos-vue?

(I think additional components would be nice, but helper utilities would be somewhat cleaner. As long as the documentation shows how to use it, I think helper utilities would be fine for this.)