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 suggestions #16008

Open
davidbrochart opened this issue Mar 18, 2024 · 0 comments
Open

Support suggestions #16008

davidbrochart opened this issue Mar 18, 2024 · 0 comments

Comments

@davidbrochart
Copy link
Contributor

davidbrochart commented Mar 18, 2024

Add suggestion support in RTC, similarly to how Google Docs works.

This work is currently being done in these 3 PRs:

A menu allows to choose the editing mode of a shared document:

  • Editing: edit document directly. This is the current state of RTC for everyone collaborating on a document.
  • Suggesting: edits become suggestions. This is the new mode added by this PR.

When entering suggesting mode, the frontend asks for a fork of the shared document. The forked document is a new document which is kept in sync with the root document, i.e. all updates to the root document are applied to the forked document. However the changes to the forked document are not applied to the root document yet. A user in suggesting mode makes changes to the forked document, not the root document. Only when these changes are accepted do they get merged in the root document. A new room is created in the backend for the forked document. The user in suggesting mode disconnects their shared document from the root room, and connects it to the forked room through its room ID.
Forked documents are advertised on the root document, in the ystate root Map type as a new entry fork_{forkId}. This way, a user editing the root document can be notified of suggestions. They can then connect their shared document to a forked room through its room ID.
Currently a user either sees the root document or a forked document, but not a diff of the forked document and the root document. Google Docs shows a unified view where all suggestions are shown with a different color. This would require the frontend to connect to the root document and all its forks at the same time, interpret the changes and show them on the same view. This is not currently possible as there can be only one document provider at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants