-
Notifications
You must be signed in to change notification settings - Fork 11
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
✨Enable undo and redo #110
Conversation
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.
Thanks for the pull request! Looks like another good QOL feature to have.
As discussed in our chat, the undo-redo function doesn't work possibly because the detect changes / dirty state isn't functioning properly. Hope ya can fix it. Thanks.
Thanks for the reviewed. I fixed the issue. It related to detecting changes when saving it. I removed it previously because the undo/redo manager detect saving xircuits as changes. Right now, it should be working fine. |
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.
Great work, the undo and redo is now working!
Was pleasantly surprised when you mentioned that since you've used Juypyter's doc undo and redo there's no limit to the steps, awesome.
One thing that was odd was that although the undo and redo works perfectly from the right click menu, pressing ctrl z / ctrl y moves backwards / forwards 2 steps. It doesn't break anything else though, so I guess we can merge it if you want and improve it in the future ones.
The changes in the icons are also noted and appreciated (but as always, would prefer if you could make a new pull request for other changes so I can track them easily).
Description
This will enable undo and redo xircuits. Either via context menu or shortcut. Also add shortcut for save.
Shortcut:
In addition, change the all the icons to LabIcon and sync it with Jupyterlab theme.
Before in dark theme(Component lib icon):
After in dark theme(Component lib icon):
References
Currently, it detect changes mentioned in #75
Pull Request Type
Type of Change
Tests
Based on detected changes mentioned in #75,
Tested on?
Notes
Probably need to add a listener when nodes position was changed and connected links deleted.