-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix "insert before/after" not showing for blocks in site editor #62530
Conversation
Size Change: +454 B (+0.03%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
I feel like there must be a way. I think it's very difficult to understand the logic, so here's a quick breakdown of what I know it to be:
The two shouldn't be confused, though I know it's very confusing (I left this feedback on the PR that implemented it, but it was ignored). Editable blocks (the block itself) within a pattern will have a |
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. |
Yeah, I think you're right! The original condition failed because it's checking the root client id 🤦. I think I fixed it now in ce14a1c. It's indeed very confusing 😅. |
Flaky tests detected in ce14a1c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9498345315
|
This looks right to me. Sorry it's confusing 😔 To straighten it out we probably need to deprecate both and move to an API design that doesn't rely on encapsulating a bunch of different behaviours into one string. Testing now. |
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.
I tested the steps in the linked issue and checked that the movers don't appear when selecting an editable block in a synced pattern with overrides 👍
…Press#62530) Co-authored-by: kevin940726 <kevin940726@git.wordpress.org> Co-authored-by: noisysocks <noisysocks@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> * Fix insert before & after not showing for blocks in templates * Use block editing mode
Co-authored-by: kevin940726 <kevin940726@git.wordpress.org> Co-authored-by: noisysocks <noisysocks@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> * Fix insert before & after not showing for blocks in templates * Use block editing mode
Co-authored-by: kevin940726 <kevin940726@git.wordpress.org> Co-authored-by: noisysocks <noisysocks@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> * Fix insert before & after not showing for blocks in templates * Use block editing mode
I just cherry-picked this PR to the wp/6.6-beta-3 branch to get it included in the next release: fe9fe31 |
Co-authored-by: kevin940726 <kevin940726@git.wordpress.org> Co-authored-by: noisysocks <noisysocks@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> * Fix insert before & after not showing for blocks in templates * Use block editing mode
What?
Fix #62367.
Fix "Insert before" & "Insert after" not showing in the site editor when editing pages.
Why?
The bug was introduced in #61127 (comment). The condition was not enough because it's checking the root client id (parent block).
How?
Move the check to the block settings menu and check the block itself.
Testing Instructions
Screenshots or screencast