Skip to content

Patterns API: Add 'inserter' to the schema - #40416

Merged
Mamaduka merged 2 commits into
trunkfrom
fix/patterns-api-inserter-schema
Apr 18, 2022
Merged

Mamaduka merged 2 commits into
trunkfrom
fix/patterns-api-inserter-schema

Conversation

@Mamaduka

Copy link
Copy Markdown
Member

What?

Fixes #40414.

PR adds the missing inserter field to the Patterns item schema.

Why?

Currently, this field is omitted from the response, and patterns that should be hidden in the inserter are visible.

Testing Instructions

  1. Activate the TT2 theme.
  2. Open a post editor.
  3. Open the Pattern Explorer.
  4. Confirm that the "Uncategorized" section isn't visible.

@Mamaduka Mamaduka self-assigned this Apr 18, 2022
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended Core REST API Task Task for Core REST API efforts [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Apr 18, 2022
@Mamaduka
Mamaduka requested review from jsnajdr and ndiego April 18, 2022 13:14
@ndiego

ndiego commented Apr 18, 2022

Copy link
Copy Markdown
Member

Thanks for this @Mamaduka! This PR fixes the root issue, both for patterns registered via JS and PHP in the /patterns folder. I have approved assuming any relevant failed tests are resolved. The two that are currently failing appear unrelated.

@ndiego

ndiego commented Apr 18, 2022

Copy link
Copy Markdown
Member

@Mamaduka, once merged, let's add the backport tag. This should get in 6.0.

@Mamaduka

Copy link
Copy Markdown
Member Author

Thanks, @ndiego. I think those are flaky tests.

@Mamaduka
Mamaduka force-pushed the fix/patterns-api-inserter-schema branch from 8db2271 to c3a085c Compare April 18, 2022 14:32
@Mamaduka
Mamaduka merged commit fad579f into trunk Apr 18, 2022
@Mamaduka
Mamaduka deleted the fix/patterns-api-inserter-schema branch April 18, 2022 15:28
@github-actions github-actions Bot added this to the Gutenberg 13.1 milestone Apr 18, 2022
@Mamaduka

Copy link
Copy Markdown
Member Author

@adamziel, @gziolo, here's WP core PR - WordPress/wordpress-develop#2600.

@gziolo

gziolo commented Apr 19, 2022

Copy link
Copy Markdown
Member

@adamziel, @gziolo, here's WP core PR - WordPress/wordpress-develop#2600.

Actually, there is nothing to do about this PR in the context of WordPress core. Let's add the linked PR in core to the project.

pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Apr 19, 2022
Backports changes from WordPress/gutenberg#40416. Adds the missing `inserter` field to the Patterns item schema. This field was omitted from the response, and patterns that should be hidden in the inserter were visible.

Props mamaduka, ndiego.
See #55567.
Follow-up [53152].




git-svn-id: https://develop.svn.wordpress.org/trunk@53210 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Apr 19, 2022
Backports changes from WordPress/gutenberg#40416. Adds the missing `inserter` field to the Patterns item schema. This field was omitted from the response, and patterns that should be hidden in the inserter were visible.

Props mamaduka, ndiego.
See #55567.
Follow-up [53152].



Built from https://develop.svn.wordpress.org/trunk@53210


git-svn-id: http://core.svn.wordpress.org/trunk@52799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions Bot pushed a commit to gilzow/wordpress-performance that referenced this pull request Apr 19, 2022
Backports changes from WordPress/gutenberg#40416. Adds the missing `inserter` field to the Patterns item schema. This field was omitted from the response, and patterns that should be hidden in the inserter were visible.

Props mamaduka, ndiego.
See #55567.
Follow-up [53152].



Built from https://develop.svn.wordpress.org/trunk@53210


git-svn-id: https://core.svn.wordpress.org/trunk@52799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core REST API Task Task for Core REST API efforts [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

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

Patterns with Inserter: false are visible in Inserter with Gutenberg 13.0

3 participants