-
Notifications
You must be signed in to change notification settings - Fork 27
Make sure atomic user interactions result in "atomic" update actions #4281
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
Comments
I agree that this is definitely something we should fix/implement :)
I thought about this but couldn't think of a good way yet, because the diffing is triggered each time a save-relevant action was dispatched and the diffing then dispatches the Two possibilities that come to my mind:
|
Great ideas! I think, both can work. Reading those, I just had another idea:
On a second thought, I think, there could be a risk that other actions could slip into unrelated transactions, if asynchronous actions are taking place. Might be very unlikely, but also very hard to debug in that case. |
I found this while looking around which is pretty much what you proposed if I understood you correctly. |
Awesome, yes, that's what I had in mind. With the middleware part, it's even better! |
Prime example:
If I delete a group with 100 trees, this is essentially one user interaction. However, currently, we split this up into many update actions (which can easily exceed the undo stack size). This means, that there is no guaranteed undo for such actions, which is bad UX.
We should think about a way to make such actions "transactional" somehow. Can we use the transaction system we already have in the save queue?
Would like to hear your thoughts, @daniel-wer :)
The text was updated successfully, but these errors were encountered: