Skip to content
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

Prevent empty ops are applied during undo/redo #687

Merged
merged 44 commits into from
Nov 22, 2023
Merged

Prevent empty ops are applied during undo/redo #687

merged 44 commits into from
Nov 22, 2023

Conversation

chacha912
Copy link
Contributor

What this PR does / why we need it?

Handle cases where no operations have been applied during undo/redo.
This PR resolved the issue of missing client sequences on the server by preventing the update of changeID.

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

chacha912 and others added 30 commits September 26, 2023 12:04
- Display undo/redo stack count
- Prevent script errors when clicking the undo/redo buttons
- Remove duplication between Array.getPositionedAt and Element.getLastExecutedAt
- Add more comments
@chacha912 chacha912 requested a review from hackerwins November 14, 2023 03:11
Base automatically changed from undo-redo-object to main November 15, 2023 03:12
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (859c019) 67.94% compared to head (32b29fd) 67.97%.
Report is 1 commits behind head on main.

❗ Current head 32b29fd differs from pull request most recent head 8ed6ee2. Consider uploading reports for the commit 8ed6ee2 to get more accurate results

Files Patch % Lines
src/document/document.ts 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #687      +/-   ##
==========================================
+ Coverage   67.94%   67.97%   +0.02%     
==========================================
  Files          58       58              
  Lines        8783     8786       +3     
  Branches      795      795              
==========================================
+ Hits         5968     5972       +4     
  Misses       2555     2555              
+ Partials      260      259       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

src/document/document.ts Outdated Show resolved Hide resolved
@hackerwins hackerwins changed the title Handle cases where no operations have been applied during undo/redo Prevent empty ops are applied during undo/redo Nov 22, 2023
@hackerwins hackerwins merged commit 38dc37a into main Nov 22, 2023
1 check failed
@hackerwins hackerwins deleted the no-ops-undo branch November 22, 2023 02:21
hackerwins pushed a commit that referenced this pull request Nov 23, 2023
This commit addresses the issue of client sequences being absent on
the server. It accomplishes this by preventing the update of changeID.
hackerwins pushed a commit that referenced this pull request Nov 23, 2023
This commit addresses the issue of client sequences being absent on
the server. It accomplishes this by preventing the update of changeID.
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.

2 participants