Page MenuHomePhabricator

Allow to refer to self when creating (or editing?) an object
Closed, ResolvedPublic

Description

When creating an object (in particular, a Z4/Type or a Z8/Function), we sometimes need to refer to itself or build keys based on its own identity (i.e. the type Z40 might have a key Z40K1, etc.)

Since we don't know what the ZID of the object will be while creating it, we cannot enter the actual literal. Therefor some escape / replace mechanism needs to be implemented that allows the frontend to construct a preliminary ZObject, send it to the API to create (and maybe also the API to edit?), so that the wiki can then assign a ZID and replace the preliminary references to self in the ZObject.

(One possibility could be to use Z0 as the placeholder, as this would make it reasonably easy to remain valid, and can be scanned and replaced in the relevant places. But this is not about a specific solution)

Subtasks should be created for:

  • spec'ing out the solution
  • do the front-end work
  • do the wiki-side work

Event Timeline

I believe at this point we are using Z0 as the placeholder. This is what was used for the ZArgument component.

This should be done on the backend with the DAO.

Suggestion for the frontend by Lindsay: add a Mode for Self.

(Which makes this depend on Modes being available)

DVrandecic triaged this task as Medium priority.Apr 7 2021, 4:51 AM
DVrandecic raised the priority of this task from Medium to High.
DVrandecic lowered the priority of this task from High to Medium.Apr 7 2021, 4:09 PM