-
Notifications
You must be signed in to change notification settings - Fork 242
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
feat: uniform post page login #4046
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
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.
For me looks ok like this :)
Maybe just wait for 1 more review.
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.
When I click on Login or Signup while I'm browsing the public feeds, or on a post page, I am not able to navigate back in my history, it sends me back to onboarding page.
And it would be nice to show the login form after I click on login button, so that I don't have to click on it again
I'm not so sure if the login leading to the registration form is a good idea. That button is present a lot of places where the banner is not, so taking them straight to registration may give the impression that registering by email/password is the only way. I'll have a look at the navigation |
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, have some minor comments.
Not sure of all of the cases that should be tested with this flow, if they are specified I can try testing e2e as well.
const params = new URLSearchParams(globalThis?.location.search); | ||
const triggerParam = params.get('authTrigger'); | ||
if (loginState && loginState?.trigger !== triggerParam) { | ||
if (!params.get('afterAuth')) { | ||
params.set('afterAuth', window.location.pathname); | ||
} | ||
params.set('authTrigger', loginState.trigger); | ||
router.push(`/onboarding?${params.toString()}`); |
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 repeats quite a few times so maybe extract it in helper? Non blocking
Since we deleted the authModal completely and always redirect to onboarding now, I figured refactoring the showLogin would be a better option. I think all the above comments should be solved now. I did some E2E testing myself and everything seems OK, but please do check it yourselves @capJavert and @omBratteng, the more the merrier :) |
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.
Login works and redirects me to origin, but unable to test email signup because of turnstile blocking me I think 😬
Changes
This task is named "uniform post page login", but the changes here affect more than just post page as I directly modified the "LoginButton" that is used both in the CustomAuthBanner (mobile banner) and Navbar.
Chris mentions here that only login flow should be inside /onboarding to be able to leverage all onboarding steps. So unless we want the Navbar to pop the modal on other pages than /posts/, I say we keep it this way
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://mi-696.preview.app.daily.dev