anthonygore/vuex-undo-redo

Grouping and filtering actions

Opened this issue · 3 comments

pasih commented

Hi,

I'm working on converting something I wrote with React/Redux to a Vue app. It's a fairly simple editor-type tool which needs undo/redo functionality.

The two things this plugin (I realise it's probably somewhat PoC) is missing I actually need are grouping of actions and filtering of actions. The use cases:

  • Grouping -> I have some actions that fire many, many times (updated when user drags and object) and obviously it would make sense to undo the entire move instead of doing it one by one.

  • Filtering -> There are actions I don't want undo for. Say, user toggles a grid view in the editor.

I was going to start working on these but I figured I'd ask here first if you have any ideas already (or better yet, if you have them done ;)). I suppose the filtering use case could even work on a per module basis at first. The grouping could be a bit trickier.

pasih commented

I wrote a quick PR for filtering, #3. Possibly not quite ready for prime time yet but food for thought.

pasih commented

Ditto for grouping: #4

I think both are good suggestions, thank you!