-
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
Migrating PatternTransformationsMenu
#56122
Migrating PatternTransformationsMenu
#56122
Conversation
- Removes `__unstableComposite` imports from `@wordpress/components` - Adds private `Composite*` exports from `@wordpress/components` - Refactors `BlockPatternsList` and `BlockPattern` to use updated `Composite` components
Size Change: -624 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
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.
LGTM 🚀
Only left a comment, we can merge once that's addressed.
@@ -106,7 +110,6 @@ function BlockPattern( { pattern, onSelect, composite } ) { | |||
<CompositeItem | |||
role="option" | |||
as="div" |
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 can see a console warning related to the as
prop being deprecated, we should use the render
prop instead.
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.
Good catch – it's a shame this isn't picked up by a linter somewhere.
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
This PR was missing a proper |
What?
This PR updates
PatternTransformationsMenu
in@wordpress/block-editor
to use the updatedComposite
implementation from #54225.Why?
In #54225, an updated implementation of
Composite
was added to@wordpress/components
. As per #55224, all consumers ofComposite
need to migrate from the old version to the new version.How?
__unstableComposite
imports from@wordpress/components
Composite*
exports from@wordpress/components
BlockPatternsList
andBlockPattern
to use updatedComposite
componentsTesting Instructions
Before and after
Testing Instructions for Keyboard