Skip to content

RTC: Remove post list lock icon and replace user-specific lock text#76322

Merged
maxschmeling merged 6 commits intotrunkfrom
pkevan/fix-grid-layout-resize
Mar 17, 2026
Merged

RTC: Remove post list lock icon and replace user-specific lock text#76322
maxschmeling merged 6 commits intotrunkfrom
pkevan/fix-grid-layout-resize

Conversation

@pkevan
Copy link
Contributor

@pkevan pkevan commented Mar 9, 2026

What?

Closes #75313

When RTC is enabled, the post list should not show an exclusive lock icon or user-specific lock text since multiple users can collaboratively edit the same post.

Why?

With real-time collaboration, users can edit posts simultaneously. The current lock icon and "{user} is currently editing" text imply exclusive locking semantics that no longer apply. The MVP is to show a generic "Currently being edited" message instead.

How?

  • Heartbeat filter (priority 20): Modifies WordPress core's wp_check_locked_posts response to replace user-specific data with a generic message before it reaches the client
  • CSS injection: Hides the lock icon (.locked-indicator) and user avatar (.locked-avatar), and re-enables checkboxes/actions on locked rows
  • JS injection: Replaces the initial page render lock text with "Currently being edited"
  • Row actions filter: Changes "Edit" to "Join" for locked posts
  • Consistent pattern: Follows best practices from concurrent PR RTC: Remove post list lock icon and replace user-specific lock text with generic message #76255, using wp_json_encode() with HEX flags and coordinator pattern

Testing Instructions

  1. Enable RTC (Settings > Writing > Collaboration checkbox)
  2. Open a post/page in one browser tab or as a different user to create a lock
  3. In another browser/tab, navigate to the Posts or Pages list
  4. Verify:
    • No padlock icon appears
    • No user avatar appears
    • Lock status text says "Currently being edited"
    • The "Edit" link text says "Join"
  5. Wait for a heartbeat cycle (~10s) and verify text is not overwritten
  6. Disable RTC and verify classic lock behavior is unchanged

Testing Instructions for Keyboard

All changes are visual/UI. Test with keyboard navigation:

  1. Tab through the post list
  2. Verify the "Join" link is focusable and functional
  3. Verify checkboxes remain functional for locked posts

💡 Combines best practices from both our approach and concurrent PR #76255 for robust, maintainable RTC lock UI handling.

When real-time collaboration is enabled, the post list should not show an
exclusive lock icon or user-specific lock text since multiple users can
collaboratively edit the same post.

Changes:
- Filter heartbeat response (priority 20) to replace user-specific lock data
  with generic "Currently being edited" message before reaching the client
- Inject CSS to hide lock icon and avatar on initial page render
- Inject JS to replace initial page render lock text with generic message
- Filter row actions to change "Edit" link text to "Join" for locked posts
- Re-enable checkboxes and inline edit actions for locked rows (RTC allows
  collaborative editing, so the post is not exclusively locked)

Fixes #75313

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@pkevan pkevan added the No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core label Mar 9, 2026
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Flaky tests detected in 7915e48.
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/23044940236
📝 Reported issues:

@chriszarate
Copy link
Contributor

Why the "No Core Sync Required" label? It definitely requires backporting.

@pkevan
Copy link
Contributor Author

pkevan commented Mar 10, 2026

Why the "No Core Sync Required" label? It definitely requires backporting.

Ugh, Claude seems to keep thinking that's how to fix it!

@pkevan pkevan added [Type] Enhancement A suggestion for improvement. and removed No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core labels Mar 10, 2026
@maxschmeling maxschmeling added [Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Mar 12, 2026
@maxschmeling maxschmeling marked this pull request as ready for review March 12, 2026 05:32
@github-actions
Copy link

github-actions bot commented Mar 12, 2026

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: pkevan <[email protected]>
Co-authored-by: maxschmeling <[email protected]>
Co-authored-by: alecgeatches <[email protected]>
Co-authored-by: chriszarate <[email protected]>
Co-authored-by: dabowman <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

maxschmeling and others added 4 commits March 12, 2026 00:37
Links to wordpress-develop#11234 which backports the post list lock
icon and text changes when real-time collaboration is enabled.
The CI grep pattern expects `* URL` (one space) but the file had
`*  URL` (two spaces), causing the backport changelog check to fail.
@alecgeatches
Copy link
Contributor

@pkevan This looks good! Here's a screenshot of a post being edited for reference:

Screenshot 2026-03-12 at 1 01 30 PM

I did notice while testing that there's a flash of the old string content on page load:

flash-of-old-text.mov

I made a suggestion PR over in #76466 to address this via a gettext filter, which I think is roughly as hacky but more effective. Check it out!

@maxschmeling maxschmeling merged commit 4626363 into trunk Mar 17, 2026
42 checks passed
@maxschmeling maxschmeling deleted the pkevan/fix-grid-layout-resize branch March 17, 2026 20:12
@github-actions github-actions bot added this to the Gutenberg 22.8 milestone Mar 17, 2026
@github-actions github-actions bot removed the Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Mar 17, 2026
gutenbergplugin pushed a commit that referenced this pull request Mar 17, 2026
…76322)

* RTC: Remove post list lock icon and replace user-specific lock text

When real-time collaboration is enabled, the post list should not show an
exclusive lock icon or user-specific lock text since multiple users can
collaboratively edit the same post.

Changes:
- Filter heartbeat response (priority 20) to replace user-specific lock data
  with generic "Currently being edited" message before reaching the client
- Inject CSS to hide lock icon and avatar on initial page render
- Inject JS to replace initial page render lock text with generic message
- Filter row actions to change "Edit" link text to "Join" for locked posts
- Re-enable checkboxes and inline edit actions for locked rows (RTC allows
  collaborative editing, so the post is not exclusively locked)

Fixes #75313

Co-Authored-By: Claude Haiku 4.5 <[email protected]>

* Add backport changelog

* Add backport changelog entry for RTC post list lock changes

Links to wordpress-develop#11234 which backports the post list lock
icon and text changes when real-time collaboration is enabled.

* Revert "Add backport changelog entry for RTC post list lock changes"

This reverts commit 83c65b1.

* Fix backport changelog formatting: remove extra space

The CI grep pattern expects `* URL` (one space) but the file had
`*  URL` (two spaces), causing the backport changelog check to fail.

* Use 'gettext' to replace text instead of JS action to avoid flash of previous string (#76466)

---------

Co-authored-by: pkevan <[email protected]>
Co-authored-by: maxschmeling <[email protected]>
Co-authored-by: alecgeatches <[email protected]>
Co-authored-by: chriszarate <[email protected]>
Co-authored-by: dabowman <[email protected]>
@github-actions github-actions bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Mar 17, 2026
@github-actions
Copy link

I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: e7179ac

Copy link
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

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

@pkevan, @maxschmeling: I just got back from AFK, so forgive the late review. The points I raised here seem quite pertinent, given where we are in WP 7.0 and the intention to backport this at WordPress/wordpress-develop#11234


if ( isset( $actions['edit'] ) ) {
$actions['edit'] = preg_replace(
'/>Edit</',
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look right. Will it work if the UI is in any language other than English?

Copy link
Member

Choose a reason for hiding this comment

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

I doubt it...

}

add_action( 'admin_head', 'gutenberg_post_list_collaboration_styles' );
add_filter( 'gettext', 'gutenberg_filter_locked_post_text_for_rtc', 10, 3 );
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the performance penalty of attaching a gettext hook? It's the first time I've seen it in use, and it worries me. :)

pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Mar 19, 2026
This updates the pinned hash from the `gutenberg` from `8c78d87453509661a9f28f978ba2c242d515563b` to `487a096a9782ba6110a7686d7b4b2d0c55ed1b06`.

The following changes are included:

- Disables anchor support for the Page Break block. (WordPress/gutenberg#76434)
- WP Admin: Update Connectors screen footer text for consistency. (WordPress/gutenberg#76382)
- E2E Tests: Add coverage for AI plugin callout banner on Connectors page (WordPress/gutenberg#76432)
- Update sync docs (WordPress/gutenberg#75972)
- RTC: Add preference for collaborator notifications (WordPress/gutenberg#76460)
- Fix "should undo bold" flaky test (WordPress/gutenberg#76464)
- TimePicker: Clamp month day to valid day for month (WordPress/gutenberg#76400)
- RTC: Fix error when entity record doesn't have 'meta' property (WordPress/gutenberg#76311)
- Navigation: Update close button size. (WordPress/gutenberg#76482)
- TemplateContentPanel: fix useSelect warning (WordPress/gutenberg#76421)
- DataViews: Add spinner in `DataViewsLayout` in initial load of data (WordPress/gutenberg#76486) (WordPress/gutenberg#76490)
- RTC: Fix TypeError in areEditorStatesEqual when selection is undefined (WordPress/gutenberg#76163)
- Page/Post Content Focus Mode: Fix insertion into Post Content block (WordPress/gutenberg#76477)
- Revisions: use useSubRegistry={false} to fix global store selectors (WordPress/gutenberg#76152) (WordPress/gutenberg#76522)
- Fix RTL styling on Connectors, Font Library, and boot-based admin pages (WordPress/gutenberg#76496)
- RTC: Auto-register custom taxonomy rest_base values for CRDT sync (WordPress/gutenberg#75983)
- RTC: Add a limit for the default provider (WordPress/gutenberg#76437)
- Fix RTL styling on AI plugin callout banner (WordPress/gutenberg#76497)
- Add command palette trigger button to admin bar (WordPress/gutenberg#75757)
- Block Bindings: Remove source items constrained by enums (WordPress/gutenberg#76200)
- HTML Block: Remove "unsaved changes" check (WordPress/gutenberg#76086)
- CI: Don't build release notes during plugin build workflow for WP Core sync (WordPress/gutenberg#76398) (WordPress/gutenberg#76578)
- CI: Simplify strategy matrix in Build Gutenberg Plugin Zip workflow (WordPress/gutenberg#76435) (WordPress/gutenberg#76538)
- Media: Add hooks and extension points for client-side media processing (WordPress/gutenberg#74913)
- RTC: Fix list sidebar reset during real-time collaboration (WordPress/gutenberg#76025)
- RTC: Fix CRDT serialization of nested RichText attributes (WordPress/gutenberg#76597)
- RTC: Remove post list lock icon and replace user-specific lock text (WordPress/gutenberg#76322)
- Fix HEIC upload error handling and sub-size format (WordPress/gutenberg#76514)
- RTC: Fix cursor index sync with rich text formatting (WordPress/gutenberg#76418)
- RTC: Allow filtering of `SyncConnectionModal` (WordPress/gutenberg#76554)
- RTC: Implement front-end peer limits (WordPress/gutenberg#76565)
- Navigation overlay close button may be displayed twice (WordPress/gutenberg#76585)
- Site Editor > Templates: fix author filter (WordPress/gutenberg#76625)
- Revisions: Show changed block attributes in inspector sidebar (WordPress/gutenberg#76550)
- Fix IS_GUTENBERG_PLUGIN env var override in build config  (WordPress/gutenberg#76605)
- Real Time Collaboration: Introduce filters for the polling intervals. (WordPress/gutenberg#76518)
- RTC: Fix RichTextData deserialization (WordPress/gutenberg#76607)
- Cross Origin Isolation: Remove `img` from the list of elements that get mutated (WordPress/gutenberg#76618)
- RTC: Scroll to collaborator on click (WordPress/gutenberg#76561)
- Update changelog link for pull request 11276 (WordPress/gutenberg#76638)
- Fix backport changelog filename (WordPress/gutenberg#76651)
- Build: Skip non-minified build for WASM-inlined workers (WordPress/gutenberg#76615)
- RTC: Change RTC option name (WordPress/gutenberg#76643)
- BlockListBlock: fix crash when selectedProps are null (WordPress/gutenberg#75826)
- Build: Fix vips worker 404 when SCRIPT_DEBUG is true (WordPress/gutenberg#76657)
- useMediaQuery: support in-iframe queries via new `WindowContext` (WordPress/gutenberg#76446) (WordPress/gutenberg#76660)
- Refactor admin-ui Page component to use @wordpress/theme tokens and @wordpress/ui layout primitive (WordPress/gutenberg#75963)
- Connectors: Improve accessibility (WordPress/gutenberg#76456)
- Build: Remove unused JXL WASM module from vips worker (WordPress/gutenberg#76639)
- Connectors: fix button size (WordPress/gutenberg#76582)
- Compose: Implement useCopyToClipboard and useCopyOnClick with native clipboard API (WordPress/gutenberg#75723) (WordPress/gutenberg#76663)
- Connectors: Fetch specific plugin instead of all plugins (WordPress/gutenberg#76594)
- Revisions: Add Meta fields diff panel to document sidebar (WordPress/gutenberg#76341)
- Loosen client-side media processing requirements (WordPress/gutenberg#76616)
- Reduce the added halo for selected block. (WordPress/gutenberg#76619)
- Connectors: Add unregisterConnector and upsert support (WordPress/gutenberg#76541)

A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/8c78d87453509661a9f28f978ba2c242d515563b…487a096a9782ba6110a7686d7b4b2d0c55ed1b06.

Log created with:

git log --reverse --format="- %s" 8c78d87453509661a9f28f978ba2c242d515563b..487a096a9782ba6110a7686d7b4b2d0c55ed1b06 | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy

See #64595.

git-svn-id: https://develop.svn.wordpress.org/trunk@62063 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Mar 19, 2026
This updates the pinned hash from the `gutenberg` from `8c78d87453509661a9f28f978ba2c242d515563b` to `487a096a9782ba6110a7686d7b4b2d0c55ed1b06`.

The following changes are included:

- Disables anchor support for the Page Break block. (WordPress/gutenberg#76434)
- WP Admin: Update Connectors screen footer text for consistency. (WordPress/gutenberg#76382)
- E2E Tests: Add coverage for AI plugin callout banner on Connectors page (WordPress/gutenberg#76432)
- Update sync docs (WordPress/gutenberg#75972)
- RTC: Add preference for collaborator notifications (WordPress/gutenberg#76460)
- Fix "should undo bold" flaky test (WordPress/gutenberg#76464)
- TimePicker: Clamp month day to valid day for month (WordPress/gutenberg#76400)
- RTC: Fix error when entity record doesn't have 'meta' property (WordPress/gutenberg#76311)
- Navigation: Update close button size. (WordPress/gutenberg#76482)
- TemplateContentPanel: fix useSelect warning (WordPress/gutenberg#76421)
- DataViews: Add spinner in `DataViewsLayout` in initial load of data (WordPress/gutenberg#76486) (WordPress/gutenberg#76490)
- RTC: Fix TypeError in areEditorStatesEqual when selection is undefined (WordPress/gutenberg#76163)
- Page/Post Content Focus Mode: Fix insertion into Post Content block (WordPress/gutenberg#76477)
- Revisions: use useSubRegistry={false} to fix global store selectors (WordPress/gutenberg#76152) (WordPress/gutenberg#76522)
- Fix RTL styling on Connectors, Font Library, and boot-based admin pages (WordPress/gutenberg#76496)
- RTC: Auto-register custom taxonomy rest_base values for CRDT sync (WordPress/gutenberg#75983)
- RTC: Add a limit for the default provider (WordPress/gutenberg#76437)
- Fix RTL styling on AI plugin callout banner (WordPress/gutenberg#76497)
- Add command palette trigger button to admin bar (WordPress/gutenberg#75757)
- Block Bindings: Remove source items constrained by enums (WordPress/gutenberg#76200)
- HTML Block: Remove "unsaved changes" check (WordPress/gutenberg#76086)
- CI: Don't build release notes during plugin build workflow for WP Core sync (WordPress/gutenberg#76398) (WordPress/gutenberg#76578)
- CI: Simplify strategy matrix in Build Gutenberg Plugin Zip workflow (WordPress/gutenberg#76435) (WordPress/gutenberg#76538)
- Media: Add hooks and extension points for client-side media processing (WordPress/gutenberg#74913)
- RTC: Fix list sidebar reset during real-time collaboration (WordPress/gutenberg#76025)
- RTC: Fix CRDT serialization of nested RichText attributes (WordPress/gutenberg#76597)
- RTC: Remove post list lock icon and replace user-specific lock text (WordPress/gutenberg#76322)
- Fix HEIC upload error handling and sub-size format (WordPress/gutenberg#76514)
- RTC: Fix cursor index sync with rich text formatting (WordPress/gutenberg#76418)
- RTC: Allow filtering of `SyncConnectionModal` (WordPress/gutenberg#76554)
- RTC: Implement front-end peer limits (WordPress/gutenberg#76565)
- Navigation overlay close button may be displayed twice (WordPress/gutenberg#76585)
- Site Editor > Templates: fix author filter (WordPress/gutenberg#76625)
- Revisions: Show changed block attributes in inspector sidebar (WordPress/gutenberg#76550)
- Fix IS_GUTENBERG_PLUGIN env var override in build config  (WordPress/gutenberg#76605)
- Real Time Collaboration: Introduce filters for the polling intervals. (WordPress/gutenberg#76518)
- RTC: Fix RichTextData deserialization (WordPress/gutenberg#76607)
- Cross Origin Isolation: Remove `img` from the list of elements that get mutated (WordPress/gutenberg#76618)
- RTC: Scroll to collaborator on click (WordPress/gutenberg#76561)
- Update changelog link for pull request 11276 (WordPress/gutenberg#76638)
- Fix backport changelog filename (WordPress/gutenberg#76651)
- Build: Skip non-minified build for WASM-inlined workers (WordPress/gutenberg#76615)
- RTC: Change RTC option name (WordPress/gutenberg#76643)
- BlockListBlock: fix crash when selectedProps are null (WordPress/gutenberg#75826)
- Build: Fix vips worker 404 when SCRIPT_DEBUG is true (WordPress/gutenberg#76657)
- useMediaQuery: support in-iframe queries via new `WindowContext` (WordPress/gutenberg#76446) (WordPress/gutenberg#76660)
- Refactor admin-ui Page component to use @wordpress/theme tokens and @wordpress/ui layout primitive (WordPress/gutenberg#75963)
- Connectors: Improve accessibility (WordPress/gutenberg#76456)
- Build: Remove unused JXL WASM module from vips worker (WordPress/gutenberg#76639)
- Connectors: fix button size (WordPress/gutenberg#76582)
- Compose: Implement useCopyToClipboard and useCopyOnClick with native clipboard API (WordPress/gutenberg#75723) (WordPress/gutenberg#76663)
- Connectors: Fetch specific plugin instead of all plugins (WordPress/gutenberg#76594)
- Revisions: Add Meta fields diff panel to document sidebar (WordPress/gutenberg#76341)
- Loosen client-side media processing requirements (WordPress/gutenberg#76616)
- Reduce the added halo for selected block. (WordPress/gutenberg#76619)
- Connectors: Add unregisterConnector and upsert support (WordPress/gutenberg#76541)

A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/8c78d87453509661a9f28f978ba2c242d515563b…487a096a9782ba6110a7686d7b4b2d0c55ed1b06.

Log created with:

git log --reverse --format="- %s" 8c78d87453509661a9f28f978ba2c242d515563b..487a096a9782ba6110a7686d7b4b2d0c55ed1b06 | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy

See #64595.
Built from https://develop.svn.wordpress.org/trunk@62063


git-svn-id: http://core.svn.wordpress.org/trunk@61345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Mar 20, 2026
…specific lock text when RTC is enabled.

When RTC is enabled, the post list should not show an exclusive lock icon or user-specific lock text since multiple users can collaboratively edit the same post.

Merges a fix from Gutenberg: WordPress/gutenberg#76322.

Developed in: #11234.

See #64622.
Props maxschmeling, czarate, mcsf, shekharnwagh.



git-svn-id: https://develop.svn.wordpress.org/trunk@62074 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Mar 20, 2026
…specific lock text when RTC is enabled.

When RTC is enabled, the post list should not show an exclusive lock icon or user-specific lock text since multiple users can collaboratively edit the same post.

Merges a fix from Gutenberg: WordPress/gutenberg#76322.

Developed in: WordPress/wordpress-develop#11234.

See #64622.
Props maxschmeling, czarate, mcsf, shekharnwagh.


Built from https://develop.svn.wordpress.org/trunk@62074


git-svn-id: http://core.svn.wordpress.org/trunk@61356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RTC: [Interface] Remove post list lock icon and update lock text

6 participants