(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

ZObjectSelector: Pre-populate the results with most common objects when the selection type is Z60/Language or Z4/Type
Closed, ResolvedPublic

Description

As a simplified version of T343564: ZObjectSelector: Prepopulate with most common objects depending on the selection type, we'll just do these two special-cases first:

  • Z4 -> String, Boolean
  • Z60 -> UN6 (i.e. T343209)

Event Timeline

Jdforrester-WMF renamed this task from ZObjectSelector: Prepopulate the results with most common objects when the selection type is Z61/Language or Z4/Type to ZObjectSelector: Pre-populate the results with most common objects when the selection type is Z61/Language or Z4/Type.Nov 7 2023, 6:42 PM
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF moved this task from To triage to Backlog on the Abstract Wikipedia team board.

Currently the ZObjectSelector uses the CdxLookup component.

With the current behavior of the Lookup component we cannot implement this feature. We can set the dropdown Menu Items with pre-defined options depending on the type, but the Lookup component will not expand the menu as long as there's no input value in the field (e.g. the user writes some string which triggers the lookup).

We can set the predefined options when there is a string input in the Lookup field but the string returns no results, for example, if the default options for type are String and Boolean:

Screenshot from 2023-11-10 13-43-15.png (212×335 px, 14 KB)

Screenshot from 2023-11-10 13-43-28.png (220×333 px, 12 KB)

But this requires the user to type something, which doesn't really address the issue we are trying to resolve.

Change 973360 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] [WIP] Predefined options for languages and types

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

Jdforrester-WMF renamed this task from ZObjectSelector: Pre-populate the results with most common objects when the selection type is Z61/Language or Z4/Type to ZObjectSelector: Pre-populate the results with most common objects when the selection type is Z60/Language or Z4/Type.Mar 19 2024, 2:14 PM
Jdforrester-WMF changed the task status from Open to In Progress.
Jdforrester-WMF assigned this task to gengh.
Jdforrester-WMF updated the task description. (Show Details)

Change 973360 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Show suggested options for languages and types

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