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: Theme patterns without Categories do not show in Library #52614

Closed
colorful-tones opened this issue Jul 13, 2023 · 1 comment · Fixed by #52633
Closed

Patterns: Theme patterns without Categories do not show in Library #52614

colorful-tones opened this issue Jul 13, 2023 · 1 comment · Fixed by #52633
Assignees
Labels
[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") [Type] Bug An existing feature does not function as intended

Comments

@colorful-tones
Copy link
Member

Description

Issue

Theme patterns without the Categories (in pattern header) do not appear at all in the new Library (WP 6.3 beta 4), but they still appear in the block editor inserter library.

Expectation

It should be consistent for uncategorized patterns. Either infer that they're uncategorized and show them anyway under 'Uncategorized' in both the Editor and the inserter, or do not show them at all in either.

Step-by-step reproduction instructions

WordPress Beta Tester Plugin (v 3.5.2) and WP 6.3 beta-4 installed. Twenty Twenty-Three (v1.1) theme activated. That is all.

  1. Launch Editor > Patterns, and choose 'Featured' category (/wp-admin/site-editor.php?path=%2Fpatterns&categoryType=pattern&categoryId=featured). Notice there is one pattern: "Call to action"
  2. Open Twenty Twenty-Three's patterns/call-to-action.php file and remove line 5: * Categories: featured and save the file.

Repeat step #1 (above) and note that the 'Featured' category is gone and the "Call to action" pattern can not be found under any other category in the Editor.

However, you can still create a new post and open the inserter library, switch to the Patterns tab, and still find the "Call to action" pattern even when it does not have the * Categories: featured. I've tested this issue with and without the latest Gutenberg plugin activated and there is no change in impact.

Screenshots, screen recording, code snippet

Before After (theme pattern has no Categories)
Screenshot 2023-07-13 at 3 43 11 PM Screenshot 2023-07-13 at 3 47 48 PM
Screenshot 2023-07-13 at 3 54 56 PM Screenshot 2023-07-13 at 3 55 24 PM

Environment info

  • WordPress 6.3 beta-4
  • WordPress Beta Tester Plugin (v 3.5.2)
  • Twenty Twenty-Three (v1.1)
  • Chrome 114.0.5735.198
  • macOS 13.4.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@colorful-tones colorful-tones added [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") labels Jul 13, 2023
@ndiego ndiego added the [Type] Bug An existing feature does not function as intended label Jul 13, 2023
@ndiego ndiego moved this to 📥 Todo in WordPress 6.3.x Editor Tasks Jul 13, 2023
@ndiego
Copy link
Member

ndiego commented Jul 13, 2023

Good catch, thanks @colorful-tones

@carolinan carolinan self-assigned this Jul 14, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 14, 2023
@ndiego ndiego moved this from 📥 Todo to 🏗️ In Progress in WordPress 6.3.x Editor Tasks Jul 14, 2023
@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to ✅ Done in WordPress 6.3.x Editor Tasks Jul 17, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[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") [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants