-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Undo/redo functionality addition #4903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ks loaded and functionality of undo/redo buttons
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
zealot-zew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bugs i encountered:
- the trash can seems disabled (the trash doesn't appear in the trash can)
- if i undo 'n' number of time (where n > the blocks i deleted) the workspace acts weirdly by removing the start and making a silence block appear.
- i like it how the undo feature brings back the block to its original place but it doesn't fit in the block (it just stays in the position in the background)
Screen.Recording.2025-12-27.at.2.25.43.AM.mov
… movement of a block
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
I have implemented the required changes -
|
|
IMO, great work on this so far @stutijain2006 — getting undo/redo at the block level is a big step forward. Before extending it further, it might help to first agree on what a “complete” undo should guarantee. For example: -- undo should never remove or corrupt the start block -- undo beyond available history should be a no-op -- restored blocks should snap back with their original connections, not just position -- undo/redo should keep trash and save state consistent One additional thought: instead of treating undo purely as state reversal, would it make sense to classify undo actions by intent (e.g., structural vs positional vs ephemeral)? That might allow collapsing noisy actions (like continuous drag movements) into a single undo step and reduce flakiness while keeping the feature intuitive. Once these invariants are clear, it may be easier to decide what to stabilize first versus what can come later. |

Solves a long standing query of addition of Undo/Redo Feature
Solves #4561
This PR introduces undo/redo mechanism across various key interactions in music block ensuring common block operations can be safely reversed and reapplied.
Implemented Features-
Feature can be accessed through two ways-
Current Limitations and Future Enhancements -