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

Support multi-user undo and redo #635

Closed
wants to merge 42 commits into from
Closed

Support multi-user undo and redo #635

wants to merge 42 commits into from

Conversation

hyemmie
Copy link
Contributor

@hyemmie hyemmie commented Aug 28, 2023

What this PR does / why we need it?

It's the initial version of multi-user undo/redo implementation. For now, it's focusing on implementing an architecture to support undo/redo using liveblocks as a reference.

Any background context you want to provide?

Additional information about multi-user undo/redo is at yorkie-team/yorkie#49.

What are the relevant tickets?

Fixes #

Checklist

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

@hyemmie hyemmie added the enhancement 🌟 New feature or request label Aug 28, 2023
@hyemmie hyemmie requested a review from chacha912 August 28, 2023 05:35
@CLAassistant
Copy link

CLAassistant commented Aug 28, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Patch coverage: 74.43% and project coverage change: -1.26% ⚠️

Comparison is base (52ffdbd) 88.88% compared to head (a9c5d2f) 87.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #635      +/-   ##
==========================================
- Coverage   88.88%   87.62%   -1.26%     
==========================================
  Files          80       81       +1     
  Lines        8958     9747     +789     
  Branches      825      875      +50     
==========================================
+ Hits         7962     8541     +579     
- Misses        688      885     +197     
- Partials      308      321      +13     
Files Changed Coverage Δ
src/document/json/counter.ts 78.94% <ø> (ø)
src/api/converter.ts 86.69% <13.33%> (-4.14%) ⬇️
test/integration/document_test.ts 75.15% <47.19%> (-24.28%) ⬇️
src/document/operation/edit_reverse_operation.ts 64.70% <64.70%> (ø)
src/document/operation/operation.ts 85.71% <75.00%> (-14.29%) ⬇️
src/document/change/context.ts 95.65% <83.33%> (-4.35%) ⬇️
src/document/operation/remove_operation.ts 76.66% <86.66%> (+11.96%) ⬆️
src/document/document.ts 80.93% <88.46%> (+4.33%) ⬆️
src/document/change/change.ts 90.00% <100.00%> (+2.00%) ⬆️
src/document/crdt/element.ts 90.00% <100.00%> (+1.76%) ⬆️
... and 15 more

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

Currently, executedAt is used as createdAt, preventing the creation
of elements with same createdAt. To enable creating elements with
same createdAt during undo, this commit introduced lastUpdatedAt
and compared it to executedAt.
@hackerwins
Copy link
Member

This continued in #650.

@hackerwins hackerwins closed this Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants