Fix(Pattern): Custom category in site editor does not display pattern actions#77251
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes missing Pattern Actions (rename/delete) for custom pattern categories in the Site Editor by aligning the props passed to PatternsActions with the component’s expected API.
Changes:
- Update
PatternsActionsusage to passtypeinstead ofpostType, ensuring the component can detectPATTERN_TYPES.userand render category actions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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. |
Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: d172c3d |
What?
Closes #77250
This PR restores the visibility of Pattern Actions (e.g., rename and delete) for custom pattern categories in the Site Editor.
Why?
Pattern Actions were not appearing for custom patterns in the latest Trunk due to a prop mismatch. The PatternsActions component expects a type prop, but postType was being passed instead.
How?
This PR updates the prop passed to the PatternsActions component from postType to type, aligning it with the component’s expected API. This ensures that Pattern Actions are correctly rendered for custom pattern categories.
Ref:
gutenberg/packages/edit-site/src/components/page-patterns/actions.js
Line 17 in da35702
Testing Instructions
Screenshots
Use of AI Tools
No AI Tools used.