Page MenuHomePhabricator

[ES-M3] [EPIC] EntitySchema datatype accepts labels, aliases and IDs when making statements
Closed, ResolvedPublic

Description

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:

image.png (1,187×503 px, 70 KB)

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.

Event Timeline

Arian_Bozorg renamed this task from [ES-M3] EntitySchemas shown by label when making statements to [ES-M3] EntitySchema datatype accepts labels and IDs when making statements.Jun 20 2023, 1:25 PM
Arian_Bozorg updated the task description. (Show Details)
Arian_Bozorg renamed this task from [ES-M3] EntitySchema datatype accepts labels and IDs when making statements to [ES-M3] [EPIC] EntitySchema datatype accepts labels and IDs when making statements.Jun 21 2023, 9:01 AM
Arian_Bozorg updated the task description. (Show Details)
Arian_Bozorg renamed this task from [ES-M3] [EPIC] EntitySchema datatype accepts labels and IDs when making statements to [ES-M3] [EPIC] EntitySchema datatype accepts labels, aliases and IDs when making statements.Jun 23 2023, 9:04 AM
Arian_Bozorg updated the task description. (Show Details)

Mayberelated

As far as I’m aware this was fully implemented in T375641 and related tasks, so it’s probably ready for verification now.

Arian_Bozorg claimed this task.

It's looking good to me! Thank you so much :)