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 mark operation to Text.setStyle #647

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

Introduce mark operation to Text.setStyle #647

wants to merge 25 commits into from

Conversation

MoonGyu1
Copy link
Contributor

What this PR does / why we need it?

Currently, the Text.setStyle logic sometimes doesn't adequately preserve user intent when formatting text concurrently. The Peritext CRDT algorithm classifies these user intentions into 9 different cases for rich-text concurrent editing. This PR introduces the mark operation of the Peritext algorithm to Text and enables the reflection of user intent in concurrent editing scenarios.

  • It currently being developed for the bold mark type as part of feasibility testing.
  • With this implementation, we can resolve examples 2 and 8 of issue#607

Any background context you want to provide?

Currently, it is in the process of being implemented for some types, and in the future, it can be extended to include additional types. Ultimately, we can move in the direction of providing users with a customizable interface.

What are the relevant tickets?

Address yorkie-team/yorkie#672

Checklist

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

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

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

Comparison is base (c4938f7) 71.38% compared to head (7f9b76e) 67.48%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     yorkie-team/yorkie-js-sdk#647      +/-   ##
==========================================
- Coverage   71.38%   67.48%   -3.91%     
==========================================
  Files          58       58              
  Lines        8734     9155     +421     
  Branches      784      829      +45     
==========================================
- Hits         6235     6178      -57     
- Misses       2241     2700     +459     
- Partials      258      277      +19     
Files Coverage Δ
src/document/json/text.ts 48.10% <100.00%> (+10.22%) ⬆️
src/document/operation/operation.ts 85.71% <ø> (ø)
src/api/yorkie/v1/yorkie_grpc_web_pb.js 81.35% <50.00%> (ø)
src/document/operation/style_operation.ts 57.69% <66.66%> (ø)
src/document/crdt/rga_tree_split.ts 90.15% <82.35%> (-1.26%) ⬇️
src/api/converter.ts 88.96% <73.77%> (-1.78%) ⬇️
src/document/crdt/text.ts 76.04% <67.70%> (-13.73%) ⬇️
src/api/yorkie/v1/resources_pb.js 60.13% <56.59%> (-4.75%) ⬇️

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

None yet

2 participants