buttercup-core
buttercup-core copied to clipboard
[Feature] Save de-bouncing
Saving needs to be de-bounced so that multiple saves don't happen over each-other. The two main areas that need this attention are:
- Workspaces
- Archive Manager
The de-bounce for each needs to be double-edged. Regular debouncing occurs like so:
______________________________________________s
Here the debounce may be using a delay of say 500ms, saving on the trailing side.
Our debounce should be saved both times:
s_____________________________________________s
And instead of a delay, it would be the save period (time the promise takes to save and complete). The save should occur immediately, and if another save request comes, it should be queued.. marking the need for saving as dirty. When an existing save request completes, if the flag is dirty, a new save should be undertaken.