-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tooltip: render tooltip markup in the DOM only when open #54312
Conversation
I'm not entirely certain I'm interpreting the performance results accurately, but it seems this gets the job done! 👍🏽 It's worth mentioning that the |
Size Change: +2 B (0%) Total Size: 1.52 MB
ℹ️ View Unchanged
|
Flaky tests detected in 6f8310e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6130467057
|
For ease of reading: Performance check results from #48440 , where the regression was introduced
Latest performance check results from this PR (numbers are back to pre- #48440 levels)
|
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.
Looks good to me! Thanks for working on this @ciampo
Thanks for the fix here and the suggestion @diegohaz ❤️ |
* Button: Update test assertion to match test name * Restore replaced assertion for button * Update assertions after changes to tooltip in #54312
What?
As per #48440 (comment), PR #48440 introduced a regression in rendering performance.
This PR experiments with rendering the
Tooltip
dynamically, in case this can help improving the rendering performance again.How?
Using the
open
state from the Ariakit store to effectively render (or not) the tooltip in the DOM.Unit tests were updated as necessary to reflect the fact that, when the tooltip isn't "open", tooltip-related markup is not rendered in the DOM. Changes to unit tests are mostly un-doing changes from #48440, including the ones to
LinkControl
Testing Instructions