Closed rileywong311 closed 1 year ago
Unless I'm misunderstanding this as an issue, I guess a possible solution to this would be to clear to redo record data whenever a change_set is made
Okay. I think the issue is not actually with the "merge conflicts" that arise from redoing after making changesets. The weird aftermath I found from serializing the graphs may actually be because redo()
doesn't add the entities back under the same graph name, so the don't serialize with it anymore. I created a new issue to exemplify this potential bug, and I might close this issue.
When I think of undo/redo, I guess an analogy is that, with google docs or word, I could undo text I've typed--then, it will give me the option to redo those undoes, but if I type something new, that redo option dissapears.
However, I realize that undo/redo can mean something different in the context of graphs. For VersionedGraphCollection, I can redo even if I've made changes since an undo. How should undo/redo work for a VersionedGraphCollection in this regard?
Here is some code below of me adding some changesets, undoing one, then making new changes, and still being able to redo
The best way to showcase the current state of the VersionedGraphCollection/Graph that I could think of is just to serialize it, but I know that doesn't quite make sense for just looking at the code. Let me know if there could be a better way to showcase the results.
If this is the proper way undo/redo should work, then why does taking the graph at the name "project" differ from the entire VGC?