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

Update EditReverse operation to support undo and redo on Text.edit #649

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from

Conversation

hyemmie
Copy link
Contributor

@hyemmie hyemmie commented Sep 15, 2023

What this PR does / why we need it?

This PR reflects the changes to implement undo & redo in text.edit.
The previous method, implemented in feat/undo-redo-arch focused on local index to create an EditReverse. However, this method has several side effects, so I changed it to generate an EditReverse based on the global NodeID.

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

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

hyemmie and others added 30 commits August 24, 2023 20:21
Co-authored-by: Yourim Cha <[email protected]>
@hackerwins hackerwins changed the base branch from feat/undo-redo-arch to main September 24, 2023 00:52
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Patch coverage: 36.71% and project coverage change: -2.89% ⚠️

Comparison is base (0fcc07f) 89.16% compared to head (9fc9ab8) 86.27%.

❗ Current head 9fc9ab8 differs from pull request most recent head 5716e26. Consider uploading reports for the commit 5716e26 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #649      +/-   ##
==========================================
- Coverage   89.16%   86.27%   -2.89%     
==========================================
  Files          79       80       +1     
  Lines        9318     9732     +414     
  Branches      856      882      +26     
==========================================
+ Hits         8308     8396      +88     
- Misses        697     1013     +316     
- Partials      313      323      +10     
Files Changed Coverage Δ
src/document/presence/presence.ts 100.00% <ø> (ø)
src/api/converter.ts 83.75% <6.12%> (-7.07%) ⬇️
test/integration/text_test.ts 62.78% <6.45%> (-36.30%) ⬇️
src/document/operation/edit_reverse_operation.ts 43.33% <43.33%> (ø)
src/document/document.ts 80.44% <71.42%> (-0.34%) ⬇️
src/document/crdt/rga_tree_split.ts 90.93% <88.37%> (-0.58%) ⬇️
src/document/crdt/text.ts 91.17% <100.00%> (+1.17%) ⬆️
src/document/json/text.ts 37.87% <100.00%> (ø)
src/document/operation/edit_operation.ts 64.51% <100.00%> (+2.44%) ⬆️
test/integration/counter_test.ts 94.51% <100.00%> (+0.03%) ⬆️
... and 2 more

... and 1 file with indirect coverage changes

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

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.

3 participants