-
Notifications
You must be signed in to change notification settings - Fork 2k
Dashboard V2: Enable link preloading #103283
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
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~36 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
Do you think we should do that even if we could? A user could hover over many sites just by wanting to move the cursor somewhere else in the UI. |
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, thanks!
We could set a custom delay for these that have a bigger hit-area. |
Fixes DOTCOM-13061
Proposed Changes
Adds preloading to
Link
component. Check this page for details. The idea is that when a user hovers a link, we preload the loader of the target page before actually navigating to the page.This works well with regular links, the problem right now is that we can't make the same thing work for DataViews because of how DataViews renders the links, it just uses a regular
onClickHandler
instead of having a way to actually use links or "hook in" the router somehow.Testing Instructions