Skip to content

Fix(Pattern): Custom category in site editor does not display pattern actions#77251

Merged
t-hamano merged 1 commit intoWordPress:trunkfrom
yogeshbhutkar:fix/update-pattern-action-prop
Apr 13, 2026
Merged

Fix(Pattern): Custom category in site editor does not display pattern actions#77251
t-hamano merged 1 commit intoWordPress:trunkfrom
yogeshbhutkar:fix/update-pattern-action-prop

Conversation

@yogeshbhutkar
Copy link
Copy Markdown
Contributor

@yogeshbhutkar yogeshbhutkar commented Apr 12, 2026

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:

export default function PatternsActions( { categoryId, type } ) {

Testing Instructions

  1. Navigate to Site Editor → Patterns
  2. Create a new pattern with a custom category
  3. Navigate to the custom category
  4. Observe that the options to rename/delete the custom category are available

Screenshots

Before After
bug after

Use of AI Tools

No AI Tools used.

@github-actions github-actions bot added the [Package] Edit Site /packages/edit-site label Apr 12, 2026
@yogeshbhutkar yogeshbhutkar self-assigned this Apr 12, 2026
@yogeshbhutkar yogeshbhutkar added [Type] Bug An existing feature does not function as intended [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Apr 12, 2026
@yogeshbhutkar yogeshbhutkar requested a review from Copilot April 12, 2026 07:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 PatternsActions usage to pass type instead of postType, ensuring the component can detect PATTERN_TYPES.user and render category actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yogeshbhutkar yogeshbhutkar changed the title Pattern: Custom Pattern Category in Site Editor Does Not Display Pattern Actions Pattern: Custom pattern category in site editor does not display pattern actions Apr 12, 2026
@yogeshbhutkar yogeshbhutkar changed the title Pattern: Custom pattern category in site editor does not display pattern actions Fix(Pattern): Custom category in site editor does not display pattern actions Apr 12, 2026
@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review April 12, 2026 08:13
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 12, 2026

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@yogeshbhutkar yogeshbhutkar requested a review from t-hamano April 13, 2026 03:54
Copy link
Copy Markdown
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! I recall working on #74927, but perhaps the fix wasn't appropriate. This issue should have been present in 6.9 as well, and since this fix is important, let's backport it to 7.0.

@t-hamano t-hamano added Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta props-bot Manually triggers Props Bot to ensure the list of props is up to date. and removed Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Apr 13, 2026
@github-actions github-actions bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Apr 13, 2026
@t-hamano t-hamano added the Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Apr 13, 2026
@t-hamano t-hamano merged commit ec29d51 into WordPress:trunk Apr 13, 2026
74 checks passed
@github-actions github-actions bot added this to the Gutenberg 23.0 milestone Apr 13, 2026
@github-actions github-actions bot removed the Backport to WP 7.0 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Apr 13, 2026
gutenbergplugin pushed a commit that referenced this pull request Apr 13, 2026
Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
@github-actions github-actions bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Apr 13, 2026
@github-actions
Copy link
Copy Markdown

I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: d172c3d

@yogeshbhutkar yogeshbhutkar deleted the fix/update-pattern-action-prop branch April 13, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Package] Edit Site /packages/edit-site [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patterns: Custom Pattern Category in Site Editor Does Not Display Pattern Actions

3 participants