-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Skip render when home page is closing or redirecting #9012
Skip render when home page is closing or redirecting #9012
Conversation
This depends upon #9011 |
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.
This is great! Does it work as intended with multiple queued permissions requests as well?
Yep! It handles multiple permission requests and confirmations perfectly. Unfortunately it's broken in another way though; the "closing/redirecting" states are set on update, but the actual closing/redirecting only happens on mount. I'm updating it now to ensure the states are only set before mount. Edit: ^ This has now been fixed. |
08a6869
to
58dddc1
Compare
The Home page component is responsible for closing the notification window and triggering redirects in various situations. When this happens, the home page is briefly rendered before the redirect/close happens. This is a waste of cycles, and is distracting for users. We now render nothing if the page is in the process of redirecting or reloading. None of the redirects handled in this component are for sub- pages, so we don't need the Home page to render in any of these cases. We were already doing this for redirects to transaction confirmations, but now we're taking the same approach for all redirects, and for the cases where the window is closed.
58dddc1
to
6f30472
Compare
Builds ready [6f30472]
Page Load Metrics (769 ± 62 ms)
|
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!
The Home page component is responsible for closing the notification window and triggering redirects in various situations. When this happens, the home page is briefly rendered before the redirect/close happens. This is a waste of cycles, and is distracting for users.
We now render nothing if the page is in the process of redirecting or reloading. None of the redirects handled in this component are for sub-pages, so we don't need the Home page to render in any of these cases.
We were already doing this for redirects to transaction confirmations, but now we're taking the same approach for all redirects, and for the cases where the window is closed.