Repository navigation
Bug 2092151 - Advance onboarding only when the sync flow started from the pairing card completes - #447
Open
corentinbect wants to merge 1 commit into
Open
Bug 2092151 - Advance onboarding only when the sync flow started from the pairing card completes#447corentinbect wants to merge 1 commit into
corentinbect wants to merge 1 commit into
Conversation
… the pairing card completes Selecting "Scan pairing code" on the the onboarding pairing sync card opened `PairFragment` and also called `scrollToNextPageOrDismiss()` immediately. This ran `OnboardingFragment.onFinish` while the scanner was still open and pairing was not complete. Onboarding was marked as complete and telemetry was recorded, but the navigation to home was skipped because `PairFragment` was the current destination. As soon as the account was connected, the sign in `LaunchedEffect` in `OnboardingScreen` called `OnboardingFragment.onFinish` another time, resulting in a duplicate event and a delayed navigation to the home screen. This patch adds `OnboardingSyncFlowResult`, an object that lets sync flows started from onboarding report flow completion. The result is stored in the `SavedStateHandle` of the previous back stack entry so that only the destination that started the flow is notified. `PairFragment` reports completion when a QR code is scanned and `SyncFlowCompletedEffect` moves to the next page once and consumes the result. Also `OnboardingFragment.onFinish` now returns early if the current destination is not the onboarding. This avoids unexpected side effects when another screen is the current destination.
Author
|
No new issues detected. This pull request is 🆗 |
1 similar comment
|
No new issues detected. This pull request is 🆗 |
This branch has not been deployed
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.
Selecting "Scan pairing code" on the the onboarding pairing sync card opened
PairFragmentand also calledscrollToNextPageOrDismiss()immediately. This ranOnboardingFragment.onFinishwhile the scanner was still open and pairing was not complete. Onboarding was marked as complete and telemetry was recorded, but the navigation to home was skipped becausePairFragmentwas the current destination. As soon as the account was connected, the sign inLaunchedEffectinOnboardingScreencalledOnboardingFragment.onFinishanother time, resulting in a duplicate event and a delayed navigation to the home screen.This patch adds
OnboardingSyncFlowResult, an object that lets sync flows started from onboarding report flow completion. The result is stored in theSavedStateHandleof the previous back stack entry so that only the destination that started the flow is notified.PairFragmentreports completion when a QR code is scanned andSyncFlowCompletedEffectmoves to the next page once and consumes the result.Also
OnboardingFragment.onFinishnow returns early if the current destination is not the onboarding. This avoids unexpected side effects when another screen is the current destination.Lando: link
Bugzilla: bug 2092151
🚫 This pull request has 1 blocker.