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

Fix incorrect calculation in indexTree.treePosToPath operation #824

Merged
merged 7 commits into from
Mar 20, 2024

Conversation

raararaara
Copy link
Contributor

@raararaara raararaara commented Mar 15, 2024

What this PR does / why we need it:

This patch addresses an issue arising from the tree.edit operation in response to problem with calculating the fromPath when multiple treePos represent a single index-based coordinate, leading to inaccuracies.

This PR contains migration work for yorkie-team/yorkie-js-sdk#751, so detailed information can also be found there.

Which issue(s) this PR fixes:

Address #749
Related yorkie-team/yorkie-js-sdk#751

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 Mar 15, 2024

Codecov Report

Attention: Patch coverage is 25.92593% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 50.62%. Comparing base (0987cbc) to head (4bf60b9).
Report is 2 commits behind head on main.

Files Patch % Lines
pkg/index/tree.go 31.25% 9 Missing and 2 partials ⚠️
pkg/document/crdt/tree.go 18.18% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #824      +/-   ##
==========================================
- Coverage   50.71%   50.62%   -0.10%     
==========================================
  Files          70       70              
  Lines       10213    10234      +21     
==========================================
+ Hits         5180     5181       +1     
- Misses       4512     4530      +18     
- Partials      521      523       +2     

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

@raararaara raararaara marked this pull request as ready for review March 15, 2024 06:48
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.
I left simple comments.

pkg/document/crdt/tree.go Outdated Show resolved Hide resolved
pkg/index/tree.go Outdated Show resolved Hide resolved
test/integration/tree_test.go Outdated Show resolved Hide resolved
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.

LGTM.

@hackerwins hackerwins merged commit 7fb913a into main Mar 20, 2024
4 checks passed
@hackerwins hackerwins deleted the fix-incorrect-tree-path branch March 20, 2024 02:58
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