As an editor, I want to easily search and find an EntitySchemas by their label, alias or ID when making a statement
Problem
Currently, when statements are made using the new EntitySchema datatype, EntitySchemas can only be searched and accepted by their ID, making it difficult for users to find which EntitySchema they're looking for.
To make EntitySchemas easier to find when making statements, we would like to allow users to input EntitySchemas by their label or alias as well as their ID. And also display them by their label, replicating the format that is used for Items i.e. "Label"
This should also allow users to find EntitySchemas by their label and ID with autocomplete. And also display them by their label, replicating the pattern we use for Items.
Screenshot
How autocomplete search currently looks for Items:
BDD
GIVEN a statement
AND an EntitySchema datatype
WHEN an EntitySchema is searched for
THEN it accepts EntitySchema labels, aliases and IDs
Acceptance criteria:
- The EntitySchema datatype accepts EntitySchema labels, aliases and IDs as an input
- Autocomplete displays EntitySchemas that match the input
- The language of the label follows the UI language
Notes
- The required search functionality doesn’t exist yet and will probably have to be built.
- Implementing this will likely require adding a new API endpoint that supports search EntitySchema labels and aliases via ElasticSearch. This will require a conversation with the WMF search team. We should take care during that conversation to make sure that search includes the entire EntitySchema (including the schema text and descriptions) is still the behavior on Special:Search.
