Track changes that need saving
A way to track the changes made to a workflow during editing is in order to deal with:
- notifying the user, only if there are changes, that these changes will be lost if he opens a new workflow.
- highlighting the save button when there are changes
- implementing the undo-redo for the workflow that is being edited on the canvas.
The entities that hold these changes are:
- the nodesData: Map<string, NodeData>
- the edgesData: Map<string, LinkData>
- the displayedWorkflowInfo: GraphDetails
- the Nodes and Edges in the RF store
How to approach the issue:
- this seems to offer some solutions https://www.npmjs.com/package/zundo
- create a store that will subscribe to the above and store current, future and past states
Edited by Giannis Koumoutsos