Graph layout retention using hidden edges
Various implementations disclosed herein include receiving an input indicating an edit to a graph, the graph including a plurality of nodes connected by a plurality of edges, and modifying the graph according to the input. Upon determining that the modification causes a node of the graph to be isolated, a hidden edge is generated to connect the node to at least one other node of the graph.
1 . A method comprising:
obtaining a directed graph comprising:
a plurality of nodes; and
a plurality of edges, wherein each node of the plurality of nodes is interconnected to at least one other node from the plurality of nodes via a respective edge of the plurality of edges, and wherein each edge of the plurality of edges comprises a respective starting point at a respective start node and a respective end point at a respective end node;
receiving, via a user interface, an input indicating an edit to the directed graph;
in response to receiving the edit:
modifying, based on the edit, the directed graph; and
determining that modifying the directed graph based on the edit causes a particular node of the directed graph to be isolated; and
in response to determining that modifying the directed graph based on the edit causes the particular node of the directed graph to be isolated:
generating a hidden edge comprising an invisible graphical user element to connect the particular node of the directed graph to at least one other node of the plurality of nodes of the directed graph, wherein the invisible graphical user element comprises a data structure that is not visually displayed on the directed graph but recognized as being a connection between respective nodes of the plurality of nodes to act as a placeholder.
2 . The method of claim 1 , wherein the edit comprises causing edges having an end point at the particular node to be deleted.
3 . The method of claim 1 , wherein generating the hidden edge comprises inserting the invisible graphical user element between a node of the plurality of nodes precedent to the particular node and the particular node.
4 . The method of claim 1 , wherein the hidden edge comprises a data structure that is maintained in a display of the directed graph.
5 . The method of claim 1 , wherein generating the hidden edge includes storing the invisible graphical user element separate from process data of the directed graph.
6 . The method of claim 1 , wherein generating the hidden edge includes maintaining a position of the particular node in the directed graph unchanged relative to the position of the particular node prior to receiving the input indicating the edit.
7 . The method of claim 1 , further comprising:
determining that modifying the directed graph according to the input indicating the edit does not cause the particular node of the directed graph to be isolated; and
maintaining, based on the determination, a layout of the directed graph without generating the hidden edge.
8 . A system, comprising:
one or more processors; and
memory, including computer-executable instructions that, if executed by the one or more processor, cause the system to:
obtain a directed graph comprising:
a plurality of nodes; and
a plurality of edges, wherein each node of the plurality of nodes is interconnected to at least one other node from the plurality of nodes via a respective edge of the plurality of edges, and wherein each edge of the plurality of edges comprises a respective starting point at a respective start node and a respective end point at a respective end node;
receive, via a user interface, an input indicating an edit to the directed graph;
in response to receiving the edit:
modify, based on the edit, the directed graph; and
determine that modifying the directed graph based on the edit causes a particular node of the directed graph to be isolated; and
in response to determining that modifying the directed graph based on the edit causes the particular node of the directed graph to be isolated:
generate a hidden edge comprising an invisible graphical user element to connect the particular node of the directed graph to at least one other node of the plurality of nodes of the directed graph, wherein the invisible graphical user element comprises a data structure that is not visually displayed on the directed graph but recognized as being a connection between respective nodes of the plurality of nodes to act as a placeholder.
9 . The system of claim 8 , wherein the hidden edge is removed from the directed graph in response to receiving a subsequent input indicating a subsequent edit to the directed graph, and wherein the subsequent edit to the directed graph comprises addition of a new edge to the particular node.
10 . The system of claim 9 , wherein the new edge has a respective end point at the particular node and a respective start point at a node of the plurality of nodes that precedes the particular node in the directed graph.
11 . The system of claim 8 , wherein the edit includes deletion of a node of the plurality of nodes, the node comprising greater than a threshold number of incoming nodes and/or greater than a threshold number of outgoing nodes, and wherein one or more additional hidden edges are to be generated in response to the deletion of the node.
12 . The system of claim 8 , wherein the directed graph is used to depict process flows for project management, and wherein the plurality of nodes are one or more of tasks, activities, and entities, and the plurality of edges are directed edges indicated dependencies between the plurality of nodes.
13 . The system of claim 8 , wherein the edit includes shifting of an end point of an edge from the particular node to an incoming node of the plurality of nodes, the edge being an only incoming edge to the particular node, and wherein the hidden edge is inserted between the incoming node and the particular node.
14 . A non-transitory computer-readable storage medium having stored thereon executable instructions which, when executed by one or more processor of a computer system, cause the computer system to:
obtain a directed graph comprising:
a plurality of nodes; and
a plurality of edges, wherein each node of the plurality of nodes is interconnected to at least one other node from the plurality of nodes via a respective edge of the plurality of edges, and wherein each edge of the plurality of edges comprises a respective starting point at a respective start node and a respective end point at a respective end node;
receive, via a user interface, an input indicating an edit to the directed graph;
in response to receiving the edit:
modify, based on the edit, the directed graph; and
determine that modifying the directed graph based on the edit causes a particular node of the directed graph to be isolated; and
in response to determining that modifying the directed graph based on the edit causes the particular node of the directed graph to be isolated:
generate a hidden edge comprising an invisible graphical user element to connect the particular node of the directed graph to at least one other node of the plurality of nodes of the directed graph, wherein the invisible graphical user element comprises a data structure that is not visually displayed on the directed graph but recognized as being a connection between respective nodes of the plurality of nodes to act as a placeholder.
15 . The non-transitory computer-readable storage medium of claim 14 , wherein the hidden edge is stored as a data structure used for user interface specific data.
16 . The non-transitory computer-readable storage medium of claim 14 , wherein the hidden edge is not persisted to process data of the directed graph.
17 . The non-transitory computer-readable storage medium of claim 14 , wherein the directed graph is in temporarily unavailable state when the hidden edge is generated.
18 . The non-transitory computer-readable storage medium of claim 14 , wherein the directed graph is to adjust from a temporary unavailable state to an available state when the hidden edge is removed from the directed graph.
19 . The non-transitory computer-readable storage medium of claim 14 , wherein the hidden edge is to be removed from the directed graph when a new edge is added to the directed graph, the new edge including an end point at the particular node.
20 . The non-transitory computer-readable storage medium of claim 14 , wherein the plurality of edges are directed edges.