-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Real-time collaboration: Add collaborator modes #73474
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
Conversation
|
Size Change: +179 B (+0.01%) Total Size: 2.13 MB
ℹ️ View Unchanged
|
1492c28 to
e467342
Compare
5b61a4e to
097889c
Compare
097889c to
de365b7
Compare
2323430 to
cc6ae77
Compare
de365b7 to
f7977ca
Compare
5840ca6 to
2868f24
Compare
|
Final PR summary:
Both of these points are related, and can be approach iteratively imo. As we solve #1, #2 will automatically be rectified as well. The backend restrictions are definitely quite drastic, and would need to be revisited before we make a PR into trunk. I'm not 100% set on them, but given everything is development only right now it's fine imo. |
packages/core-data/src/selectors.ts
Outdated
| } | ||
|
|
||
| // Default to edit mode if sync is not enabled, or if it is not a Gutenberg plugin. | ||
| return 'edit'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my way of ensuring that this mode is only edit when the experiment is not enabled. I couldn't find a way of setting an experiment specific config so I figured this way would be a good middle ground.
|
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. |
…e time * Moved <EditorsPresence> component to editor-presence * Renamed <EditorsPresence> to <EditorPresence> * Convert <EditorPresence> file to tsx * Update EditorPresence Slot to only render one container * Add basic docs for <EditorPresence> * Update packages/editor/src/components/editor-presence/index.tsx Co-authored-by: Chris Zarate <[email protected]> * Update docs for <EditorPresence> * Make <EditorPresence> private --------- Co-authored-by: Chris Zarate <[email protected]>
* Real-time collaboration: Sync collections * Create markEntityAsSaved utility function * Improve comment
…nce is not supported * Real-time collaboration: Do not call saveRecord when persistence is not supported * Update unit tests * DRY up mocks
…k on core-data actions
136ac21 to
495827d
Compare
What?
Add collaborator modes within Gutenberg, for the express purpose of supporting collaborator modes within the editor across GB code and other plugins like the VIP Real Time Collaboration plugin.
The following has been done using this new mode:
Why?
Create a new property in the core-data state called
collaboratorModethat's set to view and edit. This was previously within the vip rtc plugin, and it's being moved to within GB.How?
The save/edit/delete entity operations return early, or filter out everything except selection when the view mode is set.
The code editor, and post title are set to read only and their content is not editable when the view mode is set.
Testing Instructions
Screencast
view-mode.mp4