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

refactor: doc support JSON OT #2268

Merged
merged 15 commits into from
May 27, 2024
Merged

refactor: doc support JSON OT #2268

merged 15 commits into from
May 27, 2024

Conversation

Jocs
Copy link
Contributor

@Jocs Jocs commented May 17, 2024

close #https://github.com/dream-num/univer-pro/issues/756

TODOs

  • core-edit-mutation revamp
    • no longer acts on the body field alone, but is a modification to the DocumentDataModel
    • core-edit-mutation caller revamp
  • DocumentDataModel Modification
    • Update data using the json-x apply method
  • Text-X and Text-X-Pro enhancements
    • Add invert method
    • Add makeInvertible method
    • Add isNoop method
    • Add apply method
  • JSON-X and DocumentDataModel support for JSON OT data structures at the same level
    • Embedded text-x
    • Static methods: compose, apply, invert, etc
    • Instance methods: moveTo, edit, replace, delete, etc. (corresponding to json1 method)
  • doc synergy related modification in Univer-pro
    • json-x-pro supports transform, transformPosition, etc
    • Modifications related to OT algorithm calls

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

Copy link

codecov bot commented May 17, 2024

Codecov Report

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

Project coverage is 30.03%. Comparing base (6e6f185) to head (eb1e898).

Files Patch % Lines
packages/core/src/docs/data-model/json-x/json-x.ts 55.55% 16 Missing ⚠️
packages/core/src/docs/data-model/text-x/apply.ts 69.69% 10 Missing ⚠️
...commands/mutations/set-floating-object.mutation.ts 0.00% 7 Missing ⚠️
...docs/src/commands/commands/core-editing.command.ts 0.00% 6 Missing ⚠️
packages/core/src/docs/data-model/text-x/text-x.ts 90.24% 4 Missing ⚠️
...kages/docs/src/commands/commands/delete.command.ts 0.00% 2 Missing ⚠️
...es/docs/src/commands/commands/ime-input.command.ts 0.00% 2 Missing ⚠️
...ackages/docs/src/commands/commands/list.command.ts 0.00% 2 Missing ⚠️
...s/src/commands/commands/paragraph-align.command.ts 0.00% 2 Missing ⚠️
.../commands/set-floating-object-transform.command.ts 0.00% 2 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2268      +/-   ##
==========================================
+ Coverage   29.99%   30.03%   +0.04%     
==========================================
  Files        1419     1421       +2     
  Lines       72976    73053      +77     
  Branches    15283    15297      +14     
==========================================
+ Hits        21891    21944      +53     
- Misses      51085    51109      +24     

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

Copy link

github-actions bot commented May 17, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@Jocs Jocs force-pushed the feat/doc-json-ot branch 2 times, most recently from 79377ef to dd8f038 Compare May 22, 2024 09:17
@Jocs Jocs marked this pull request as ready for review May 22, 2024 12:48
@Jocs Jocs added the qa:untested This PR is ready to be tested label May 22, 2024
@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label May 25, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label May 25, 2024
Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

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

LGTM

@wzhudev wzhudev merged commit 3cc0d55 into dev May 27, 2024
9 checks passed
@wzhudev wzhudev deleted the feat/doc-json-ot branch May 27, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants