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

Introduce TreeToken and tokensBetween to Tree #747

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

sejongk
Copy link
Contributor

@sejongk sejongk commented Jan 4, 2024

What this PR does / why we need it:

Unlike JS SDK, this PR doesn't create TreeChanges, but it changes the traversal logic to be token-based to keep consistency.

  • Implements token traversal method.
  • Ensures accurate inclusion of tokens (Start/End/Text) in ranges.

Which issue(s) this PR fixes:

Addresses #732

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

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

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

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

Comparison is base (64cbc24) 49.27% compared to head (cae18dc) 49.30%.

Files Patch % Lines
pkg/document/crdt/tree.go 85.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #747      +/-   ##
==========================================
+ Coverage   49.27%   49.30%   +0.03%     
==========================================
  Files          69       69              
  Lines       10087    10094       +7     
==========================================
+ Hits         4970     4977       +7     
  Misses       4601     4601              
  Partials      516      516              

☔ 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.

@hackerwins hackerwins merged commit 3b712df into main Jan 5, 2024
3 checks passed
@hackerwins hackerwins deleted the generate-correct-tree-change branch January 5, 2024 01:41
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