-
Notifications
You must be signed in to change notification settings - Fork 86
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: add keyless backup into onboarding flow #5591
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5591 +/- ##
==========================================
+ Coverage 86.72% 86.73% +0.01%
==========================================
Files 773 774 +1
Lines 31567 31626 +59
Branches 5456 5182 -274
==========================================
+ Hits 27375 27430 +55
- Misses 3963 4151 +188
+ Partials 229 45 -184
... and 76 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
# Conflicts: # src/keylessBackup/SignInWithEmail.test.tsx # src/keylessBackup/SignInWithEmail.tsx
typeof title === 'string' ? <Text style={headerStyles.headerTitle}>{title}</Text> : title | ||
function CustomHeader({ left, right, title, style, subTitle }: Props) { | ||
const titleComponent = subTitle ? ( | ||
<HeaderTitleWithSubtitle title={title} subTitle={subTitle} /> |
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.
do we need the extra subtitle
option here? Instead can the consumers just pass <HeaderTitleWithSubtitle title={title} subTitle={subTitle} />
, since title already accepts ReactNode
as a prop?
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.
const onboardingProps = useSelector(onboardingPropsSelector) | ||
const { step, totalSteps } = getOnboardingStepValues(Screens.ProtectWallet, onboardingProps) | ||
// Use a lower step count for CAB onboarding |
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 does "lower" mean here?
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.
It's similar to what was done in here where we use a different screen to have a consistent step count.
const onPressContinue = () => { | ||
ValoraAnalytics.track(KeylessBackupEvents.cab_setup_recovery_phrase) | ||
bottomSheetRef.current?.close() | ||
goToNextOnboardingScreen({ | ||
firstScreenInCurrentStep: Screens.SignInWithEmail, | ||
onboardingProps: { ...onboardingProps, showRecoveryPhraseEducation: true }, | ||
}) | ||
} | ||
|
||
const onPressSkip = () => { | ||
ValoraAnalytics.track(KeylessBackupEvents.cab_sign_in_with_email_screen_skip, { | ||
keylessBackupFlow, | ||
origin, | ||
}) | ||
goToNextOnboardingScreen({ | ||
firstScreenInCurrentStep: Screens.SignInWithEmail, | ||
onboardingProps, | ||
}) | ||
} |
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.
nit: move this to the bottom sheet componet since its only used there?
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.
Changed in 685f385!
finishOnboarding(Screens.ChooseYourAdventure) | ||
} else { | ||
// DO NOT CLEAR NAVIGATION STACK HERE - breaks restore flow on initial app open in native-stack v6 | ||
navigate(Screens.VerificationStartScreen) |
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.
In the videos, looks like after backup is successful, the flow navigates to home directly, is that expected? Per this, looks like it should go to phone verification / CYA?
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 is fixed in #5611.
forwardedRef={bottomSheetRef} | ||
title={t('signInWithEmail.bottomSheet.title')} | ||
titleStyle={styles.bottomSheetTitle} | ||
testId="KeylessBackupSignInWithEmail/HelpInfoBottomSheet" |
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.
nit: this is not help info right? could use a better name.
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.
Fixed in 0320f30!
@@ -124,8 +245,15 @@ const styles = StyleSheet.create({ | |||
scrollContainer: { | |||
padding: Spacing.Thick24, | |||
}, | |||
header: { | |||
paddingHorizontal: variables.contentPadding, |
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 is 16 right? seems like the scroll container uses 24, should this be consistent?
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 tried to be consistent with headers in the previous screens which appear to be 16.
src/onboarding/steps.ts
Outdated
if (showRecoveryPhraseEducation) { | ||
navigate(Screens.AccountKeyEducation, { | ||
origin: 'cabOnboarding', | ||
}) |
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 think we should remove this case and directly navigate to this screen from SignInWithEmail. Otherwise there is an edge case where our step counter fn could crash when it walks thru graph since AccountKeyEducation
does not have a next step. Although practically this may never happen since showRecoveryPhraseEducation
will be false
, but anyways good to keep this clean.
goToNextOnboardingScreen({ | ||
firstScreenInCurrentStep: Screens.SignInWithEmail, | ||
onboardingProps: { ...onboardingProps, showRecoveryPhraseEducation: true }, | ||
}) |
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.
per comment in steps, this can just navigate directly
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.
Fixed in 0385484!
Description
Adds the keyless backup flow into onboarding with a redesigned
SignInWithEmail.tsx
screen specifically for onboarding. Note the onboarding background colors are fixed in #5592 and the below videos use a throwaway number and seed phrase.Screen.Recording.2024-07-01.at.5.09.36.PM.mov
Screen.Recording.2024-07-01.at.4.41.22.PM.mov
Screen.Recording.2024-07-01.at.4.42.31.PM.mov
Screen.Recording.2024-07-02.at.5.24.17.PM.mov
Screen.Recording.2024-07-02.at.5.16.34.PM.mov
Screen.Recording.2024-07-02.at.5.18.15.PM.mov
Test plan
Related issues
Backwards compatibility
Yes
Network scalability
N/A