Skip to content

feat(editor): add undo redo icons to editor - I204#212

Merged
DianaLease merged 10 commits intoaccordproject:mainfrom
teja-pola:teja/i204/add-undo-redo-icons
Mar 18, 2025
Merged

feat(editor): add undo redo icons to editor - I204#212
DianaLease merged 10 commits intoaccordproject:mainfrom
teja-pola:teja/i204/add-undo-redo-icons

Conversation

@teja-pola
Copy link
Contributor

@teja-pola teja-pola commented Mar 10, 2025

Closes #204

Changes

  • Added Undo and Redo icons next to the editor headings in AgreementData.tsx, TemplateMarkdown.tsx, and TemplateModel.tsx.
  • Implemented undo/redo functionality using useUndoRedo.ts for better state management.
  • Styled the icons to have a rectangular box shape with a grey background for better visibility.
  • Ensured all editor headings use the same <h3> tag for consistency.

Screenshots or Video

Screenshot 2025-03-09 231033
Screenshot 2025-03-09 231000

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests.
  • Commit messages follow AP format.
  • Extend the documentation, if necessary.
  • Merging to main from fork:undo-redo-feature.

@teja-pola teja-pola requested a review from a team as a code owner March 10, 2025 21:58
@netlify
Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for ap-template-playground ready!

Name Link
🔨 Latest commit 5926053
🔍 Latest deploy log https://app.netlify.com/sites/ap-template-playground/deploys/67d9390a80f0e800086adbde
😎 Deploy Preview https://deploy-preview-212--ap-template-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Owaiseimdad
Copy link
Contributor

@teja-pola is there any implementation doc for this? I mean, just want to understand why the feature was necessary. Thanks.

from the template.
</span>
<div>
<FaUndo onClick={undo} style={{ cursor: "pointer", color: textColor, marginRight: "8px" }} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Good implementation here to use react icons. Also add title so that if there is a crawler then can understand what is it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

@surya4419
Copy link
Contributor

@teja-pola is there any implementation doc for this? I mean, just want to understand why the feature was necessary. Thanks.

uhh, i think there is a good use of this feature, since its a editor after all, undo redo really helps someone while editing.

@Owaiseimdad
Copy link
Contributor

Owaiseimdad commented Mar 11, 2025

@teja-pola is there any implementation doc for this? I mean, just want to understand why the feature was necessary. Thanks.

uhh, i think there is a good use of this feature, since its a editor after all, undo redo really helps someone while editing.

Totally agree here @surya4419 , but just wanted a doc to understand how the design is and we can make a compontent out of it and use in every editor possible in future.

@teja-pola teja-pola force-pushed the teja/i204/add-undo-redo-icons branch from 3e575df to c9cdc49 Compare March 13, 2025 11:35
Copy link
Member

@DianaLease DianaLease left a comment

Choose a reason for hiding this comment

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

When I click the undo/redo buttons, I see the changes reflected in the code editor but not in the preview pane and it also doesn't update any errors in the code editor. For example, if I make a change that results in an error and then hit undo, the error still persists.

@teja-pola
Copy link
Contributor Author

When I click the undo/redo buttons, I see the changes reflected in the code editor but not in the preview pane and it also doesn't update any errors in the code editor. For example, if I make a change that results in an error and then hit undo, the error still persists.

@DianaLease Thanks for your observation. I will work on them, btw could you please specify what type of error you talking about, that could help me tackle this more better.

@DianaLease
Copy link
Member

When I click the undo/redo buttons, I see the changes reflected in the code editor but not in the preview pane and it also doesn't update any errors in the code editor. For example, if I make a change that results in an error and then hit undo, the error still persists.

@DianaLease Thanks for your observation. I will work on them, btw could you please specify what type of error you talking about, that could help me tackle this more better.

For example, in the concerto model editor, change the text "line1" to "line12" and see an error pop-up:

Screenshot 2025-03-13 at 6 35 44 PM

@teja-pola
Copy link
Contributor Author

teja-pola commented Mar 14, 2025

@DianaLease This is done. Will update to latest main once you merge #206 (cause its ready to be merged)

@teja-pola teja-pola force-pushed the teja/i204/add-undo-redo-icons branch from c9cdc49 to daed493 Compare March 15, 2025 13:39
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>
@teja-pola teja-pola force-pushed the teja/i204/add-undo-redo-icons branch from 06dcee1 to 5926053 Compare March 18, 2025 09:12
@teja-pola
Copy link
Contributor Author

Currently updated with your reviewed changes and main. @DianaLease

@DianaLease DianaLease merged commit 622297c into accordproject:main Mar 18, 2025
7 checks passed
teja-pola added a commit to teja-pola/template-playground that referenced this pull request Mar 18, 2025
* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* update is checked

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

---------

Signed-off-by: Dharma Teja <dteja2468@gmail.com>
surya4419 pushed a commit to surya4419/template-playground that referenced this pull request Mar 19, 2025
* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* update is checked

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

---------

Signed-off-by: Dharma Teja <dteja2468@gmail.com>
surya4419 pushed a commit to surya4419/template-playground that referenced this pull request Mar 19, 2025
* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* fix(button): fix dark mode toggle click - I201

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* update is checked

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

* feat(editor): add undo redo icons to editor - I204

Signed-off-by: Dharma Teja <dteja2468@gmail.com>

---------

Signed-off-by: Dharma Teja <dteja2468@gmail.com>
Signed-off-by: surya4419 <suryaa4419@gmail.com>
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.

Add Undo and Redo Icons to Editors with Optimized Functionality & Standardize Headings

4 participants