-
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
Give nice unique names to block controls HOCs #55795
Conversation
Size Change: +39 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.
Nice! Thank you, @jsnajdr!
Just a heads up that this will probably conflict with #55762. Both PR modify the file with the |
Thanks for the heads up. It should be an easy merge conflict to resolve. |
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.
Nice one 🚀
6706503
to
7474029
Compare
But e2e tests are permanently failing. Maybe I really broke something. |
It's only Puppeteer e2e test and they seem to fail on trunk as well. |
Yep, after rebase the e2e's succeeded and the PR was auto-merged 👍 |
Fixes an aesthetic/devex issue where the HOCs that add block controls have undifferentiated names like
withToolbarControls
orwithInspectorControls
:This PR modifies the HOC names to be specific, like
withPositionControls
orwithAlignmentControls
. The HOCs that add styles and attributes (likewithPositionStyles
) already use a similar convention.I'm also unifying the names to consistently use plural (controls, not control) and unifying the convention for hook names (the
core/editor/...
prefix).The result looks like this in the React devtools:
How to test:
There should be no behavior change at all, we're just renaming variables, basically.