Closed jmformenti closed 3 months ago
For that claims that use Q items as values, we need to limit the values that appear in the dropdown.
Depending on the claim Pnumber the list of values could change, so the proposal is use an strategy like: https://github.com/PhiloBiblon/philobiblon-ui/blob/master/frontend/components/QuerySearch.vue#L132 but indexing by property.
For example:
claim_autocomplete: { 'P799': { items: [], sparqlQuery: 'SELECT ?itemLabel WHERE { VALUES ?item { wd:Q80 wd:Q81 } SERVICE wikibase:label { bd:serviceParam wikibase:language "${lang},en". } }' }, ... }
In this case, for the claim P799 (Dataset status) we will obtain the values for the dropdown using the related sparql query and the values will be cached in the items array.
In case that there is no an entry for the current property, we will obtain the values as we do now: https://github.com/PhiloBiblon/philobiblon-ui/blob/master/frontend/service/wikibase.service.js#L283
Definition of done
For that claims that use Q items as values, we need to limit the values that appear in the dropdown.
Depending on the claim Pnumber the list of values could change, so the proposal is use an strategy like: https://github.com/PhiloBiblon/philobiblon-ui/blob/master/frontend/components/QuerySearch.vue#L132 but indexing by property.
For example:
In this case, for the claim P799 (Dataset status) we will obtain the values for the dropdown using the related sparql query and the values will be cached in the items array.
In case that there is no an entry for the current property, we will obtain the values as we do now: https://github.com/PhiloBiblon/philobiblon-ui/blob/master/frontend/service/wikibase.service.js#L283
Definition of done