feat(OnboardingLayout): Decompose into smaller, pure ui sub-flows #16977
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.
What does the PR do
Decomposes
OnboardingLayout
into following elements:OnboardingFlow
orchestrating all on-boarding flows on the stackOnboardingStackView
which is specifically configuredStackView
for handling all on-boarding flowsOnboardingLayout
itself integratingOboardingFlow
with stores andOnboardingStackView
Moreover
OnboardingFlow
consists of sub-flows:CreateNewProfileFlow
KeycardCreateProfileFlow
RecoveryPhraseCreateProfileFlow
LoginBySyncingFlow
LoginWithKeycardFlow
UseRecoveryPhraseFlow
Flows don't operate on own
StackView
, which must be provided from outside. This allows to compose complex flows from smaller ones within oneStackView
.Other:
backAvailableHint
to indicate if back button should be available or not. It brings two benefits:KeycardEnterPinPage
onboarding-rework-1
broke them)Further work
primaryFlow
/secondaryFlow
enums should be replaced by one enum, probably can be kept in the QML fileflow
type exposed viaOnboardingFlow::finish
is not collected in an elegant way. Maybe there is better option for that.Sync in progress
should be notified for some time even if the underlying operation was very quick (no matter if error or success). This gives the user the opportunity to familiarize themselves with the message and prevents from "blinking" when things happen quickly.timeoutInterval
is probably not needed inSyncProgressPage
andKeycardAddKeyPairPage
. It should be decided on the backend level what's the actual timeout.OnboardingLayout
backAvailableHint
as it's implicit way of communication between flows and provided stack viewlocalAppSettings
id used from outer scope, ideally whole settings handling should be externalizedCloses: #16947
Affected areas
OnboardingLayout
and related componentsArchitecture compliance
My PR is consistent with this document: Status Desktop Architecture Guide
Screenshot of functionality (including design for comparison)