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 concurrent formatting of Text #138

Merged
merged 20 commits into from
Oct 17, 2023
Merged

Support concurrent formatting of Text #138

merged 20 commits into from
Oct 17, 2023

Conversation

7hong13
Copy link
Contributor

@7hong13 7hong13 commented Oct 16, 2023

What this PR does / why we need it?

Support concurrent formatting of Text.

Any background context you want to provide?

I'll change the base branch to main after gc is merged.

What are the relevant tickets?

Fixes #

Checklist

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

@7hong13 7hong13 added the enhancement 🌟 New feature or request label Oct 16, 2023
@7hong13 7hong13 requested review from hackerwins and skhugh October 16, 2023 10:38
@7hong13 7hong13 self-assigned this Oct 16, 2023
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.

@@ -75,14 +75,32 @@ internal data class CrdtText(
range: RgaTreeSplitPosRange,
attributes: Map<String, String>,
executedAt: TimeTicket,
): List<TextChange> {
latestCreatedAtMapByActor: Map<ActorID, TimeTicket>? = null,
): Pair<Map<ActorID, TimeTicket>, List<TextChange>> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the return type is getting too complex now 🤔
It would be better to implement a custom class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added TextOperationResult which can be used as the return type for both edit() and style(): 3b2ca89

Base automatically changed from gc to main October 17, 2023 11:43
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

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

Comparison is base (6782b5c) 78.22% compared to head (74dc628) 78.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #138      +/-   ##
==========================================
- Coverage   78.22%   78.18%   -0.05%     
==========================================
  Files          63       63              
  Lines        3679     3713      +34     
  Branches      573      579       +6     
==========================================
+ Hits         2878     2903      +25     
- Misses        503      506       +3     
- Partials      298      304       +6     
Files Coverage Δ
...c/main/kotlin/dev/yorkie/document/crdt/TextInfo.kt 88.23% <100.00%> (+2.02%) ⬆️
...lin/dev/yorkie/document/operation/EditOperation.kt 70.96% <100.00%> (ø)
...in/dev/yorkie/document/operation/StyleOperation.kt 76.92% <100.00%> (+5.49%) ⬆️
...in/kotlin/dev/yorkie/document/crdt/RgaTreeSplit.kt 67.53% <0.00%> (-0.26%) ⬇️
...c/main/kotlin/dev/yorkie/document/json/JsonText.kt 72.72% <90.90%> (-0.61%) ⬇️
...c/main/kotlin/dev/yorkie/api/OperationConverter.kt 97.51% <50.00%> (-1.84%) ⬇️
...c/main/kotlin/dev/yorkie/document/crdt/CrdtText.kt 85.33% <76.47%> (-3.00%) ⬇️

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

@7hong13 7hong13 merged commit 28e9791 into main Oct 17, 2023
7 checks passed
@7hong13 7hong13 deleted the text branch October 17, 2023 16:49
@7hong13 7hong13 added this to the 0.4.7 milestone Oct 18, 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.

3 participants