-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Cleanup clearBinding usage #72439
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
Cleanup clearBinding usage #72439
Conversation
| createBinding( updatedAttributes ); | ||
| } else { | ||
| clearBinding( updatedAttributes ); | ||
| clearBinding(); |
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.
Note that the usage of clearBinding in packages/block-library/src/navigation-link/shared/use-entity-binding.js does not accept any params
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.
There are a couple more in packages/block-library/src/navigation/edit/menu-inspector-controls.js and packages/block-library/src/navigation-submenu/edit.js. We could clean them up here, or in a followup
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 had already gotten packages/block-library/src/navigation-submenu/edit.js but missed packages/block-library/src/navigation/edit/menu-inspector-controls.js. Thanks for catching! Fixed it here.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -2 B (0%) Total Size: 2.08 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 6ed7d79. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18596761246
|
scruffian
left a comment
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 :)
What?
Follow-up to #72165
Cleans up the clearBinding usage. clearBinding doesn't accept any params, yet it was receiving them. Also, it had things in its useEffect dependency array that were not used.
Why?
Code quality
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast