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

589 Add backup flow after account creation #615

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

jeden
Copy link
Collaborator

@jeden jeden commented Dec 2, 2024

Related Issue

Summary of Changes

Modified CreateProfileWaitingView to show the two buttons, and handled the added route in sequence after showing the home screen.

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

image

Before:

current.create.wallet.flow.mov

After:

updated.create.wallet.mov

@jeden jeden requested review from zhouxl and lmcmz December 2, 2024 03:18
Copy link
Collaborator

Choose a reason for hiding this comment

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

DispatchQueue.swift


DispatchQueue.main.async {
self.changeBackupTypeIfNeeded()
self.state.isRegisting = false
Router.popToRoot()

Copy link
Collaborator

Choose a reason for hiding this comment

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

Might need to add a delay?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought about that, but it worked without any issue in my testing. Maybe I can test on a couple more devices and iOS versions, just to be sure

@lmcmz
Copy link
Member

lmcmz commented Dec 2, 2024

It feels wired to jump back to root can then instantly go to backup page.
Can we change the navigation behaviour?

@jeden
Copy link
Collaborator Author

jeden commented Dec 2, 2024

It feels wired to jump back to root can then instantly go to backup page. Can we change the navigation behaviour?

THe problem with this is that when the backup screen is dismissed, it will get back to the account creation screen, and from that point on it should redirect to home. I'll check if that can be done without any weird transition

@jeden
Copy link
Collaborator Author

jeden commented Dec 2, 2024

@lmcmz How about this?
I'm setting the window alpha to zero, popping to root, showing the backup screen, and animating the alpha back to 1 with a delay of 0.1 and duration of 0.4 secs

updated.create.wallet.7.mov

@JeffreyDoyle
Copy link

Hey @jeden -- Let's please ensure there is no "sliding" animation shown. The Backup view needs to be immediately displayed once the user selects to Backup

@JeffreyDoyle
Copy link

JeffreyDoyle commented Dec 3, 2024

Can we also change the copy on the final account creation view to "Congratulations! Your Flow account is now ready. To best secure your account, you can back it up now."

@lmcmz
Copy link
Member

lmcmz commented Dec 3, 2024

We can override the navigation stack to avoid user go to back the account creation page.

@jeden jeden linked an issue Dec 3, 2024 that may be closed by this pull request
@@ -47,6 +47,35 @@ extension Router {
}
}

static func popToRootAndRoute(to target: RouterTarget, animated: Bool = true) {
Copy link
Member

Choose a reason for hiding this comment

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

Please use setViewControllers to reset the navigation stack.
You can refer to

guard let rootVC = navi.viewControllers.first else {
return
}
var newVCList = [rootVC]
let vc = RouteableUIHostingController(rootView: RecoveryPhraseView(backupMode: false))
newVCList.append(vc)
navi.setViewControllers(newVCList, animated: true)

@jeden jeden requested a review from lmcmz December 4, 2024 02:44
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.

[FEATURE] Add backup flow after account creation
4 participants