Skip to content
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

Patterns: Remove pattern category as a variation for post terms block #54532

Merged

Conversation

glendaviesnz
Copy link
Contributor

@glendaviesnz glendaviesnz commented Sep 18, 2023

What?

Remove pattern category as a variation for post terms block.

Why?

There is no use case for allowing this as a variation and it will likely just cause confusion.
Fixes: #54524

How?

Returns early from the loop that adds variations if the taxonony name === wp_pattern_category

Testing Instructions

  • Create a new post or page.
  • In the canvas, start typing /cat: Confirm that pattern categories do not show up as a shortcut.
  • Insert a categories block.
  • In the block sidebar, confirm that "Transform to variation" does not include pattern categories.

Screenshots or screencast

Before:

Screenshot 2023-09-18 at 1 45 51 PM

After:

Screenshot 2023-09-18 at 1 43 24 PM

@glendaviesnz glendaviesnz added [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Block] Post Terms Affects the Post Terms Block Needs PHP backport Needs PHP backport to Core labels Sep 18, 2023
@glendaviesnz glendaviesnz self-assigned this Sep 18, 2023
@github-actions
Copy link

Flaky tests detected in 545941f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6217264063
📝 Reported issues:

@glendaviesnz glendaviesnz added the [Type] Bug An existing feature does not function as intended label Sep 18, 2023
@kevin940726
Copy link
Member

In the canvas, start typing /cat: Confirm that pattern categories show up as a shortcut.

Should this be NOT show up?

Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

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

Nice one!

  • /cat doesn't show the "Pattern categories" block
    image

  • The transform variations don't include the "Pattern categories" block
    image

@glendaviesnz
Copy link
Contributor Author

In the canvas, start typing /cat: Confirm that pattern categories show up as a shortcut.

Should this be NOT show up?

yeh, thanks, have updated the description for future reference.

@glendaviesnz glendaviesnz merged commit cef6d46 into trunk Sep 18, 2023
50 checks passed
@glendaviesnz glendaviesnz deleted the update/post-terms-remove-pattern-category-variation branch September 18, 2023 05:27
@github-actions github-actions bot added this to the Gutenberg 16.7 milestone Sep 18, 2023
@mikachan
Copy link
Member

mikachan commented Oct 9, 2023

👋 I'm running through some PRs that have the Needs PHP backport label. As this change is in the Block Library package, does this still need a PHP backport to Core, or will it be included in the package updates?

@hellofromtonya
Copy link
Contributor

👋 I'm running through some PRs that have the Needs PHP backport label. As this change is in the Block Library package, does this still need a PHP backport to Core, or will it be included in the package updates?

👋 @mikachan, the PHP changes seem to be in packages. You're right, these changes will come to Core as part of the package update.

@mikachan mikachan removed the Needs PHP backport Needs PHP backport to Core label Oct 9, 2023
@mikachan
Copy link
Member

mikachan commented Oct 9, 2023

Thanks @hellofromtonya, I've removed the backport label!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Terms Affects the Post Terms Block [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Pattern categories" taxonomy is available as a Categories block variation
4 participants