Page MenuHomePhabricator

[Search] Update entity order on dropdown menu
Closed, ResolvedPublic

Description

To align with the searches that are being made we need to update the order of the entities on the Scoped Typeahead Search dropdown menu.

image.png (301×182 px, 14 KB)

The order is currently:
Lexeme
Item
Property
EntitySchema

and the new order should be:
Item
Property
Lexeme
EntitySchema

Steps to reproduce

  • Install Wikibase, WikibaseLexeme, WikibaseCirrusSearch, WikibaseLexemeCirrusSearch (EntitySchema is optional)
  • set $wgLexemeUseCirrus = true;
  • set $wgWBRepoSettings['tmpEnableScopedTypeaheadSearch'] = true;
  • load any page with ?useskin=vector-2022
  • click into the search input
  • open the entity type dropdown

Acceptance Criteria

  • The dropdown menu is updated with the entity types in the order: Item - Property - Lexeme - EntitySchema

Event Timeline

FWIW, I get the correct order on my local wiki:

image.png (285×164 px, 13 KB)

Hopefully the issue in production won’t be too tricky to reproduce / investigate anyway.

Okay, it’s reproducible by enabling $wgLexemeUseCirrus = true; in LocalSettings.php.

Change #1175900 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseCirrusSearch@master] WikibaseRepoEntityTypesHookHandler: Don’t reorder entity types

https://gerrit.wikimedia.org/r/1175900

Change #1175901 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] WikibaseRepoEntityTypesHookHandler: Don’t reorder entity types

https://gerrit.wikimedia.org/r/1175901

FTR, I decided to look into this, and work on the above patches, because the rest of our backlog was unit test tasks (subtasks of T400154), and I didn’t want to work on too many of those at once while others were still in peer review.

I would consider this task ready for peer review now, but I don’t want to rip it out of “ready for task time” prematurely if others think it still needs more work, so I’ll leave it where it is.

Change #1175900 merged by jenkins-bot:

[mediawiki/extensions/WikibaseCirrusSearch@master] WikibaseRepoEntityTypesHookHandler: Don’t reorder entity types

https://gerrit.wikimedia.org/r/1175900

I’d say this belongs in Product Verification? Should be testable on Beta Wikidata once the WikibaseLexemeCirrusSearch change merges in half an hour or so. (Right now I can still reproduce the issue there.)

Change #1175901 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] WikibaseRepoEntityTypesHookHandler: Don’t reorder entity types

https://gerrit.wikimedia.org/r/1175901