-
Notifications
You must be signed in to change notification settings - Fork 22
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
refactor: migrate invite link to new router #996
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/react-query-route-loaders #996 +/- ##
==================================================================
- Coverage 84.30% 84.26% -0.04%
==================================================================
Files 364 364
Lines 7825 7813 -12
Branches 1913 1909 -4
==================================================================
- Hits 6597 6584 -13
- Misses 1185 1186 +1
Partials 43 43 ☔ View full report in Codecov by Sentry. |
8b2f253
to
54b38f2
Compare
54b38f2
to
4e6e2da
Compare
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.
I had to ramp up on react router to understand any of this, and got a bit confused until I realized this PR wasn't targeting master, but overall seems legit. Sorry I don't have much else to add, without spending a bunch more time on it.
It seems like the core change here is moving the universal link auth/redirect logic into a special react router callback instead of keeping it embedded it in the component itself? I'm guessing this allows rendering of the component to be completely bypassed in most cases, and there's some sort of performance benefit?
a825648
into
feat/react-query-route-loaders
@pwnage101 Yeah, at a super high-level, the work of the feature branch is to switch the existing paradigm of "render then fetch" to a "fetch then render" paradigm instead, where data is resolved from APIs before displaying a route, instead of after, effectively eliminating the majority of loading spinners/skeleton states in favor of a YouTube-esque progress bar across the top of the UI. Previously, we had many request waterfalls where certain groups of API calls weren't made until other groups of API calls further up the component tree were resolved, even when there's no dependent data between the API calls. With the migration to route loaders and React Query, all API calls are made in parallel (for the most part) and stored in the client-side query cache for 20 seconds, eliminating the need to make the same API call(s) for data we already have in many places when navigating between page routes. In the case of the invite link specifically, you're correct the component associated with the route will not be displayed if the invite link API call was successful; if it errors, the route loader resolves to |
Description
https://2u-internal.atlassian.net/browse/ENT-8479
EnterpriseInvitePage
.For all changes
Only if submitting a visual change