nurpax / petmate

PETSCII editor with Electron/React/Redux
MIT License
181 stars 14 forks source link

Undoing after duplicating a screen should remove the screen again #115

Open Esshahn opened 5 years ago

Esshahn commented 5 years ago

Expected result:

What happens:

nurpax commented 5 years ago

I couldn't figure out how to do this with redux-undo since Petmate uses multiple undo stacks. Manipulating the screens (deletion, duplication) is not undoable at all, which is a bit of a bummer because deleting a screen cannot be undone.

If we had only a single undo stack, it'd be easy to undo/redo screen ops too.

An alternative that would work would be to have a separate undo stack for screens. Then screen operations like dupe or delete could fade in some sort of gmail style undo status bar where you'd have a button to undo the screen operation.