RTC: Fix stuck "Join" link in post list when lock expires#76795
Open
shekharnwagh wants to merge 2 commits intoWordPress:trunkfrom
Open
RTC: Fix stuck "Join" link in post list when lock expires#76795shekharnwagh wants to merge 2 commits intoWordPress:trunkfrom
shekharnwagh wants to merge 2 commits intoWordPress:trunkfrom
Conversation
889156d to
4f3a9f3
Compare
4f3a9f3 to
ae45fc9
Compare
|
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. |
Always render both "Edit" and "Join" as separate spans in the row action link and toggle visibility via CSS using the .wp-collaborative-editing class the heartbeat already manages. Replaces aria-label with screen-reader-text spans so the accessible name stays in sync with the visible text across lock state changes.
The CSS selectors used `.wp-locked` to override core's hidden checkbox, but core's list-tables.css uses `tr.wp-locked` which has higher specificity. The `display: revert` rule never took effect, leaving checkboxes hidden on locked rows.
ae45fc9 to
042578f
Compare
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?
Fixes two post list issues when RTC is enabled:
Why?
PR #76322 conditionally rendered "Edit" or "Join" based on
wp_check_post_lock()at page load. The heartbeat correctly clears the.wp-collaborative-editingclass and lock status text when the lock expires, but never updates the action link text back to "Edit".Additionally, on WordPress < 7.0 (where the Gutenberg compat layer handles RTC), the CSS selectors that re-enable checkboxes on locked rows used
.wp-locked, but core'slist-tables.cssusestr.wp-lockedwhich has higher specificity — so the override never took effect. This doesn't affect WordPress 7.0+ where the styles live directly in core's stylesheet with correct specificity.How?
<span>elements in the row action link.wp-collaborative-editingclass the heartbeat already managesaria-labelwithscreen-reader-textspans so the accessible name stays in sync with the visible text across lock state changestrelement selector to match core'str.wp-lockedSame approach as the corresponding WordPress core fix: WordPress/wordpress-develop#11346
Testing Instructions