-
Notifications
You must be signed in to change notification settings - Fork 376
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
feat: Add undo/redo for design page #3780
Conversation
undo the inline lg editor, the data changes but the content in editor doesn't update. |
@@ -78,7 +77,7 @@ function createLgApi( | |||
return { | |||
addLgTemplate: updateLgTemplate, | |||
getLgTemplates, | |||
updateLgTemplate: debounce(updateLgTemplate, 250), | |||
updateLgTemplate, |
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.
So I see that the debounce and throttle have been removed from the lgApi and luApi respectively. Don't we still want to debounce and throttle them despite the lg and lu parsers being fast now for performance reasons? This is gonna trigger an updateLgTemplate or luTemplate on every keystroke change in the lg file right? Either we can do it here or debounce, throttle inside the dispatcher factory functions returns. What do u think?
@lei9444 saving the partial atoms in the stack is good with me as the storing the difference in object and combining them on each undo/redo seems a lot more complex. I'm good with these changes. Can you make sure the electron installer works fine with this branch before we merge it in main. |
I verified lg/lu assets change, looks good. |
Hi, @srinaath, I tested the undo/redo in electron app |
fix this issue: use key to force update the property editor when undo and redo |
* add undo * replace some async methods to sync * fix unit tests * fix shared unit tests * add undo unit tests * update some naming * add some comments * adapt undo/redo to Electron app menu * watch external cahnges * fix form empty string can not update * use atom content as undo history stack value * add unit test for undoHistory * Revert "watch external cahnges" This reverts commit a2b7eb1. * add commit version to force update the editor * add number limite * add fragment for navigation * add breadcrumb Co-authored-by: zeye <[email protected]> Co-authored-by: zhixzhan <[email protected]>
Description
now undo/redo steps:
change some async functions to sync:
Task Item
closes #3779
closes #3400
closes #2212
closes #1451
Screenshots