Page MenuHomePhabricator

DefaultView: ZTypedListItem with type bound: can't change the mode (when should) but can change the type (when shouldn't)
Closed, ResolvedPublicBUG REPORT

Description

Description

Steps to reproduce:

  1. Go to https://wikifunctions.beta.wmflabs.org/wiki/Z10112?view=default-view&action=edit
  2. Expand the first item under the "Labels" multilingual string
    Screenshot from 2023-03-31 17-27-47.png (434×483 px, 18 KB)
    • The dropdown should be active, because we should be able to change from literal to reference or to function call (mode)
    • However, the expand toggle should not be active, because we should not be able to change the type, only the mode:
      Screenshot from 2023-03-31 17-29-42.png (524×784 px, 24 KB)
    • I can change the type of an item (which I shouldn't), resulting on a non-wellformed ZObject:
      Screenshot from 2023-03-31 17-33-10.png (626×755 px, 48 KB)

Expected behavior (Acceptance criteria):

  • If an item in a typed list has its type bound (e.g. [ "Z11", item, item, item ] all items should be of type "Z11"), I should be able to change their mode but not their type

Devices and Design (URLs or screenshots, if applicable):

  • Desktop: ...
  • Small screens/mobile: ...

Completion checklist

Event Timeline

gengh renamed this task from DefaultView: ZTypedListItem expected type isn't set properly to DefaultView: ZTypedListItem with type bound: can't change the mode (when should) but can change the type (when shouldn't).Mar 31 2023, 3:35 PM
gengh created this task.

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

[mediawiki/extensions/WikiLambda@master] Fix type binding in typed lists

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

Change 906028 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Fix type binding in typed lists

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

DVrandecic subscribed.

Tested on https://wikifunctions.beta.wmflabs.org/wiki/Z10112?view=default-view&action=edit , on Species and Common Names, which are Strings and List of Strings, and in both cases i cannot change the type. Yay!