We need an auto-suggest widget where the choices offered will be properties limited to a particular data type - e.g. properties beginning with 'ca' with data type “item” (excluding properties with data type “quantity”, “geo coordinate”, etc)
Why do we need it?
- We're planning to support adding arbitrary statements to files on commons - a user can choose an arbitrary property, and give it a value. In order to be able to deliver incrementally we need to implement this one data type at a time (initially we'll only be supporting properties with data type wikibase-entity), so we need to be able to limit the properties that a user can choose to a particular data type
How are we going to build it?
2 possible approaches:
- modify wbsearchentities so that it accepts data-type as a param, and filters on the server side
- filter out data types we don't want from wbsearchentities responses on the client side, and make additional requests if we don't have enough data (using the continue param)
- I can use wbsearchentities from a js autosuggest to display to the user matching wikidata properties limited to 1 or more data types