Steps to replicate the issue (include links if applicable):
What happens?:
What should have happened instead?:
enums in select show their zid
| AAlhazwani-WMF | |
| Jun 21 2024, 1:00 PM |
| F56595055: Screenshot from 2024-07-22 13-23-33.png | |
| Jul 22 2024, 11:31 AM |
| F56595035: Screenshot from 2024-07-22 13-22-43.png | |
| Jul 22 2024, 11:31 AM |
| F55527753: photo_2024-06-21 14.59.21.jpeg | |
| Jun 21 2024, 1:00 PM |
Steps to replicate the issue (include links if applicable):
What happens?:
What should have happened instead?:
enums in select show their zid
| Subject | Author | Repo | Branch | Lines +/- | |
|---|---|---|---|---|---|
| ZObjectSelector: Enums in select don't display zid when uselang=qqx | Daphne Smit | mediawiki/extensions/WikiLambda | master | +22 -5 |
oh, from the telegram group i thought that it was solved. it seems not, i filed T368153: select for enums show only 10 items when the total amount is 13
Change #1054581 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):
[mediawiki/extensions/WikiLambda@master] ZObjectSelector: Enums in select don't display zid when uselang=qqx
If we are changing this behavior for enums, we should also replicate this for non-enums (when ZObjectSelector is used to choose among normal types).
See https://wikifunctions.beta.wmflabs.org/wiki/Special:CreateObject?uselang=qqx
When typing something in the type selector (e.g. "mon"), the options are displayed with their localized labels
My suggestion is to also follow the qqx rule to display all values, and use the supporting text to show the matching label:
We can have a method that makes this decision depending on the user selected language and returns either label or "(zid)", and re-use that for the enum label, the lookup label, and the lookup type:
In getLookupResults:
// Set up codex MenuItem options
// https://doc.wikimedia.org/codex/latest/components/demos/menu-item.html
const value = result.page_title;
const label = this.labelOrZid( value, result.label );
const description = this.labelOrZid( result.page_type, result.type_label );
const supportingText = ( label !== result.match_label ) ? `(${ result.match_label })` : '';
...And in enumValues:
return this.getEnumValues( this.type ).map( ( item ) => {
const value = item.page_title;
const label = this.labelOrZid( value, item.label );
return { value, label };
} );Change #1054581 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] ZObjectSelector: Enums in select don't display zid when uselang=qqx