-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature enhancement: reset
action should empty the undo/redo stacks, but maintain/rebase the current state of the store/module at this point.
#13
Comments
Not to be "that guy", but were you still thinking about implementing this @andrewbeng89? I was about to roll my own undo/redo plugin and ran into yours, but I'd need 'reset' capabilities so people couldn't undo the initial bootstrapping of the store. |
Hi @shurth thanks for you message. This feature is definitely on the roadmap for a future release. There are some minor complexities regarding how this feature will play well with actions/side-effects. Would you be interested to contribute to the development of this feature? We do need help with creating comprehensive test scenarios for this feature. |
…stacks Feature/#13 reset undo redo stacks
This enhancement builds on from #7. The current
clear
action will empty the undo/redo stacks and set the state of the store when theemptyState
mutation is committed. The newreset
action should empty the undo/redo stacks, but still maintain the state of the store up to this particular point.IS
[mutationA, mutationB]
, undone:[mutationC]
, state:emptyState + mutationA, mutationB
clear()
is dispatched[]
, undone:[]
, state:emptyState
SHOULD
[mutationA, mutationB]
, undone:[mutationC]
, state:emptyState + mutationA, mutationB
reset()
is dispatched[]
, undone:[]
, state:emptyState + mutationA, mutationB
The text was updated successfully, but these errors were encountered: