Page MenuHomePhabricator

ZObjectSelector: Excluded types list is too opinionated and restrictive.
Closed, ResolvedPublic

Description

Description

The ZObjectSelector has a list of type zids that it excludes for selection.
This list contains zids like 'Z2', which should DEFINITELY be excluded, but it also contains 'Z3', which should be excluded when selecting it as root object, but not necessarily in other cases.

Maybe we need to keep this separated into two different concepts:

  • Types that SHALL NEVER be offered or picked by ZObjectSelector
    • E.g. Z2, resolver types (Z9, Z7, Z18)...
  • Types that might not be picked in different circumstances:
    • E.g. for root object: Z3, Z39, etc...

Commented block in Constants file:

// EXCLUDED_Z_TYPES: [ 'Z2', 'Z3', 'Z5', 'Z7', 'Z9', 'Z16', 'Z17', 'Z18', 'Z21', 'Z22', 'Z39' ],
// Z2: OK - only will be a root zobject, it should not be selected for anything else
// Z5: always generated dynamically... but shouldn't we be able to select it as a function
//     output for example?
// Z7: OK - selected as a mode, never as a type
// Z9: OK - selected as a mode, never as a type
// Z16: why can't we use code for things?
// Z17: also not sure why are we not allowing this
// Z18: OK - selected as mode, never as a type
// Z21: we cannot create as root but why can't we choose this for example as an output type?
// Z22: OK - never show, it's a dynamically created internal type
// Z39: cannot create as root, but why can't we choose this for other things?

Completion checklist

Event Timeline

Jdforrester-WMF lowered the priority of this task from High to Medium.Oct 26 2023, 4:57 PM

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

[mediawiki/extensions/WikiLambda@master] Divide excluded zids in two sets: always excluded and only excluded as inner object

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

Jdforrester-WMF changed the task status from Open to In Progress.Apr 8 2024, 1:50 PM
Jdforrester-WMF moved this task from Backlog to To deploy on the Abstract Wikipedia team board.

Change #1017863 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Divide excluded zids in two sets: always excluded and only excluded as inner object

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