Skip to content

Undo & redo#229

Merged
Daan0709 merged 11 commits intomasterfrom
feat/undo-redo
Feb 19, 2026
Merged

Undo & redo#229
Daan0709 merged 11 commits intomasterfrom
feat/undo-redo

Conversation

@Daan0709
Copy link
Contributor

@Daan0709 Daan0709 commented Feb 13, 2026

  • You can now undo changes made to the canvas with CTRL + Z
  • You can also redo these undo changes with CTRL + SHIFT + Z or CTRL + Y
  • Changes include but are not limited to: moving nodes, deleting nodes, deleting edges, adding nodes, grouping nodes
  • A maximum of 20 changes is tracked, this is just a number that I chose cause it felt right (not too much for memory overload, but also a fair amount that can be undone)

@Daan0709 Daan0709 self-assigned this Feb 13, 2026
@Daan0709 Daan0709 marked this pull request as ready for review February 13, 2026 15:34
This was linked to issues Feb 15, 2026
Copy link
Contributor

@stijnpotters1 stijnpotters1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik zie dat je import { subscribeWithSelector } from 'zustand/middleware' gebruikt en hierin een eigen undo redo maakt.

Ik zie dat er een aparte undo redo middleware library voor zustand is.
https://github.com/charkour/zundo

Wellicht kan je dit bekijken om te kijken of dit niet een betere oplossing is?

@Daan0709
Copy link
Contributor Author

Ik zie dat je import { subscribeWithSelector } from 'zustand/middleware' gebruikt en hierin een eigen undo redo maakt.

Ik zie dat er een aparte undo redo middleware library voor zustand is. https://github.com/charkour/zundo

Wellicht kan je dit bekijken om te kijken of dit niet een betere oplossing is?

Na een gevecht aan te gaan met die library ben ik tot de conclusie gekomen dat de huidige oplossing beter werkte 😄 Kwamen een aantal bugs bij kijken die nauwelijks op te lossen waren. En via deze (custom) manier hebben we ook een hoop meer vrijheid in hoe we de undohistory afhandelen

Copy link
Contributor

@stijnpotters1 stijnpotters1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goed, verder nog één comment

@sonarqubecloud
Copy link

@Daan0709 Daan0709 merged commit e4e461c into master Feb 19, 2026
5 checks passed
@Daan0709 Daan0709 deleted the feat/undo-redo branch February 19, 2026 13:13
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.

Implement redo functionality Implement undo functionality

3 participants