-
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
Slot: use layout effect and update Cover block unit tests #68176
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: +3 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
Flaky tests detected in cf437e1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12433952853
|
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.
Makes sense. Thanks, @jsnajdr!
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.
Thanks a bunch @jsnajdr 🙌
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.
The Cover block tests were flaking very consistently for me when running locally, and now they're passing every time. Thank you!
3bcee0a
to
cf437e1
Compare
Spinoff from #68056. In the base
Slot
implementation, register the slot in a layout effect instead of a normal effect. Other parts of the slot/fill library also use layout effects. And it's a good idea to settle all the registration and rendering in layout effects: then the first actual paint will not paint empty slots when fills are already registered.Interestingly this breaks some Cover block unit tests, because of some subtle timing changes I don't understand. Turns out the block sidebar content is not update immediately when the block is selected, but a little bit later, and it's not caught by the RTL
render
function. The tests are easily fixed by changing some syncgetBy*
calls toawait findBy*
.