-
Notifications
You must be signed in to change notification settings - Fork 81
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 KeycardFactoryReset flow #17167
Conversation
@@ -47,7 +47,7 @@ SQUtils.QObject { | |||
|
|||
function finishWithFactoryReset() { | |||
root.keycardFactoryResetRequested() | |||
root.finished() | |||
root.finished(false) |
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.
We don't want to proceed with the original flow when we request a Factory reset
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.
Would it be better to emit a different signal then?
@@ -86,16 +85,10 @@ Control { | |||
} | |||
MaybeOutlineButton { | |||
width: parent.width | |||
visible: root.keycardState === Onboarding.KeycardState.BlockedPIN | |||
visible: root.keycardState === Onboarding.KeycardState.BlockedPIN || root.keycardState === Onboarding.KeycardState.BlockedPUK |
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.
"Unblock with recovery phrase" is always visible on the Login screen
text: qsTr("Unblock with recovery phrase") | ||
onClicked: root.unblockWithSeedphraseRequested() | ||
} | ||
MaybeOutlineButton { |
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.
.. and Factory reset never visible on the Login screen
Jenkins BuildsClick to see older builds (45)
|
88c35d7
to
2beff66
Compare
866faf0
to
13d0c83
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.
I'd be glad if we can merge it after #17127 🙂
ui/StatusQ/src/onboarding/enums.h
Outdated
@@ -66,6 +66,7 @@ class OnboardingEnums: public QObject | |||
MaxPairingSlotsReached, | |||
BlockedPIN, // PIN remaining attempts == 0 | |||
BlockedPUK, // PUK remaining attempts == 0 | |||
FactoryResetting, |
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.
If merged after #17127, please add it to here as well:
type KeycardState* = enum |
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.
Alright, I can wait, will add this state
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.
@igor-sirotin what about the missing startKeycardFactoryReset()
NIM method?
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.
Alright, I added the state in my PR: 2a25314
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.
@caybro What's the startKeycardFactoryReset
, I have no idea about it
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.
This should invoke the actual factory reset method on the backend side, via the respective store function
@@ -47,7 +47,7 @@ SQUtils.QObject { | |||
|
|||
function finishWithFactoryReset() { | |||
root.keycardFactoryResetRequested() | |||
root.finished() | |||
root.finished(false) |
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.
Would it be better to emit a different signal then?
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 but Ii think some basic test should be added as for other flows
Yeah I will add an extra issue/task to extend the QML tests with these "unblock" flows; afaik we don't really test any of these yet |
13d0c83
to
7f39e36
Compare
|
- in other words, stop if we want some other flow instead, e.g. the factory reset
- integrate it into the UI and StoryBook - a new keycardState is introduced: `FactoryResetting` (matching the backend) - a new store method introduced: `startKeycardFactoryReset()` Fixes: #17094
7f39e36
to
82a21b1
Compare
What does the PR do
FactoryResetting
(matching the backend)startKeycardFactoryReset()
Fixes: #17094
Affected areas
Onboarding
Architecture compliance
My PR is consistent with this document: Status Desktop Architecture Guide
Screenshot of functionality (including design for comparison)
Zaznam.obrazovky.z.2025-01-31.15-20-57.mp4