-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Editor: Remove edit template menu item from block settings menu in blocks outside template. #65560
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. |
Size Change: +7 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
This seems to break a lot of e2e tests 🤔. I didn't look deeply into the failures though, but I think it's worth investigating. |
Yep, I forgot a small condition, it should be fixed now. |
I think this breaks the fix in #62354. (c.c. @ramonjd). Now it shows an empty dropdown in the template editor: Reproduction steps (I tested it in Playground):
|
Good catch, as I mentioned on the issue, I was not able to find a place where this menu was actually rendered :) I can restore it with the right fix 👍 |
It should be fixed now (both issues) |
No problems! As a side note, I found git blaming on the lines intended to be removed is a good way to find the PR/issues responsible for the changes. That's how I found the PR and the reproduction steps too (Thanks to the detailed testing instructions). I can probably give it another review if nobody beats me to it. |
Flaky tests detected in 38326bd. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10991191541
|
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.
The changes look good and it is working well for me 👍
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.
Thanks for the fix. Everything appears to be working as expected.
There was a conflict while trying to cherry-pick the commit to the wp/6.7 branch. Please resolve the conflict manually and create a PR to the wp/6.7 branch. PRs to wp/6.7 are similar to PRs to trunk, but you should base your PR on the wp/6.7 branch instead of trunk.
|
…ocks outside template. (#65560)
Related #60021
Follow-up to #65204
Closes #65548
What?
For template blocks, we shown an "edit template" menu in the block settings menu. To do that we check that the block is not within a "post" block. That said, we should limit this to "template-locked" rendering mode as otherwise the template is not even rendered.
In trunk, that menu is being incorrectly shown for any block.
Testing Instructions
1- Open the post editor
2- add a block and open the block settings menu
3- you shouldn't see the "edit template" menu item.
Also check these instructions #65560 (comment)