gbv / bartoc.org

Source code of BARTOC.org user interface
https://bartoc.org/
23 stars 10 forks source link

Clean up loading scheme/concept data in front end #83

Open stefandesu opened 3 years ago

stefandesu commented 3 years ago

https://github.com/gbv/bartoc.org/blob/b76a0aaaf3ff539a52f1a46eb1167d8292d0a2d3/vue/components/VocabularySearch.vue#L93-L101

https://github.com/gbv/bartoc.org/blob/b76a0aaaf3ff539a52f1a46eb1167d8292d0a2d3/vue/components/LanguageSelect.vue#L37

https://github.com/gbv/bartoc.org/blob/b76a0aaaf3ff539a52f1a46eb1167d8292d0a2d3/vue/components/ItemEditor.vue#L390-L399

https://github.com/gbv/bartoc.org/blob/b76a0aaaf3ff539a52f1a46eb1167d8292d0a2d3/vue/utils.js#L24-L51

https://github.com/gbv/bartoc.org/blob/b76a0aaaf3ff539a52f1a46eb1167d8292d0a2d3/vue/utils.js#L53-L71

Questions:

nichtich commented 3 years ago

Concept loading from schemes internally used in BARTOC (licenses, languages, DDC100...) is used

  1. for display of human readable labels (server side also in https://github.com/gbv/bartoc.org/blob/main/views/item.ejs).
  2. for selection (in search and editor)

Some schemes are fairly small so they could be embedded in the page. Search form seems slow at the moment, but possibly for other reasons, so it's unclear whether embedding a full vocabulary in the page is worth the effort.

All schemes except ILC and EuroVoc are locally available, it makes sense to also get them into the local jskos server instance used by BARTOC, so we can use the same cdk registry for all of them.

How about removing loadConcepts and move loading of concepts into the select component just as done with ItemSelect and LanguageSelect? I think it makes sense to put the list of these schemes into the configuration (or a non-configurable JSON file) such as indexingSchemes, so .

stefandesu commented 3 years ago

All schemes except ILC and EuroVoc are locally available, it makes sense to also get them into the local jskos server instance used by BARTOC, so we can use the same cdk registry for all of them.

My thought was rather that the metadata for those vocabularies should be statically provided and have the API information included so that the client knows how to access it. In my opinion, this would be the most elegant solution. Hosting them inside the BARTOC database only because they are used for subjects seems overkill to me.

Search form seems slow at the moment

Looking at the network tab, it seems to be that it actually might be related to having to load top concepts for several vocabularies before the search can be used.