Fix bindableAttributes only being returned for the selected block#74061
Conversation
|
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: -38 B (0%) Total Size: 2.58 MB
ℹ️ View Unchanged
|
|
I’m also concerned about perf regression. Let’s ping more folks working on block bindings. |
|
Flaky tests detected in 6f2a04d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/20294214680
|
|
Oh yep, I was going to check the perf results before adding more reviewers, but appreciate you adding them anyway. If this doesn't look good, another option would be to move bindings related context to a new provider that's separate to PrivateBlockContext, but let's see how it goes. |
|
The results look ok: The topToolbar test doesn't look great, but hard to say if it's a real issue. I can re-run a few times to see how it looks. |
|
Results from second run: I'll run one more time. |
cbravobernal
left a comment
There was a problem hiding this comment.
Codewise. LGTM. Let's see the performance results.
|
Third run of the perf tests: I think it looks ok, so I'll merge the PR, and will check codevitals results when I'm back online tomorrow. Thanks folks for helping me avoid a regression 😊 |
|
Thanks for the quick follow-up, @talldan! I agree, the CodeVitals site is better for tracking similar regressions. |
|
Not seeing any issues this morning 🎉 |
What?
Fixes a logic error mentioned here - #74029 (comment).
After that code change
bindableAttributeswould have only been return for the selected block due to the early return in theuseSelectbody.Why?
It looks like
bindingPlaceholderandbindingLabelneed thebindableAttributesfor unselected blocks.How?
Moves it to a different useSelect. The concern is that it may regress previous performance improvements mentioned here:
#74029 (comment)
Lets find out.
Testing Instructions
I'm not sure how to test this, logically it should fix the issue.