Feat/reorg onboarding notifications reviews#107
Merged
Conversation
Built new signup page New localizations
Languages: ar, de, es-419, fa-IR, fr, hi, id, it, ja, ko, pa, pl, pt-BR, nl, ru, sv, th, tr, uk, zh-Hans, zh-Hant Triggered by: 41f441f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📱 Description
This PR reorganizes the onboarding notification flow by introducing a new
SignupAskViewthat prompts users for push notification permissions after passcode setup. The change integrates Firebase Cloud Messaging request handling into the view model, adds comprehensive unit tests for the notification registration flow, and corrects wallet restoration logic flags across multiple onboarding views.Platform
🎯 Type of Change
📋 Changes
New Components Added
SignupAskView.swift– New onboarding screen that prompts users for push notification permissions with "Yes! Send me updates!" and "Maybe later (Skip)" actions. Routes to either.inputWordsView(restore) or.yourSeedWordsView(new wallet) based on restoration flag.SignupAskViewTests.swift– Unit test suite covering navigation flows (new/restore wallets), skip action behavior, notification registration callbacks, back button safety, and ViewModel property publishing.Modifications
AppDelegate.swift– RefactoredlaunchFCMessaging()to accept a completion handler instead of takingUIApplicationas parameter; changedapplication.registerForRemoteNotifications()toUIApplication.shared.registerForRemoteNotifications()and adjusted completion callback logic.NewMainViewModel.swift– Added@Published var didRegisterForNotifications: Boolproperty and newrequestNotificationPermissions()method that callsAppDelegate.launchFCMessaging()and updates the published flag.NewMainView.swift– RemovedrequestRatingReview()method and its call site from the.onChange(of: newMainViewModel.transactions)handler.StartView.swift– Added newcase .signupAskView(isRestoringAnOldWallet: Bool)navigation case that instantiatesSignupAskView; added corresponding case toOnboardingenum.ConfirmPasscodeView.swift– Changed passcode confirmation success path to append.signupAskView(isRestoringAnOldWallet: isRestoringAnOldWallet)instead of conditionally routing to.yourSeedWordsViewor.inputWordsViewdirectly.ReadyView.swift– Corrected "Create new wallet" button to passisRestoringAnOldWallet: false(was incorrectlytrue).RestoreView.swift– Corrected "Restore existing wallet" button to passisRestoringAnOldWallet: true(was incorrectlyfalse).Localizable.xcstrings– Updated localization strings (changes not detailed in diff but file included in change set).brainwallet.xcodeproj/project.pbxproj– Updated Xcode project to reference new test file and view file.Removals
📊 Statistics
🧪 Tests Status
🎯 Reviewers
@josikie