As a user that works with constraint definitions I would like to get context based suggestions, so I see the semantically correct ( one-of ) items for suggestions better.
GIVEN I am on a property page.
WHEN I add a property 'property constraint' (Property P2302 on Wikidata)
AND I focus the input field and enter a search string
THEN I would like to see constraint items higher ranked in the suggestions.
GIVEN I am on a property page.
WHEN I add a property 'property constraint' (Property P2302 on Wikidata)
AND I focus the input field and enter 'single'
THEN I would like to see the 'single value constraint' item in the suggestions.
Patches:
- Introduce entity selector search suggestions hook
- Use hook in quality constraints js module
- Show default suggestions on focus
Test here:
https://wikidata-constraints.wmflabs.org/wiki/Property:P31