-
Notifications
You must be signed in to change notification settings - Fork 245
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
fix: onboarding ready condition and missing deps #4153
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -33,7 +33,7 @@ export const useOnboarding = (): UseOnboarding => { | |||
|
|||
return { | |||
shouldShowAuthBanner, | |||
isOnboardingReady: isActionsFetched && isAuthReady, | |||
isOnboardingReady: isAuthReady && (isActionsFetched || !user), |
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.
What's the issue here I missed it maybe?
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.
There is an edge case where the loading state is there endlessly. One of the conditions is whether the returned value here is not yet true. The loading never stop since anonymous user would not have actions hence not yet fetched.
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.
Because of that, the event listeners are not rendered which is needed to process the callback page messages on login/sign up.
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. Had one question, but not blocking :)
Remember to do critical flow testing when publishing live
@@ -150,7 +150,6 @@ const seo: NextSeoProps = { | |||
}; | |||
|
|||
export function OnboardPage(): ReactElement { | |||
const params = new URLSearchParams(window.location.search); |
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.
Why move it and re-define it multiple places? 🤔
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.
So that it won't have to be a dependency on the memoized functions. Because if so, we will have to memoize this too since every render would create the object search param.
Also, they are used within those functions and not dependent on anything.
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.
Not blocking, but this def needs critical flow testing please 🙏
Tested the critical flows and worked as intended 🚀 |
Changes
isOnboardingReady
evaluation.Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Preview domain
https://revert-revert-condition.preview.app.daily.dev