Follow-up to #298. Restores editor states (editorValue, editorModelCto, editorAgreementData) to fix undo/redo functionality broken by the share feature merge. #333
Merged
DianaLease merged 13 commits intoaccordproject:mainfrom Mar 27, 2025
Conversation
✅ Deploy Preview for ap-template-playground ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
b9a7f47 to
dd40e6a
Compare
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
dd40e6a to
44f6716
Compare
DianaLease
approved these changes
Mar 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #
This pull request restores the undo/redo functionality that was broken after merging PR #298 (share functionality). It reintroduces editor states (
editorValue,editorModelCto,editorAgreementData) tostore.tsand updatesuseUndoRedoand editor components to ensure changes reflect in the preview (agreementHtml) and errors clear appropriately on undo/redo.Changes
editorValue,editorModelCto, andeditorAgreementDatatostore.tswith corresponding setters (setEditorValue, etc.) to manage unsaved editor content and support undo/redo history.useUndoRedo.tsxto include anonSynccallback, calling main setters (setTemplateMarkdown,setModelCto,setData) aftersetValue,undo, orredoto sync editor states with main states and trigger preview rebuild.AgreementData.tsx,TemplateMarkdown.tsx, andTemplateModel.tsxto use both editor setters (e.g.,setEditorAgreementData) and main setters (e.g.,setData) viauseUndoRedo, ensuring preview updates and error clearing on undo/redo.Flags
generateShareableLinkstill uses main states (templateMarkdown, etc.), so share functionality remains intact.Screenshots or Video
Related Issues
Author Checklist
--signoffoption of git commit.mainfromfork:branchname