Uh oh!
There was an error while loading. Please reload this page.
[C-3271] Implement new sign up flow email page (desktop web) - #6464
Conversation
| @@ -0,0 +1,41 @@ | |||
| import { | |||
There was a problem hiding this comment.
This feels like we should promote this to Harmony or somewhere more reusable, would love some feedback here
There was a problem hiding this comment.
Yeah I would like to have this in Harmony. Feels like we should have a place for more specific usages that doesn't take up space in the top level docs. Maybe like components/button/samples or something like that?
There was a problem hiding this comment.
Yeah if we wanted to be "atomic" with it we could consider our base components our "atoms" and "pre-made extensions of our base components" our "molecules".
Idk the best term to name it tbh, maybe would also consider "extensions" or "composites/compounds" or something 🤔
There was a problem hiding this comment.
I kinda like the idea of separating "core" or "base" components from the "premade extensions" though
| } | ||
| export const CreatePasswordPage = (props: CreatePasswordPageProps) => { | ||
| const { params, onNext } = props |
There was a problem hiding this comment.
Will create some small some merge conflicts with Nikki's PR #6443 so I guess whoever merges last gets to deal with it 😜
@nicoback2
| @@ -0,0 +1,6 @@ | |||
| export const EMAIL_REGEX = | |||
There was a problem hiding this comment.
Converted to TS, also exported this regex to use directly
| } | ||
| className={styles.w100} | ||
| onChange={(e) => { | ||
| // Clear errors on user change (Formik doesn't have an out of the box way to do this for you) |
There was a problem hiding this comment.
I added this since Formik doesnt have anything for it by default
imo its a little nicer when the error state goes away when you're typing 🤷
There was a problem hiding this comment.
ah yeah i think we should create TextField component using new text-input, allows things to be much more declarative imo, should basically be a copy from existing TextField. Happy to pair on this to go over rationale.
There was a problem hiding this comment.
I added this while doing my page. Needs renaming and moving whenever we find a home for it.
| 'Join the revolution in music streaming! Discover, connect, and create on Audius.', | ||
| dividerText: 'Or, get started with one of your socials', | ||
| invalidEmail: 'Please enter a valid email.', | ||
| unknownError: 'Unknown error occurred.' |
There was a problem hiding this comment.
Note: need to check with design if they have a preferred messaging here.
I'm also assuming general network issues would be the only way to trigger this message?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| className={styles.w100} | ||
| onChange={(e) => { | ||
| // Clear errors on user change (Formik doesn't have an out of the box way to do this for you) |
There was a problem hiding this comment.
ah yeah i think we should create TextField component using new text-input, allows things to be much more declarative imo, should basically be a copy from existing TextField. Happy to pair on this to go over rationale.
Uh oh!
There was an error while loading. Please reload this page.
| {messages.signUp} | ||
| </Button> | ||
| <Text variant='body' size='l' tag='p' color='default'> |
There was a problem hiding this comment.
i think body defaults to p? and default color yeah? imo just applying what is necessary?
There was a problem hiding this comment.
Fair. I think I personally prefer being explicit but happy to uses defaults more 👍
Uh oh!
There was an error while loading. Please reload this page.
| const handleSubmit = useCallback( | ||
| const dispatch = useDispatch() | ||
| const navigate = useNavigateToPage() | ||
| const [checkEmailInUse, result] = useEmailInUse() |
There was a problem hiding this comment.
useIsEmailInUse? or too wordy?
There was a problem hiding this comment.
Yeah I was actually wondering a bit about general naming conventions with audius-query here as well.
I almost renamed this myself but I wasn't sure if it was best practice to leave them the same name as the backend method (in this case audiusBackend.emailInUse())
| (values: SignUpEmailValues) => { | ||
| const { email } = values | ||
| onNext({ stage: 'create-password', params: { email } }) | ||
| checkEmailInUse(email) |
There was a problem hiding this comment.
we should use the formik "isSubmitting here", and use that for the loading state on submit button, happy to pair on this.
There was a problem hiding this comment.
ultimately this should be considered a "form level validation", and so lets hook it up appropriately
| signIn: 'Sign In', | ||
| subHeader: | ||
| 'Join the revolution in music streaming! Discover, connect, and create on Audius.', | ||
| dividerText: 'Or, get started with one of your socials', |
There was a problem hiding this comment.
fine, but could we be descriptive like "socialsText"? cause it looks like a divider, but maybe be descriptive on what it actually is?
There was a problem hiding this comment.
thoughts on socialsDividerText for a bit of both? 🤔
amendelsohn
left a comment
There was a problem hiding this comment.
Looks fantastic! Great job 👍
Uh oh!
There was an error while loading. Please reload this page.
| return await audiusBackend.emailInUse(email) | ||
| }, | ||
| options: { | ||
| type: 'mutation' |
There was a problem hiding this comment.
is this a mutation? sounds like a read operation to me
There was a problem hiding this comment.
Yeah, I actually wasn't sure if this was the right approach either but I didn't see the non-mutations returning a method to manually trigger the api call? Wasn't sure if this was an intentional way to use mutation or not
There was a problem hiding this comment.
is it important to manually trigger the call? even for a normal query hook it should automatically get called any time the args value changes
if you do need to call it manually, we have thisexport const signUpApi = signUpApi.fetch
and elsewheresignUpApi.emailInUse(email)
| } | ||
| }) | ||
| export const { useEmailInUse } = signUpApi.hooks |
Uh oh!
There was an error while loading. Please reload this page.
| @@ -0,0 +1,41 @@ | |||
| import { | |||
| Button, | |||
| type ButtonProps, | |||
There was a problem hiding this comment.
did not know you could nest like this. neat!
Uh oh!
There was an error while loading. Please reload this page.
| </Formik> | ||
| <Text>{messages.haveAccount}</Text> | ||
| <Link to={SIGN_IN_PAGE}>{messages.signIn}</Link> | ||
| <form onSubmit={handleSubmit}> |
There was a problem hiding this comment.
reason we're not using formik for this?
I added a HarmonyTextField component that wraps harmony TextInput for use with formik if that's helpful
| autoFocus | ||
| autoComplete='email' |
There was a problem hiding this comment.
oh sweet. Stealing this for my page
Uh oh!
There was an error while loading. Please reload this page.
| </Text> | ||
| <Divider className={styles.flex1} /> | ||
| </Flex> | ||
| <Flex gap='s' w='100%' direction='row'> |
There was a problem hiding this comment.
nitpick, but I've been trying to use direction first. Probably a losing battle though 🤷
There was a problem hiding this comment.
I wonder if we could write a custom lint command? 🤔
dylanjeffers
left a comment
There was a problem hiding this comment.
preemptive approval for when you get all the stuff we talked about in, great job
audius-infra
commented
Oct 27, 2023
Preview this change https://demo.audius.co/jd/sign-up-email |
[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-2892C-3253C-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

Description
Figma Designs
https://www.loom.com/share/1dd6f0bc842e44c6b442bbb41c9ffe71
How Has This Been Tested?
Locally using stage. Tested with existing emails + invalid strings 👍