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

feat(Onboarding): implement the new UnblockWithPukFlow #17111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

caybro
Copy link
Member

@caybro caybro commented Jan 21, 2025

What does the PR do

  • 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 "(B)locked" buttons, based on the context and the state of the keycard

Fixes: #17092
Fixes: #17109
Iterates: #17098

Affected areas

Onboarding

Architecture compliance

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it

Unblocking with PUK from both Onboarding and Login screens:

Zaznam.obrazovky.z.2025-01-23.15-16-58.mp4

@caybro caybro changed the title feat(Onboarding): implement the new UnlockWithPukFlow feat(Onboarding): implement the new UnlockWithPukFlow Jan 21, 2025
@caybro caybro force-pushed the feat/unlock-with-puk-flow branch from 8007bd9 to 159544b Compare January 21, 2025 22:27
@status-im-auto
Copy link
Member

status-im-auto commented Jan 21, 2025

Jenkins Builds

Click to see older builds (60)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 159544b #2 2025-01-21 22:34:54 ~7 min macos/aarch64 🍎dmg
✔️ 159544b #2 2025-01-21 22:37:12 ~9 min tests/nim 📄log
✔️ 159544b #2 2025-01-21 22:39:36 ~11 min tests/ui 📄log
✔️ 159544b #2 2025-01-21 22:42:48 ~14 min macos/x86_64 🍎dmg
✔️ 159544b #2 2025-01-21 22:48:08 ~20 min linux-nix/x86_64 📦tgz
✔️ 159544b #2 2025-01-21 22:48:57 ~21 min linux/x86_64 📦tgz
✔️ 159544b #2 2025-01-21 22:51:58 ~24 min windows/x86_64 💿exe
✔️ 074f0ce #3 2025-01-21 23:15:13 ~5 min macos/aarch64 🍎dmg
✔️ 074f0ce #3 2025-01-21 23:17:37 ~8 min tests/nim 📄log
✔️ d189486 #4 2025-01-21 23:23:38 ~4 min macos/aarch64 🍎dmg
✔️ d189486 #4 2025-01-21 23:27:19 ~8 min tests/nim 📄log
✔️ d189486 #4 2025-01-21 23:31:33 ~12 min tests/ui 📄log
✔️ d189486 #4 2025-01-21 23:31:42 ~12 min macos/x86_64 🍎dmg
✔️ d189486 #4 2025-01-21 23:36:10 ~17 min linux/x86_64 📦tgz
✔️ 584ffc7 #5 2025-01-21 23:45:28 ~5 min macos/aarch64 🍎dmg
✔️ 584ffc7 #5 2025-01-21 23:48:52 ~8 min tests/nim 📄log
✔️ 584ffc7 #5 2025-01-21 23:51:53 ~11 min tests/ui 📄log
✔️ 584ffc7 #5 2025-01-21 23:52:34 ~12 min macos/x86_64 🍎dmg
✔️ 584ffc7 #5 2025-01-21 23:53:28 ~13 min linux-nix/x86_64 📦tgz
✔️ 584ffc7 #5 2025-01-21 23:56:35 ~16 min linux/x86_64 📦tgz
✔️ 584ffc7 #5 2025-01-22 00:03:52 ~23 min windows/x86_64 💿exe
✔️ 32516cc #6 2025-01-22 19:58:18 ~5 min macos/aarch64 🍎dmg
✔️ 32516cc #6 2025-01-22 20:01:48 ~8 min tests/nim 📄log
32516cc #6 2025-01-22 20:05:26 ~12 min tests/ui 📄log
✔️ 32516cc #6 2025-01-22 20:05:45 ~12 min macos/x86_64 🍎dmg
✔️ 32516cc #6 2025-01-22 20:08:02 ~15 min linux-nix/x86_64 📦tgz
✔️ 32516cc #6 2025-01-22 20:10:28 ~17 min linux/x86_64 📦tgz
✔️ 32516cc #6 2025-01-22 20:15:40 ~22 min windows/x86_64 💿exe
✔️ 32516cc #7 2025-01-22 22:25:59 ~11 min tests/ui 📄log
✔️ 0de8670 #7 2025-01-22 23:35:25 ~6 min macos/aarch64 🍎dmg
✔️ 0de8670 #7 2025-01-22 23:37:48 ~8 min tests/nim 📄log
✔️ 0de8670 #7 2025-01-22 23:40:02 ~11 min macos/x86_64 🍎dmg
✔️ 0de8670 #8 2025-01-22 23:41:57 ~13 min tests/ui 📄log
✔️ 0de8670 #7 2025-01-22 23:42:13 ~13 min linux-nix/x86_64 📦tgz
✔️ 0de8670 #7 2025-01-22 23:46:29 ~17 min linux/x86_64 📦tgz
✔️ 0de8670 #7 2025-01-22 23:51:58 ~23 min windows/x86_64 💿exe
✔️ e7aac8f #8 2025-01-23 11:08:16 ~5 min macos/aarch64 🍎dmg
✔️ e7aac8f #8 2025-01-23 11:11:06 ~8 min tests/nim 📄log
✔️ 1570a45 #9 2025-01-23 11:18:02 ~6 min macos/aarch64 🍎dmg
✔️ 1570a45 #9 2025-01-23 11:20:16 ~8 min tests/nim 📄log
1570a45 #10 2025-01-23 11:23:52 ~11 min tests/ui 📄log
✔️ 1570a45 #9 2025-01-23 11:27:20 ~15 min macos/x86_64 🍎dmg
✔️ 1570a45 #9 2025-01-23 11:29:26 ~17 min linux-nix/x86_64 📦tgz
✔️ 1570a45 #9 2025-01-23 11:31:45 ~19 min linux/x86_64 📦tgz
✔️ 1570a45 #9 2025-01-23 11:37:39 ~25 min windows/x86_64 💿exe
✔️ 1570a45 #11 2025-01-23 11:41:40 ~11 min tests/ui 📄log
1570a45 #10 2025-01-23 16:45:21 ~3 min macos/aarch64 📄log
1570a45 #10 2025-01-23 16:47:20 ~5 min macos/x86_64 📄log
✔️ 1570a45 #10 2025-01-23 16:51:16 ~9 min tests/nim 📄log
✔️ 1570a45 #12 2025-01-23 16:54:24 ~12 min tests/ui 📄log
✔️ 1570a45 #10 2025-01-23 16:57:17 ~15 min linux-nix/x86_64 📦tgz
✔️ 1570a45 #10 2025-01-23 17:01:35 ~19 min linux/x86_64 📦tgz
✔️ 1570a45 #10 2025-01-23 17:08:03 ~25 min windows/x86_64 💿exe
a0e0496 #11 2025-01-23 18:54:46 ~2 min macos/aarch64 📄log
a0e0496 #11 2025-01-23 18:56:52 ~4 min macos/x86_64 📄log
✔️ a0e0496 #11 2025-01-23 19:02:00 ~9 min tests/nim 📄log
✔️ a0e0496 #13 2025-01-23 19:04:07 ~12 min tests/ui 📄log
✔️ a0e0496 #11 2025-01-23 19:06:26 ~14 min linux-nix/x86_64 📦tgz
✔️ a0e0496 #11 2025-01-23 19:08:40 ~16 min linux/x86_64 📦tgz
✔️ a0e0496 #11 2025-01-23 19:14:44 ~22 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
293f323 #12 2025-01-23 19:47:51 ~2 min macos/aarch64 📄log
293f323 #12 2025-01-23 19:49:21 ~3 min macos/x86_64 📄log
✔️ 293f323 #12 2025-01-23 19:54:41 ~8 min tests/nim 📄log
✔️ 293f323 #14 2025-01-23 19:57:50 ~12 min tests/ui 📄log
✔️ 293f323 #12 2025-01-23 19:59:18 ~13 min linux-nix/x86_64 📦tgz
✔️ 293f323 #12 2025-01-23 20:02:34 ~16 min linux/x86_64 📦tgz
✔️ 293f323 #12 2025-01-23 20:06:30 ~20 min windows/x86_64 💿exe
293f323 #13 2025-01-24 10:26:17 ~4 min macos/aarch64 📄log
293f323 #13 2025-01-24 10:27:30 ~5 min macos/x86_64 📄log
1d374aa #14 2025-01-24 11:09:01 ~3 min macos/aarch64 📄log
1d374aa #14 2025-01-24 11:11:43 ~5 min macos/x86_64 📄log
✔️ 1d374aa #13 2025-01-24 11:14:35 ~8 min tests/nim 📄log
✔️ 1d374aa #15 2025-01-24 11:18:45 ~12 min tests/ui 📄log
✔️ 1d374aa #13 2025-01-24 11:20:46 ~14 min linux-nix/x86_64 📦tgz
✔️ 1d374aa #13 2025-01-24 11:22:49 ~16 min linux/x86_64 📦tgz
✔️ 1d374aa #13 2025-01-24 11:31:21 ~25 min windows/x86_64 💿exe

