Skip to content

Add Undo/Redo#149

Merged
ai merged 10 commits intoevilmartians:mainfrom
mnsrv:feature/add-undo-redo
Jul 22, 2024
Merged

Add Undo/Redo#149
ai merged 10 commits intoevilmartians:mainfrom
mnsrv:feature/add-undo-redo

Conversation

@mnsrv
Copy link
Contributor

@mnsrv mnsrv commented Jul 20, 2024

Resolves #148

  • fromUndoRedo is needed to prevent pushing prev color to undo, after we updated current in undo/redo.
  • undos stores current as last item, so it never should be empty.
  • $prev is needed for storing previous color. I tried to use oldValue from subscribe, but because of debounce, it can be the same as value.
  • $prev initialised with 0 color to avoid checking for null. I set correct first value in subscribe, when oldValue is not passed
  • on cmd + Y in macOS Safari usually opens history, is it okay that now I prevent to open it?

@mnsrv mnsrv changed the title Add Undo/Redo #148 Add Undo/Redo Jul 20, 2024
@ai ai merged commit 9b21c9b into evilmartians:main Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Undo/Redo

2 participants