-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Don't use global 'select' in the Behaviors controls component #51028
Conversation
@@ -30,73 +90,28 @@ import merge from 'deepmerge'; | |||
*/ | |||
export const withBehaviors = createHigherOrderComponent( ( BlockEdit ) => { | |||
return ( props ) => { | |||
const blockEdit = <BlockEdit key="edit" { ...props } />; |
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 addressed @youknowriad's feedback from the original PR - ##49972 (comment).
Size Change: +49 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
c780e1c
to
ecdde43
Compare
Flaky tests detected in ecdde43. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5110283227
|
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.
Work as expected. Thanks!
Cherry picked for Gutenberg 15.9 RC2 |
What?
This is a follow-up to #49972.
PR refactors the Behaviors controls integration to avoid using the global
select
calls.Why?
Using global
select
is considered a bad pattern as it only works with the default registry, not custom registry providers.How?
PR extracts control into a separate component so that we can use the
useSelect
hook.Testing Instructions
Screenshots or screencast