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

feat: support multi-person collaborative editing #1274

Merged
merged 80 commits into from
Sep 19, 2022

Conversation

situ2001
Copy link
Member

@situ2001 situ2001 commented Jul 5, 2022

Types

  • 🎉 New Features

Background

This is an advance subject of ASoC 2022 and #1103.

For more details, visit #1097.

close #1097

Milestone

  • Basic collaboration function
  • Integration of user model
  • Optimizing and refactoring

Changelog

  • Init collaboration module
  • Add basic functions of collaboration

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Base: 57.64% // Head: 57.69% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (b1c84bf) compared to base (f1caaec).
Patch coverage: 66.20% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1274      +/-   ##
==========================================
+ Coverage   57.64%   57.69%   +0.04%     
==========================================
  Files        1256     1269      +13     
  Lines       78425    78925     +500     
  Branches    16438    16511      +73     
==========================================
+ Hits        45210    45537     +327     
- Misses      30219    30376     +157     
- Partials     2996     3012      +16     
Flag Coverage Δ
jsdom 52.53% <63.80%> (+0.06%) ⬆️
node 15.80% <13.60%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/collaboration/src/browser/index.ts 0.00% <0.00%> (ø)
packages/collaboration/src/node/index.ts 0.00% <0.00%> (ø)
...ackages/collaboration/src/browser/cursor-widget.ts 12.69% <12.69%> (ø)
...collaboration/src/browser/collaboration.service.ts 74.35% <74.35%> (ø)
...kages/collaboration/src/node/y-websocket-server.ts 76.19% <76.19%> (ø)
...ges/collaboration/src/browser/textmodel-binding.ts 76.43% <76.43%> (ø)
packages/collaboration/src/browser/color.ts 100.00% <100.00%> (ø)
packages/collaboration/src/common/commands.ts 100.00% <100.00%> (ø)
packages/collaboration/src/common/constants.ts 100.00% <100.00%> (ø)
packages/collaboration/src/common/index.ts 100.00% <100.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@erha19 erha19 added the 🏕 ASoC 2022 ASoC 2022 label Jul 11, 2022
@situ2001 situ2001 marked this pull request as ready for review August 23, 2022 07:23
@situ2001
Copy link
Member Author

situ2001 commented Aug 28, 2022

告一段落,这里尝试简单提出后续的工作:situ2001#15

@erha19 erha19 added this to the 2.21 milestone Aug 31, 2022
@erha19 erha19 mentioned this pull request Sep 13, 2022
@erha19 erha19 linked an issue Sep 13, 2022 that may be closed by this pull request
@erha19
Copy link
Member

erha19 commented Sep 13, 2022

@situ2001 冲突处理一下

packages/collaboration/package.json Outdated Show resolved Hide resolved
Copy link
Member

@Aaaaash Aaaaash left a comment

Choose a reason for hiding this comment

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

LGTM

@erha19 erha19 self-requested a review September 19, 2022 09:10
@erha19 erha19 merged commit 1c4ca0e into opensumi:main Sep 19, 2022
bytemain pushed a commit that referenced this pull request Sep 27, 2022
* feat: init collaboration module

* chore: clean up

* chore: add deps

* feat: basic textmodel binding

* chore: clean up codes

* refactor: fix type error and refactor binding

* refactor: rename

* feat: store bindings

* feat: undo manager

* fix: only support CodeEditor

* fix: add missing dependency

* feat: binding now supports multiple editor

* feat: support multiple editor

* fix: support multiple editors

* refactor: refine logic

* refactor: refine logic

* feat: force save

* feat: node-side init

* feat: init backservice

* feat: set init content by server

* feat: delete YText obj by server on file deletion

* fix: add missing dep

* refactor: make commands into constants

* fix: wont destroy bindings when app is stopped

* refactor: use `ROOM_NAME` constant

* refactor: apply di to `TextModelBinding`

* chore: remove unused log

* test: create test for `CollaborationModule`

* test: create test for `CollaborationContribution`

* refactor: clean codes and add comments

* refactor: use `EventBus` for `FilesChangeEvent`

* refactor: modify class field accessibility

* refactor: rename methods

* test: basic test for `CollaborationService`

* test: apply modifies to descriptions

* chore: update deps

* test: create test for `TextModelBinding`

* test: completed test for `TextModelBinding`

* test: create test for node side of collaboration

* feat: handle fs event and resolve content in node

* fix: destroy undoManager when destroying binding

* feat(collaboration): init user info, cursor widget

* fix: should set content before registering listener

* feat: add user info and indicator

* refactor: refactor constants and interface

* test: update

* feat: use `Deferred` to handle events

* test: remove

* test: update

* test: update

* refactor: move listener and handler from backService

* refactor: rename

* test: rename

* refactor: remove methods from interface

* refactor: classified types and constants

* refactor: remove default contribution

* refactor: rename to `CollaborationModuleContribution`

* refactor: remove `logger.debug` statements

* fix: do not remove styles when awareness removed

* refactor: renamed textmodel-binding

* refactor: refine TextModelBinding

* refactor: rename interface methods

* refactor: rename interface methods

* test: add missing token of di provider

* refactor: removed unused methods

* feat: enable autosave on collaboration module did start

* docs: init README

* feat: get ws hostname from AppConfig

* refactor: move constants

* test: add mock `AppConfig`

* chore: bump version to 2.20.1

Co-authored-by: Dan <danwu.wdw@alibaba-inc.com>
@erha19 erha19 mentioned this pull request Oct 12, 2022
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

支持在线协同编程 ASoC 2022: Support multi-person collaborative editing.
4 participants