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

Document the current state of the Real-Time collaboration experiment #54932

Merged
merged 5 commits into from
Oct 3, 2023

Conversation

oandregal
Copy link
Member

Related #52593

Add some notes to document how the Real-Time collaboration experiment works at the moment. This is a minimal and ongoing effort, to have some low-level notes to help navigate the code, complementing what has already been shared in make/core and the tracking issue.

@oandregal oandregal self-assigned this Sep 29, 2023
@oandregal oandregal added the [Type] Developer Documentation Documentation for developers label Sep 29, 2023
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

I like this, It helps people understand where we are at the moment.

packages/sync/CODE.md Outdated Show resolved Hide resolved
@@ -0,0 +1,56 @@
# Status of the sync experiment in Gutenberg
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think this could be in the README directly, why did you go with CODE.md?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't sure where to put this, given it documents an experiment that is split across core-data and sync packages. The README is published in the block editor handbook, and I'm not sure if it merits such visibility. I thought the README was also used in the page of the public @wordpress/sync package, although it seems it doesn't.

Happy to add it to the README or move it anywhere else.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's fine to keep it separate like that but link to it from the README or something for discoverability.

Copy link
Member Author

Choose a reason for hiding this comment

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

How about we iterate on this file until we have something we are happy with, and then we decide where to show it?


- Undo/redo does not work.
- Changes can be persisted.
- When changes are persisted (publish/update a post), the other peers don't have a visual hint (publish/update button is still enabled).
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this is true. The other peers should receive the visual hint because both the "edits" and the persisted entity are shared.

Copy link
Member Author

@oandregal oandregal Oct 3, 2023

Choose a reason for hiding this comment

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

It must be something that failed for me for a different reason at some point. For example, at some point, I was able to update an existing post, though I'm now unable 🤔

Gravacao.do.ecra.2023-10-03.as.08.33.14.mov

I just switched a post from published to draft, and it was broadcasted to other peers – so it does work.

Copy link
Member Author

Choose a reason for hiding this comment

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

Though it's fairly easy for them to get out of sync (notice how the right screen has the button disabled while the left one has it enabled):

Captura de ecrã 2023-10-03, às 12 23 41

Then, I reloaded the browser at the right screen and this is what happened (right is enabled, left is disabled):

Captura de ecrã 2023-10-03, às 12 24 09

@oandregal oandregal marked this pull request as ready for review October 3, 2023 06:40
@oandregal
Copy link
Member Author

@youknowriad how do you feel about merging as it is? I'd like to document a bit the signaling process, using this file as base in Jorge's PR (so it'd be convenient to me to have the file merged).

- Changes can be persisted and the publish/update button should react accordingly for all peers.
- Offline.
- Changes are stored in the browser's local storage (indexedDB) for each user/peer. Users can navigate away from the document and they'll see the changes when they come back.
- Visually, there is no hint that they are seeing local/offline changes vs published ones.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this point. It seems independent of real time collaboration or offline editing. When you have edits, you just see that your post is unsaved no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed that point. I'm not sure if it's related to offline mode, it sounds like an issue with the button status, see #54932 (comment)

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Flaky tests detected in 6d3f45b.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6391784285
📝 Reported issues:

@oandregal oandregal merged commit 140d04e into trunk Oct 3, 2023
@oandregal oandregal deleted the document/rt-collab-status branch October 3, 2023 11:12
@github-actions github-actions bot added this to the Gutenberg 16.8 milestone Oct 3, 2023
@bph bph added the [Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration label Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants