RTC: Disable real-time collaboration if meta boxes are present#75749
RTC: Disable real-time collaboration if meta boxes are present#75749chriszarate wants to merge 14 commits intotrunkfrom
Conversation
|
Size Change: -1.45 kB (-0.02%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
|
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. |
|
There are two items still left to fix:
|
This is an existing bug looks like as it can be replicated on trunk as well. I'll open up a separate issue for this. |
See #74571, though I think it may not have a dedicated issue. |
packages/edit-post/src/components/meta-boxes/use-meta-box-initialization.js
Show resolved
Hide resolved
packages/edit-post/src/components/meta-boxes/use-meta-box-initialization.js
Outdated
Show resolved
Hide resolved
|
Note: The post locked modal doesn't show up when the same user is logged into two separate tabs with RTC disabled due to the changes in this branch. It mirrors the same behaviour as when RTC isn't enabled on trunk, and we are in single editing mode. FYI @chriszarate |
Updated screenshots using verbiage from @dabowman. |
…le-rtc-meta-boxes
|
In testing I noticed a handful of issues when combined together:
Here's a reproduction: post-metabox-loses-revision.mov
I'm not sure this is a show-stopper because we're talking about a relatively short window, but it does seem like something between step 6 and 8 is removing user A's autosave which should have their unsaved content. Also on step 10 I'd expect to see at least user B's changes, but both sets of changes are removed. |
|
The collaboration tests are not passing here in CI and locally for me, but they seem to be passing via claude and for anyone else who tries this branch. I'm going to close this PR, cherry pick each commit to a brand new independent branch, and open a new PR to see if the issue repeats itself. I'll reference this PR in that PR. |
|
I have re-opened this PR - #75939. |
|
It's probably a merge conflict resolution gone wrong. You can also do the following to avoid context loss on the PRs, if the branch is actually corrupt:
|
|
We should update the labels on the new PR |
|
Done :) |


What?
Disable real-time collaboration if meta boxes are present.
Why?
Classic meta boxes are not synced by real-time collaboration and can lead to data loss. The person to hit "save" in a collaboration session will see their meta box input persisted, even if another user made changes.
How?
Add new
core-datastatecollaborationDisabled. When set totrue, it calls a new.disable()method on the sync provider that unloads all synced entities.Testing Instructions
meta-boxes.mov