Skip to content

Template editor wipes out hand-added fields sometimes #115

@jdanish

Description

@jdanish

To reproduce:

  1. Generate a network and leave the "Comments" field visible
  2. Stop net.create.
  3. Open the template file externally (e.g., in studio code)
  4. Add a select type property such as ...
[nodeDefs.connotation]
type = "select"
displayLabel = "Connotation"
exportLabel = "Connotation"
help = "Is this positive, negative, or neutral?"
includeInGraphTooltip = true
hidden = false

  [[nodeDefs.connotation.options]]
  color = "#eeeeee"
  label = ""
  replacement = ""
  delete = false

  [[nodeDefs.connotation.options]]
  color = "#eeeeee"
  label = "Positive"
  replacement = ""
  delete = false

  [[nodeDefs.connotation.options]]
  color = "#eeeeee"
  label = "Negative"
  replacement = ""
  delete = false
  1. Run net-create with the revised template.
  2. Nodes have the new connotation attribute as well as comments and all works as expected.
  3. Open template editor and add a node type.
  4. Network looks fine, and new node type is added to the template file on the hard drive.
  5. Change the visibility on the comment field using the template editor.
  6. Screen reloads, and connotations is also gone.
  7. Check the saved template file, and it looks OK but the connotation attribute has been deleted.

We realize that short-term we need to add / edit these node attributes by hand because it is not worth updating the template editor since the plan is, I believe, to replace it. If it is easy to have this not clobber the hand-added fields, that'd be ideal. If that's a major task, we'll just warn the team not to use the template editor on anything that was hand edited.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdesignDesign epicp4 must haveFeature definitely needs to be completedtemplate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions