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' (P2302)
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' (P2302)
AND I focus the input field and enter 'single'
THEN I would like to see the 'single value constraint' item in the suggestions.
Patches:
[ ] [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/446775/ | Introduce entity selector search suggestions hook ]]
[x] [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/WikibaseQualityConstraints/+/447783/ | Use hook in quality constraints js module ]]
Test here:
https://wikidata-constraints.wmflabs.org/wiki/Property:P31