Page MenuHomePhabricator

Disable re-selection of type in a ZObject that has its type already assigned.
Closed, ResolvedPublic


A ZObject with an already set type and value is still showing the type selector component, allowing a user to change its type and hence modify the keys and erase the value.

This is problematic in the way the ZObject keys are handled in the front end and can lead to situations in which a same ZObject JSON representation can be rendered into two different component structures:

Screenshot from 2021-01-29 19-17-01.png (469×882 px, 52 KB)

Screenshot from 2021-01-29 19-17-19.png (398×879 px, 41 KB)

Changing the type and rendering the correct component can be effectively be done by simply erasing the key and creating it again, so it would be better to disable re-selection of the ZObject type once created and initialized.

Event Timeline

DVrandecic triaged this task as Medium priority.Feb 3 2021, 5:50 PM

Change 661951 had a related patch set uploaded (by Gabrielchihonglee; owner: Gabrielchihonglee):
[mediawiki/extensions/WikiLambda@master] Disable ZObject type re-selection

Change 661951 abandoned by Genoveva Galarza:
[mediawiki/extensions/WikiLambda@master] Disable ZObject type re-selection

This change was already introduced in patch 661723