Open whatisgalen opened 8 months ago
Why not just create a branch?
Why not just create a branch?
I think creating a branch implies you already know the config for a node a priori. It's also limited to cases where you're reusing something generic and inserting it somewhere it doesn't already exist.
Here's an example for where that fails: say you've imported a graph from somewhere else but there's a bunch of datatype changes you want to make, now what? You'll have to delete all the nodes and probably take screenshots or notes to remind you what all the config properties where. I think the main barrier is that you can't change datatypes once a node exists (and has children?)
There isn't really a branch functionality to help with editing pre-existing graphs.
I believe being able to change the datatype of a node is something that gets resolved in v8. @chrabyrd could probably confirm that.
👋 ! I don't believe changing a node's datatype is slotted for v8. I remember attempting to do this last year but the interactions with ES were too opaque to allow for it. But anything's possible and if I end up with extra bandwidth I could give it another look
Also - just to add to this - the Export Branch -> Import Branch strategy, which I've been currently using requires manual editing of the Graph JSON if the branch used to copy the sub-tree isn't kept (see issue #9970).
There are multiple scenarios in which it would be useful to be able to copy a node and paste it into a different graph (or a different place on the same graph). For example, say you chose concept as the datatype but want to change it to concept-list. It must be deleted and recreated; being able to copy everything about the node and paste it into the new one would save time.
How to implement? One way would be to copy some json capturing all the properties of the node config and the relevant properties of its parent. "Pasting" would have to be handled by some "import node" logic that checks if the ontology property of the old parent matches that of the target parent, if not leaves it blank. It would also check if the necessary card and widget are present in the target db and if not, falls back on whatever the defaults are.
In short, while this would really be an "import"/"export" node spec, it could be seamless enough to feel like copy/paste.