-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Real-time Collaboration: Add Yjs awareness foundation #74565
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
base: trunk
Are you sure you want to change the base?
Conversation
This skips the user and selection state subs for now, so as to get the initial implementation working. Once it's working, the follow up commits will add those back in.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Note: This PR doesn't need the experimental flag as it's scoped to the sync package, under the |
What?
Instantiate and pass a
YjsAwareness instance to the connection creator -ProviderCreator.Why?
An
Awarenessinstance allows for the implementation of awareness / presence indicators in the UI. These indicators can be provided by Gutenberg in future PRs. Plugins can also provide an implementation by accessing theAwarenessinstance passed to the connection creator function.How?
manager.ts. This way, every provider gets a ready to use Awareness instance.post-editor-awareness-state.tswhich focuses on awareness for the post editor.Testing Instructions
By default, we don't have any providers in trunk as of #74555 so we would be using the VIP RTC plugin as that comes up with a websockets provider. Clone https://github.com/Automattic/vip-real-time-collaboration and get it setup before following these instructions.
The
awarenessinstance is unused at the moment.Testing Instructions for Keyboard
No UI changes in this PR
Follow Up Plan
This'll lay the foundation for Awareness into Gutenberg. After this is merged in, there are 4 more PRs planned to complete this feature: