-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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]: Support the blockTypes
prop for patterns fetched from Pattern Directory
#47677
[Patterns]: Support the blockTypes
prop for patterns fetched from Pattern Directory
#47677
Conversation
…attern Directory
Flaky tests detected in 3e2d823. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4073154985
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature with the transform works well.
I am unable to review the test.
In gutenberg_load_remote_block_patterns the viewport_width setting seems unrelated to enabling block types -but I don't see a reason to remove it if it speeds things up.
Yes, it is, but it was caught from @ryelle and I think it's land this too. |
unset( $settings['block_types'] ); | ||
} | ||
|
||
if ( isset( $settings['viewport_width'] ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This setting is not directly related to the main block_types
change, but it's okay fix this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few minor notes, but the fix works as expected. PHPUnit tests are passing locally as well ✅
9ffb359
to
06f6b16
Compare
Thank you, Nik. Updates look good 🚢 |
…attern Directory (#47677) * [Patterns]: Support the `blockTypes` prop for patterns fetched from Pattern Directory * update all remote calls * get registry once
I just cherry-picked this PR to the release/15.1 branch to get it included in the next release: f0c0581 |
What?
This PR adds support for the
blockTypes
propThe changes here are from this PR: #32113 and is just here to move things faster in order to land this for 6.2.
props @ryelle 🙇
Without this change, the patterns fetched from Pattern Directory wouldn't use this prop when they were registered. This become more obvious with this issue for adding more Query Loop patterns and it affects the
header, footer
patterns that are now fetched from Pattern Directory here: #46017Also noting that the added patterns from #46017, seem to still don't have the
blockTypes
prop in PD and they would need to be updated to include this.Before
Screen.Recording.2023-02-02.at.11.35.59.AM.mov
After
Screen.Recording.2023-02-02.at.11.36.55.AM.mov
Testing Instructions