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

fix(onboarding): revert default of CPV screen to be in onboarding #4876

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

satish-ravi
Copy link
Contributor

Description

Fixes a bug introduced in #4834 , where VerificationStartScreen defaulted to being not in onboarding. This causes an issue if a user bails on the screen during onboarding. On restart, the screen is loaded in the already onboarded mode where the back button does nothing and there's no option to skip (see before video below). This PR reverts the default to be in onboarding as it doesn't seem trivial to pass props on the initialRoute.

Test plan

Unit tests and manual

Before:

onboarding-cpv-bug-before.mp4

After:

onboarding-cpv-bug-after.mp4

Related issues

N/A

Backwards compatibility

Yes

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (a7464fa) 85.42% compared to head (8312c56) 85.41%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4876      +/-   ##
==========================================
- Coverage   85.42%   85.41%   -0.02%     
==========================================
  Files         735      735              
  Lines       29933    29933              
  Branches     5256     5256              
==========================================
- Hits        25571    25566       -5     
- Misses       4114     4119       +5     
  Partials      248      248              
Files Coverage Δ
...onsumerIncentives/ConsumerIncentivesHomeScreen.tsx 94.19% <100.00%> (ø)
src/home/NotificationBox.tsx 91.57% <100.00%> (ø)
src/keylessBackup/LinkPhoneNumber.tsx 96.42% <100.00%> (ø)
src/onboarding/steps.ts 89.70% <100.00%> (ø)
src/send/SelectRecipientButtons.tsx 92.85% <100.00%> (ø)
src/RevokePhoneNumber.tsx 98.00% <0.00%> (ø)
src/account/Settings.tsx 85.34% <0.00%> (ø)
src/send/Send.tsx 93.18% <0.00%> (ø)
src/verify/VerificationStartScreen.tsx 91.80% <83.33%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7464fa...8312c56. Read the comment docs.

@@ -31,7 +31,7 @@ export default function LinkPhoneNumber({ navigation }: Props) {

const continueButtonOnPress = async () => {
ValoraAnalytics.track(OnboardingEvents.link_phone_number)
navigate(Screens.VerificationStartScreen, { isOnboarding: false })
navigate(Screens.VerificationStartScreen, { hasOnboarded: false })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting this to false here since it's technically still onboarding, we can reconsider this if we change the initial screen to be LinkPhoneNumber if the user completes cloud recovery and bails on this screen or the phone verification screen. cc @finnian0826

// Disable iOS back during onboarding
gestureEnabled: !route.params?.isOnboarding,
gestureEnabled: !!route.params?.hasOnboarded,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Does this need to be forced to a boolean?

Suggested change
gestureEnabled: !!route.params?.hasOnboarded,
gestureEnabled: route.params?.hasOnboarded,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it has to be forced to a boolean. The default value is true

@satish-ravi satish-ravi enabled auto-merge (squash) February 8, 2024 16:47
@satish-ravi satish-ravi merged commit 7587c42 into main Feb 8, 2024
16 checks passed
@satish-ravi satish-ravi deleted the satish/fix-onboarding-verification-screen branch February 8, 2024 19:03
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
…lora-inc#4876)

### Description

Fixes a bug introduced in valora-inc#4834 , where VerificationStartScreen
defaulted to being not in onboarding. This causes an issue if a user
bails on the screen during onboarding. On restart, the screen is loaded
in the already onboarded mode where the back button does nothing and
there's no option to skip (see before video below). This PR reverts the
default to be in onboarding as it doesn't seem trivial to pass props on
the initialRoute.

### Test plan

Unit tests and manual

Before:


https://github.com/valora-inc/wallet/assets/5062591/496876ec-4adf-48b8-8a12-72d9030f3e37


After:


https://github.com/valora-inc/wallet/assets/5062591/8d345432-4fcb-439f-b63a-03806d5959e0


### Related issues

N/A

### Backwards compatibility

Yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants