Use 'gettext' to replace text instead of JS in RTC post list#76466
Merged
pkevan merged 1 commit intopkevan/fix-grid-layout-resizefrom Mar 13, 2026
Merged
Use 'gettext' to replace text instead of JS in RTC post list#76466pkevan merged 1 commit intopkevan/fix-grid-layout-resizefrom
pkevan merged 1 commit intopkevan/fix-grid-layout-resizefrom
Conversation
|
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. |
pkevan
approved these changes
Mar 13, 2026
Contributor
pkevan
left a comment
There was a problem hiding this comment.
Nice - thanks for the improvement
maxschmeling
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 <noreply@anthropic.com> * 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 <paulkevan@git.wordpress.org> Co-authored-by: maxschmeling <maxschmeling@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org> Co-authored-by: chriszarate <czarate@git.wordpress.org> Co-authored-by: dabowman <davidabowman@git.wordpress.org>
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 <noreply@anthropic.com> * 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 <paulkevan@git.wordpress.org> Co-authored-by: maxschmeling <maxschmeling@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org> Co-authored-by: chriszarate <czarate@git.wordpress.org> Co-authored-by: dabowman <davidabowman@git.wordpress.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Proposed change to #76322 to avoid a flash of the old text:
flash-of-old-text.mov
Note that "admin is currently editing" briefly flashes on page load.
Why?
The solution currently in #76322 uses
admin_footerto change the text after the page has loaded, but even on a quick localhost load there's still a delay between DOM rendering and the text being replaced.How?
Instead of changing the screen client-side, use a classic
gettextfilter to change it on the server instead:gettext-instead.mov
I'd argue this is roughly as hacky as using client-side JS to make a string change, but this avoids a flash of old content on load.