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)
Jdforrester-WMF | |
Oct 30 2023, 1:49 PM |
F41482734: Screenshot from 2023-11-10 13-43-28.png | |
Nov 10 2023, 12:54 PM |
F41482735: Screenshot from 2023-11-10 13-43-15.png | |
Nov 10 2023, 12:54 PM |
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:
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Show suggested options for languages and types | mediawiki/extensions/WikiLambda | master | +280 -137 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | gengh | T350037 ZObjectSelector: Pre-populate the results with most common objects when the selection type is Z60/Language or Z4/Type | |||
Resolved | AnneT | T350946 Lookup: Option to open menu when field is focused | |||
Duplicate | None | T351768 Feature request: Add ability for Lookup to show the menu on user select when menuItems isn't empty, even when user hasn't inputted anything yet |
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:
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
Change 973360 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Show suggested options for languages and types