-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat(Onboarding): implement the new UnblockWithPukFlow
#17111
base: master
Are you sure you want to change the base?
Conversation
UnlockWithPukFlow
8007bd9
to
159544b
Compare
Jenkins BuildsClick to see older builds (60)
|
074f0ce
to
d189486
Compare
d189486
to
584ffc7
Compare
435e210
to
0cdbe5b
Compare
0de8670
to
e7aac8f
Compare
0cdbe5b
to
40e8411
Compare
e7aac8f
to
1570a45
Compare
UnlockWithPukFlow
UnblockWithPukFlow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -59,11 +60,13 @@ SQUtils.QObject { | |||
KeycardIntroPage { | |||
keycardState: root.keycardState | |||
displayPromoBanner: root.displayKeycardPromoBanner | |||
unlockUsingSeedphrase: true | |||
unblockUsingSeedphraseAvailable: true | |||
unblockWithPukAvailable: root.remainingAttempts === 1 || root.remainingAttempts === 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The remaining attempts starts at 3. I just want to confirm that the purpose of the property is really to activate after the first failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, intended
@@ -37,6 +38,10 @@ QtObject { | |||
return d.onboardingModuleInst.setPin(pin) | |||
} | |||
|
|||
function setPuk(puk: string) { // -> bool | |||
return d.onboardingModuleInst.setPuk(puk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I'm changing a lot of those functions in my own branch because the keycard functions are better used async since they can take a second and they would freeze the UI.
Just letting you know for the future or if you want to change it already for this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK then we'll have to introduce all sorts of "loading" states to the UI, whenever we're using the setPin()
to validate the user entry
a0e0496
to
293f323
Compare
- make a difference between "Create profile..." and "Login with..." Fixes: #17109
- to be used in the "Unlock with PUK" flow
- integrate the PUK unblock flow into the Onboarding and Login screen - added a dedicated SB page for it - remove the `Locked` keycard state everywhere in favor of `BlockedPIN` and `BlockedPUK` - fix the various "Locked" buttons, based on the context and the state of the keycard Fixes: #17092
293f323
to
1d374aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that path covered?
I cannot reach it via sb page, am I missing sth?
@@ -26,6 +26,7 @@ SQUtils.QObject { | |||
signal seedphraseSubmitted(string seedphrase) | |||
signal reloadKeycardRequested | |||
signal keycardFactoryResetRequested | |||
signal unblockWithPukRequested() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cosmetics: would be nice to stick to one version regarding signals without params. In the official doc they skip ()
: https://doc.qt.io/qt-6/qml-codingconventions.html so I'm voting for that shorter option :)
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45942&node-type=frame&m=dev | ||
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45950&node-type=frame&m=dev | ||
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45959&node-type=frame&m=dev | ||
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45966&node-type=frame&m=dev | ||
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45996&node-type=frame&m=dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those links seem to lead to improper location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small glitch in pin input:
Screencast.from.24.01.2025.15.58.47.webm
I also noticed that's possible to change cursor position of the underlying text area using arrows.
The code lgtm regarding the structure, but I cannot understand and follow in sb the LoginWithKeycardFlow path with locked keycard.
@@ -15,6 +15,7 @@ Dialog { | |||
|
|||
required property string password | |||
required property string pin | |||
required property string selectedProfileIsKeycard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like not property of that component, can be defined in the place where the component is used probably
@@ -192,22 +203,47 @@ KeycardBasePage { | |||
} | |||
}, | |||
State { | |||
name: "locked" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondering about decomposing that component into smaller per-state chunks. Having multiple states with multiple property changes generates a lot of changes when adding sth there.
What does the PR do
Locked
keycard state everywhere in favor ofBlockedPIN
andBlockedPUK
Fixes: #17092
Fixes: #17109
Iterates: #17098
Affected areas
Onboarding
Architecture compliance
My PR is consistent with this document: Status Desktop Architecture Guide
Screenshot of functionality (including design for comparison)
Unblocking with PUK from both Onboarding and Login screens:
Zaznam.obrazovky.z.2025-01-23.15-16-58.mp4