Description
When searching and choosing an object in the ZObjectSelector, we only search over literals. Which means that if for a type field we want to select typed list, we first need to change the type field into function call mode, and then search typed list.
In function editor, type selection is a bit more flexible, and for input and outputs we allow direct selection of type-emitting functions.
With current improvements in the API, we could do this in the default view selectors.
For example, say we want to configure ZReference to select objects of type Z4
- In ZReference component, when configuring the selector we set it to:
- types = [ Z4 ]
- returnTypes = undefined
- types = [ Z4 ]
- With T394712 changes, to keep the same behavior and include enums, we do:
- types = [ Z4, Z7 ]
- returnTypes = Z4
- this means that every zid that is return could be referenced in a Z9
- But we could also allow direct selection of typed lists by doing:
- types = undefined
- returnTypes = Z4
- and then with the selected zid, do:
- if zid belongs to a function: create a function call/Z7 to this function
- else, create a reference/Z9 to the selected zid
Desired behavior/Acceptance criteria
- When selecting a type, I can search and choose "typed list" directly
- When selecting a function (e.g. typed list), on selection it creates a function call to this function
- When selecting a literal or a persisted function call, on selection it creates a reference to this zid
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist