Skip to content
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

[C-3255] Sub-route logic & redirects for sign up flow #6489

Merged
merged 13 commits into from
Oct 28, 2023

Conversation

DejayJD
Copy link
Contributor

@DejayJD DejayJD commented Oct 27, 2023

Description

  • Adds static sub-routes for all the sign up flow pages.
  • Put the root sign up route behind the SignUpRoute wrapper to handle redirecting the user accordingly
  • Updated the email page to pull in email field values if set already

https://www.loom.com/share/d7a2bed74bcf4170818ca6dee9c024da

How Has This Been Tested?

Locally navigating through the routes & trying to get to weird route states 👍
Tested the existing flow still works when flag is off (/signup goes to old flow and /signup/{subroute} just 404s)
Would appreciate a second pair of 👀 on that to make sure I didn't miss something

@@ -514,11 +516,20 @@ class App extends Component {
</Route>
<Route exact path={SIGN_UP_PAGE} isMobile={isMobileClient}>
{isSignInRedesignEnabled ? (
<SignUpRootPage />
<Redirect to={SIGN_UP_START_PAGE} />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeps all the links the same (i.e. /signup will redirect to /signup/create-account)

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/jd/sign-up-sub-routes

@DejayJD DejayJD requested review from dylanjeffers and amendelsohn and removed request for dylanjeffers October 27, 2023 18:28
…jd/sign-up-sub-routes

# Conflicts:
#	packages/web/src/components/stripe-on-ramp-modal/StripeOnRampModal.tsx
#	packages/web/src/pages/sign-up-page/SignUpRootPage.tsx
#	packages/web/src/pages/sign-up-page/pages/CreatePasswordPage.tsx
#	packages/web/src/pages/sign-up-page/pages/SignUpPage.tsx
@DejayJD DejayJD marked this pull request as ready for review October 27, 2023 21:06
@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/jd/sign-up-sub-routes

@DejayJD DejayJD changed the title DRAFT: Sub-route logic for sign up pages [C-3255] Sub-route logic & redirects for sign up flow Oct 27, 2023
Copy link
Contributor

@dylanjeffers dylanjeffers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks very nice!

) : null}
{signUpState.stage === 'app-cta' ? <AppCtaPage /> : null}
<Switch>
<Route exact path={SIGN_UP_EMAIL_PAGE}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my expectations was that this would be the "SignupRoute" and each one would check if they are allowed to render, and if not, redirect? i think its probably fine to do this all in a root route like you did though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah either way works technically.
I had moved it to the root since all the routes are using it; so I was thinking of it as a small possible optimization.
However, I moved it down to each route and don't see any difference so I think any real optimization is probably super negligible 🤷
Thinking about both I think I agree with you that wrapped around each route is probably a bit more readable since the logic is colocated so I'll keep it on the individual routes 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I guess since we're probably rearranging it anyways, the individual wrappers makes it simpler to move around

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/jd/sign-up-sub-routes

return isAllowedRoute ? (
<>{children}</>
) : (
<Redirect to={correctedRoute} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, very nice

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/jd/sign-up-sub-routes

@DejayJD DejayJD merged commit 38ac1b7 into main Oct 28, 2023
2 checks passed
@DejayJD DejayJD deleted the jd/sign-up-sub-routes branch October 28, 2023 00:30
audius-infra pushed a commit that referenced this pull request Oct 28, 2023
[38ac1b7] [C-3255] Sub-route logic & redirects for sign up flow (#6489) JD Francis
[815df8b] [PAY-2090] Manual USDC Transfer Mobile UI (#6494) Reed
[4fdd2dd] [C-3283] Improve harmony bundle (#6493) Dylan Jeffers
[ca6e15e] [C-3261] Add mobile web signin UI (#6490) Andrew Mendelsohn
[924c027] Add personal counts to DN aggregate routes metrics (#6484) Michelle Brier
[1fc8456] [C-3271] Implement new sign up flow email page (desktop web) (#6464) JD Francis
[4262e71] [PAY-1708] Update ToS/Learn More/early access links (#6491) Raymond Jacobson
[157d8b7] [PAY-2043] Stop preview when purchase succeeds (#6472) Raymond Jacobson
[e6027ff] [PROTO-1357] Add health UI and redirect root to it (#6482) Theo Ilie
[a78356f] Filter out 0-amount challenges (#6488) Reed
[086aa20] [PAY-2089] Add analytics events for users opening rewards claim modal (#6486) Randy Schott
[f848217] Update iOS purchase unavailable copy (#6487) Reed
[10997b6] [PAY-2013] Send event when purchase TOS clicked (#6485) Randy Schott
[e176fec] Bump version to 0.5.4 audius-infra
[b6da96f] Fix cooldown schedule (#6480) Reed
[2bd883d] [Proposal] Add media query hook (#6469) Andrew Mendelsohn
[42819cd] Hide ToS when purchase is in progress (#6479) Reed
[e5de495] [PAY-1943] Separate feature flag for IOS USDC Purchase (#6478) Reed
[7fab506] [PAY-2014] Add detailed purchase flow analytics (#6477) Randy Schott
[3f1459c] Implement SocialButton in Harmony (#6473) JD Francis
[a8fe47b] [PAY-2052] Disabled TOS while purchase in progress (#6476) Reed
[7d51cfe] Use self-hosted runners for pushing images (#6467) Danny
[260cd05] Harmony Text Input tweaks (design requests) (#6474) JD Francis
[97cdcda] [PAY-2076][PAY-2075][PAY-2073][PAY-2026][PAY-2072][PAY-2074] Address landing page QA (#6459) Raymond Jacobson
[7a222b4] [PAY-1986] Lock wallet address during stripe session creation (#6471) Randy Schott
[0a5e0c0] [PAY-2051] Show preview UI when playing your own preview (#6468) Raymond Jacobson
[76b14ce] [PAY-2041] Connect stripe session creation errors to analytics (#6465) Randy Schott
[28a4800] Bump version to 0.5.3 audius-infra
[3a176a2] Add fallbacks to SDK upload (#5970) Theo Ilie
[2c71673] [C-2892 C-3253 C-3254] Add harmony-native typography (#6457) Dylan Jeffers
[a9bae99] Add stylelint to harmony (#6456) Dylan Jeffers
[084127a] chore: Fix chromatic args not being passed thru (#6466) JD Francis
[75e517d] [C-3263] Add asChild to harmony Button (#6460) Dylan Jeffers
[2add6e8] [PAY-2064] Fix misc mobile access & sale ui (#6463) Raymond Jacobson
[7c58442] Update local stack postgres version (#6462) Raymond Jacobson
[f6906d3] [PAY-2041] Return extended error information when stripe session creation fails (#6461) Randy Schott
[f134b28] [PAY-1972] Filter out spammy accounts from explore premium tracks page (#6452) Reed
[424d798] de-partition ops table (#6458) Steve Perkins
[33604f8] Bump version to 0.5.2 audius-infra
[fcd7dbd] [PAY-2032] Clean up userbank analytics events (#6450) Randy Schott
[45a1509] [PAY-2015] Add USDC upload/edit analytics (#6449) Randy Schott
[3482fe3] [C-3260, C-3236] Layout for SignIn page (web) (#6440) Andrew Mendelsohn
[b81d1a2] [C-3266] Partially fix upload probers (#6451) Andrew Mendelsohn
[4da1f79] Move psuedoselectors into class definition (#6455) Dylan Jeffers
[049947d] Fix governance proposal release script (#6454) Raymond Jacobson
[b195766] [C-3267] Use css color mixing instead of overlay/margin hack (#6453) Andrew Mendelsohn
[f441b2d] [PAY-1998] Hide feed tip tile when USDC purchases is on (#6434) Raymond Jacobson
[d5b7c69] [PROTO-1375] Proto dash QoL (modernization + bug fixes + performance) (#6442) Theo Ilie
[de11917] Delete patch-release workflow (#6448) Theo Ilie
[553bdce] [PAY-1962] Disable selectable pills during purchase (#6435) Reed
[fb7f05b] Fix triggering patch-release workflow (#6447) Theo Ilie
[fdcddf0] Fix cooldown summary table (#6445) Reed
[d790864] Fix $AUDIO purchase (#6446) Raymond Jacobson
[95792bc] Fix notifications (#6444) Raymond Jacobson
[63d3c7f] refactor: Tweak Harmony button API (#6430) JD Francis
[f03b0c0] [PAY-2063] Fix border colors (#6437) Raymond Jacobson
[fbebfe4] Bump version to 0.5.1 audius-infra
[a4047bd] Add Harmony completion check C-3246 (#6414) nicoback2
[58768e1] [PAY-2061] Hide table if no challenges summary (#6438) Raymond Jacobson
[fdc4989] Add CI workflow to patch a SHA outside of release (#6439) Theo Ilie
[02d767a] Filter out usdc create notifs from endpoint (#6436) Raymond Jacobson
[fe53cfc] [C-3196] Add testing-library to harmony and harmony-native (#6432) Dylan Jeffers
[4d9a7a5] Push dashboard in release workflow (#6433) Michelle Brier
[25c7403] Fix jupiter buy-audio flow (#6429) Raymond Jacobson
[25aec8b] Fix setup-dev.sh for users without .bashrc (#6428) Dylan Jeffers
[f30664e] SummaryTable don't gray out last row if no SummaryItem (#6427) Reed
[abbe592] Upgrade to 0.5.0 (#6426) Raymond Jacobson
[428ba1a] [PAY-2012] Add analytics for purchase start/success/failure (#6425) Randy Schott
[8dc22a7] Fix failing root npm install (#6424) Theo Ilie
[8e2ed73] [C-3235] Fix rotating cover art (#6379) Dylan Jeffers
[56f2217] Bump version to 0.4.39 audius-infra
[8afa18c] [PAY-2045] Wire up content price and purchase limits (#6417) Randy Schott
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants