-
Notifications
You must be signed in to change notification settings - Fork 683
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
Lazy Load AuthModal #1955
Lazy Load AuthModal #1955
Conversation
|
@dani97 This seems like too granular of a place for dynamic imports. Can you post a short screen capture session showing us how quickly this responds to user input? It might be that we want to combine all those possible AuthModal screens into a single dynamic chunk, rather than separate ones. |
Can you confirm that all three of these new dynamic imports are combining into a single chunk? If chunks get too small, then the overhead of Webpack boilerplate starts to be too much. Don't get me wrong, I appreciate the contribution! I just need to be sure that we benefit from asynchronous imports at this level of granularity. |
|
Seems like login -> forgot password -> create account is a common enough use case. I'd worry about bad network latency in those very bounce-prone workflows. Did you try changing the place where AuthModal is important to be a dynamic import, rather than changing all of its downstream dependencies? |
|
@zetlen Do you recall how we had to change |
@jimbo I don't know; we'd need a test case to be sure. That bug with |
eec4735
to
d4b3236
Compare
PR updated to show what this would look like.
Unit tests updated in 234ae42. |
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.
Great job and amazing effort on the talon tests.
@dani97 @supernova-at Can you please resolve the conflict? |
Description
The
AuthModal
component can be lazy loaded, as guest users may never use it.This saves us ~6.5 KB on initial load of the application.
Related Issue
Closes PWA-113.
Acceptance
@zetlen
Verification Stakeholders
Specification
Verification Steps
yarn watch:venia
AuthModal
chunk)AuthModal
chunk loads and the app works as expectedYou can also verify that the loading spinner appears by artificially slowing the network speed in the Network tab before clicking the Sign In button.
Screenshots / Screen Captures (if appropriate)
Checklist