-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The General Problem
Sometimes students create an edge that has the same source and target node:
When this happens, neither the source nor target nodes are editable because we disable editing the source / target node when it matches the currently selected parent node.
The reason we disable editing for this is that the edges that are currently shown are edges that are connected to the currently selected parent node. If you change the source / target that matches the parent, then the edge is no longer relevant to the parent node, so it should not appear in the list.
Possible Solutions
-
Always allow editing of the source/target regardless of whether the source/target is the parent node.
-
Always allow edit of target even if the target is the parent. (But don't allow editing of the source...this lets you recover from that situation, but might be awkward if your parent node needs to be the target. Of course, you could edit, then use the swap button to switch them).
-
Do error checking when edges are created and do not allow setting both source and target to the same node. This theoretically should prevent this situation from happening, but will not help us if the situation if there is an existing matching source/target pair.
-
Do special condition checking and allow editing if BOTH the source and target nodes match the parent.
Discussion
Solution 1) would mean the edit button is always shown for both the source and target. While solution 1) might work, the problem is that after change the source or target that matches the parent node, while your edge will still appear in the list of edges related to the currently selected node, it technically shouldn't be in that list anymore because it is no longer related to the parent node. We could refresh the list, but then the edge you edited would disappear, which is also odd behavior. It will be removed from the list once you navigate away. So while it's not technically correct to leave it there, it might be an adequate UX solution.
Solution 2) seems awkward.
Kalani has said that solution 3) might need to be supported.
Solution 4) could work too. So normally we wouldn't allow you to edit the source or target if it matches the parent, but in the special circumstance where BOTH source and target match the parent, we show the edit button for both source and target.
