WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

Phase 3: Sync Engine and Real-Time Collaboration #52593

Open youknowriad opened 1 year ago

youknowriad commented 1 year ago

This is the overview issue for the collaborative editing project as defined on this post.

The goals are multiple here:

Tasks:

prajapatisagar commented 1 year ago

Hello Team,

As a first task of this issue, I have added my findings on https://github.com/WordPress/gutenberg/pull/23129 PR.

Thanks

youknowriad commented 1 year ago

Hi @prajapatisagar Thanks for the review there. Actually, the exploration has moved now to this PR https://github.com/WordPress/gutenberg/pull/52681 That was a good reminder though, I'm going to close that old PR now.

youknowriad commented 1 year ago

I merged the initial bootstrap behind an experimental flag and added a number of todo list items to the current issue. You all feel free to own one of these tasks and iterate on it.

annezazu commented 8 months ago

Out of the list of subtasks for real time collaboration, I've created an issue for inline block commenting so there's a more dedicated space to discuss and explore: https://github.com/WordPress/gutenberg/issues/59445

creativecoder commented 6 months ago

I found this presentation very informative, there may be some useful information for the collaborative sync engine:

"New algorithms for collaborative text editing" by Martin Kleppmann (Strange Loop 2023)

Specific points to highlight:

Automerge is a CRDT (conflict-free replicated data type) engine with a variety of API libraries available (including JS!). Of particular interest it the Peritext merge algorithm which is designed to handle issues specific to merging richtext/markup. I could see this being very useful for creating more elegant revisions for block content.

https://github.com/WordPress/gutenberg/assets/1699996/5219ef2e-636d-4968-b84b-69aac765938e

As an example using that technology, there's a prototype collaborative text editor called Upwelling, which is kind of like a combination of Google Docs and git. There's likely some design and technical inspiration there, particularly for asynchronous collaborative editing.

annezazu commented 3 days ago

For anyone following this work, I wanted to connect the dots to this discussion issue from @dmonad. Kevin is sponsored by Automattic to move this work forward and happens to be the author of Yjs! Two weeks ago he shared a lengthy update complete with video demos of some of what he's been working on.