@caybro caybro force-pushed the feat/unlock-with-puk-flow branch 2 times, most recently from 074f0ce to d189486 Compare January 21, 2025 23:18
@caybro caybro linked an issue Jan 21, 2025 that may be closed by this pull request
@caybro caybro force-pushed the feat/unlock-with-puk-flow branch from d189486 to 584ffc7 Compare January 21, 2025 23:39
@caybro caybro force-pushed the feat/onboarding-new-login-screen branch 2 times, most recently from 435e210 to 0cdbe5b Compare January 22, 2025 19:15
@caybro caybro force-pushed the feat/unlock-with-puk-flow branch 3 times, most recently from 0de8670 to e7aac8f Compare January 23, 2025 11:02
@caybro caybro force-pushed the feat/onboarding-new-login-screen branch from 0cdbe5b to 40e8411 Compare January 23, 2025 11:09
@caybro caybro force-pushed the feat/unlock-with-puk-flow branch from e7aac8f to 1570a45 Compare January 23, 2025 11:11
@caybro caybro marked this pull request as ready for review January 23, 2025 14:18
@caybro caybro requested review from alexjba and a team as code owners January 23, 2025 14:18
@caybro caybro changed the title feat(Onboarding): implement the new UnlockWithPukFlow feat(Onboarding): implement the new UnblockWithPukFlow Jan 23, 2025
@caybro caybro requested review from micieslak and jrainville and removed request for a team January 23, 2025 14:29
Copy link
Member

@jrainville jrainville left a 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
Copy link
Member

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?

Copy link
Member Author

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)
Copy link
Member

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.

Copy link
Member Author

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

Base automatically changed from feat/onboarding-new-login-screen to master January 23, 2025 16:41
@caybro caybro force-pushed the feat/unlock-with-puk-flow branch 2 times, most recently from a0e0496 to 293f323 Compare January 23, 2025 19:45
- 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
@caybro caybro force-pushed the feat/unlock-with-puk-flow branch from 293f323 to 1d374aa Compare January 24, 2025 11:05
Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

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

https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=2741-49469&m=dev

is that path covered?

image

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()
Copy link
Member

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 :)

Comment on lines +44 to +48
// 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
Copy link
Member

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

Copy link
Member

@micieslak micieslak left a 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
Copy link
Member

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"
Copy link
Member

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.

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.

New onboarding: Recovery Phrase Screen Title Mismatch [Onboarding] "Unblock using PUK" keycard flow
4 participants