Closed rmpowell77 closed 3 years ago
bug: undo with adding/removing sheets
meeting notes:
current issues: dots are not connected to their continuities -dots do not regenerate flows when moving dot, state has updated but not the dot image
grapher don't observe state but flows
new issue: watches to auto regenerate the flow
flow watching the state or vice versa
Looks like this is still failing if you do the following:
Add a sheet, remove a sheet.
We need to make sure we reset these to 0:
selectedSS selectedDotIDs beat grapherToolDots
Let's rethink this and go with a system that makes snapshots of the Show state, and then restores those snapshot.
Updated to be based on a snapshotting system.
I fixed up the bug, but I don't think I can merge till the approvals are done.
This closely follows the outline by Anthony Gore: https://vuejsdevelopers.com/2017/11/13/vue-js-vuex-undo-redo/
What we do is we have the undo system implemented as a stack of Store Commit changes. When we do an undo, we go back to an initial state and redo all of the Store commit commands. With CalChart, not every Store commit is a change we want to undo, so we have a filter where we only save certain commits.
Adding bottom row buttons using hotkeys. adding File/Edit menu.
Pre-PR checklist
npm run serve
and:npm run lint
npm run test:unit
npm run test:e2e
and ran relevant testsScreenshots/GIFs
[Attach screenshots if making a visible change!]