Page MenuHomePhabricator

Add configuration for Scoped Typeahead search prefixes
Closed, ResolvedPublic

Description

Currently the scoped typeahead search prototype hard-codes 'I:' 'P:' 'L:' and 'E:' prefixes for selecting a scope via the keyboard. These prefixes should be set by configuration.

Acceptance Criteria

  • The keyboard shortcut / prefix for selecting scope can be configured in LocalSettings
  • Absent any configuration, no prefix / shortcut is active
  • If a prefix is entered from the configured prefixes for a scope that is not available (because, for example, the corresponding extension is not installed), the prefix should be ignored / treated as search input.
  • The solution should also switch namespaces with their lowercase equivalent i.e. (e: for EntitySchemas, p: for Properties, l: for Lexemes, i: for Items), as this is a pattern that exists in the current search.

Event Timeline

Change #1123003 had a related patch set uploaded (by Audrey Penven; author: Audrey Penven):

[mediawiki/extensions/Wikibase@master] Use configured namespaceAliases for search prefixes

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

Change #1123003 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use configured namespaceAliases for scope selection

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

Checked on https://b01555eeba.catalyst.wmcloud.org/wiki/Main_Page and it looks like no prefixes, capitalised or otherwise, are changing the namespace of the search.

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

[mediawiki/extensions/Wikibase@master] DNM: Add namespace aliases (for patchdemo)

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