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): Create Profile & Login flows #16722

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
365f98d
feat(Onboarding): Create Profile
caybro Nov 5, 2024
44e572f
feat(Onboarding): Login flows
caybro Nov 19, 2024
0382b5b
chore(@e2e): change tests according to new designs
anastasiyaig Nov 26, 2024
dc81139
chore: fix some PR review comments
caybro Dec 3, 2024
e6f6ac5
[Onboarding] Implement sync & add keypair progress pages
caybro Nov 25, 2024
31ad4b2
chore: add categorized logging
caybro Nov 28, 2024
62ac3c0
feat: integrate the keycard related flows changes
caybro Nov 28, 2024
6cc04ba
fix: make ListItemButton partially rounded
caybro Nov 29, 2024
6ec3648
chore: update CreateKeycardProfilePage image asset
caybro Nov 29, 2024
103d39e
chore: amend keycard and sync flows
caybro Nov 29, 2024
7a11095
chore: update KeycardAddKeyPair assets/images
caybro Dec 2, 2024
42516d6
chore: update WelcomePage / NewsCarousel assets/images
caybro Dec 2, 2024
1118489
chore: simplify and fix margins in SeedphrasePage
caybro Dec 3, 2024
62ae91c
chore: fix accepting an empty suggestion
caybro Dec 3, 2024
46eb42a
feat: update the SplashScreen to latest designs
caybro Dec 4, 2024
fc0bbf3
fix(OnboardingLayout): add QML tests
caybro Dec 6, 2024
ac2034b
chore(Sync): no need to keep syncConnectionString around
caybro Dec 6, 2024
00421ad
feat(KeycardAddKeyPairPage): add other options in case of failed tran…
caybro Dec 6, 2024
e29be2f
fix(EnterSeedPhrase): fixup the tab button handling
caybro Dec 6, 2024
884a152
chore(OnboardingLayout): move Splash out of the Onboarding flows
caybro Dec 6, 2024
f78c979
chore: make the tst_OnboardingLayout.qml test optional
caybro Dec 7, 2024
3250f39
chore: update some illustrations and icons
caybro Dec 9, 2024
5452f94
feat(OnboardingStore): introduce a new OnboardingStore
caybro Dec 9, 2024
1c71407
chore(KeycardEnterPin): get rid of `getPin()`
caybro Dec 10, 2024
e2fd1cd
fix(LoginBySync): fix the progress handling
caybro Dec 10, 2024
f91e8e0
fix(WelcomePage): make the news images bigger
caybro Dec 10, 2024
c4d2743
fix(Seedphrase): a few UI tweaks to Seedphrase grid
caybro Dec 11, 2024
15c13d6
fix(ui-tests): do not crash on inline components
caybro Dec 11, 2024
bee801e
feat(LoginPage): perform network checks before Login/Sync
caybro Dec 12, 2024
1c52488
StatusQ: added missing entry to statusq.qrc (LoadingDotItem)
micieslak Dec 17, 2024
733685f
Storybook: OnboardingLayout page - add seed phrase verification auto-…
micieslak Dec 17, 2024
970c7a1
feat(OnboardingLayout): Decompose into smaller, pure ui sub-flows
micieslak Dec 17, 2024
917d074
fix(OnboardingFlow): collect `enableBiometrics` and `seedphrase` data
caybro Jan 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/StatusQ/qml/Status/Core/StatusBaseText.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Status.Core.Theme
width: 240
text: qsTr("Hello World!")
font.pixelSize: 24
color: Theme.pallete.directColor1
color: Theme.palette.directColor1
}
\endqml

Expand Down
141 changes: 141 additions & 0 deletions storybook/pages/BackupSeedphraseFlowPage.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

import StatusQ 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Utils 0.1 as SQUtils
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1

import utils 1.0

import AppLayouts.Onboarding2.pages 1.0

Item {
id: root

QtObject {
id: d
readonly property var seedWords: ["apple", "banana", "cat", "cow", "catalog", "catch", "category", "cattle", "dog", "elephant", "fish", "grape"]
readonly property int numWordsToVerify: 4
}

StackView {
id: stack
anchors.fill: parent
initialItem: backupSeedIntroPage
}

MouseArea {
anchors.fill: parent
acceptedButtons: Qt.BackButton
enabled: stack.depth > 1 && !stack.busy
cursorShape: undefined // fall thru
onClicked: stack.pop()
}

StatusBackButton {
width: 44
height: 44
anchors.left: parent.left
anchors.leftMargin: Theme.padding
anchors.bottom: parent.bottom
anchors.bottomMargin: Theme.padding
opacity: stack.depth > 1 && !stack.busy ? 1 : 0
visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: 100 } }
onClicked: stack.pop()
}

Label {
anchors.right: parent.right
anchors.bottom: parent.bottom
text: !!stack.currentItem && stack.currentItem.pageClassName === "BackupSeedphraseVerify" ?
"Hint: %1".arg(stack.currentItem.seedWordsToVerify.map((entry) => entry.seedWord))
: ""
}

Connections {
id: mainHandler
target: stack.currentItem
ignoreUnknownSignals: true

function onBackupSeedphraseRequested() {
stack.push(backupSeedAcksPage)
}

function onBackupSeedphraseContinue() {
stack.push(backupSeedRevealPage)
}

function onBackupSeedphraseConfirmed() {
stack.push(backupSeedVerifyPage)
}

function onBackupSeedphraseVerified() {
stack.push(backupSeedOutroPage)
}

function onBackupSeedphraseRemovalConfirmed() {
console.warn("!!! FLOW FINISHED; RESTART")
stack.pop(null)
}
}

Component {
id: backupSeedIntroPage
BackupSeedphraseIntro {
onBackupSeedphraseRequested: console.warn("!!! SEED BACKUP REQUESTED")
}
}

Component {
id: backupSeedAcksPage
BackupSeedphraseAcks {
onBackupSeedphraseContinue: console.warn("!!! SEED ACKED")
}
}

Component {
id: backupSeedRevealPage
BackupSeedphraseReveal {
seedWords: d.seedWords
onBackupSeedphraseConfirmed: console.warn("!!! SEED CONFIRMED")
}
}

Component {
id: backupSeedVerifyPage
BackupSeedphraseVerify {
seedWordsToVerify: {
let result = []
const randomIndexes = SQUtils.Utils.nSamples(d.numWordsToVerify, d.seedWords.length)
for (const i of randomIndexes) {
result.push({seedWordNumber: i+1, seedWord: d.seedWords[i]})
}
return result
}
onBackupSeedphraseVerified: console.warn("!!! ALL VERIFIED")
}
}

Component {
id: backupSeedOutroPage
BackupSeedphraseOutro {
onBackupSeedphraseRemovalConfirmed: console.warn("!!! SEED REMOVAL CONFIRMED")
}
}
}

// category: Onboarding
// status: good
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=944-40428&node-type=instance&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=944-40730&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=522-36751&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=522-37165&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=783-33987&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=944-44817&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=783-34183&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=944-44231&node-type=frame&m=dev
4 changes: 4 additions & 0 deletions storybook/pages/ColorsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ SplitView {
enabled: searchField.searchText !== ""
onClicked: searchField.clear()
}
Label {
text: "INFO: Reload the page after selecting 'Dark mode'"
font.weight: Font.Medium
}
}

ColorFlow {
Expand Down
26 changes: 16 additions & 10 deletions storybook/pages/DidYouKnowSplashScreenPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,29 @@ SplitView {
SplitView.fillHeight: true
SplitView.fillWidth: true
progress: progressSlider.position
messagesEnabled: ctrlMessagesEnabled.checked
}
}

Pane {
SplitView.minimumWidth: 300
SplitView.preferredWidth: 300
RowLayout {
Label {
text: "Progress"
}
Slider {
SplitView.minimumWidth: 300
SplitView.preferredWidth: 300
ColumnLayout {
Layout.fillWidth: true
Label {
text: "Progress"
}
Slider {
id: progressSlider
}
}
}
Switch {
id: ctrlMessagesEnabled
text: "Messages enabled"
}
}
}
}

// category: Panels

// status: good
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba⎜Desktop?node-id=25878%3A518438&t=C7xTpNib38t7s7XU-4
44 changes: 44 additions & 0 deletions storybook/pages/KeycardAddKeyPairPagePage.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import QtQuick 2.15
import QtQuick.Controls 2.15

import StatusQ.Core.Backpressure 0.1

import AppLayouts.Onboarding2.pages 1.0
import AppLayouts.Onboarding.enums 1.0

Item {
id: root

KeycardAddKeyPairPage {
id: progressPage
anchors.fill: parent
addKeyPairState: Onboarding.AddKeyPairState.InProgress
timeoutInterval: 5000
onKeypairAddTryAgainRequested: {
console.warn("!!! onKeypairAddTryAgainRequested")
addKeyPairState = Onboarding.AddKeyPairState.InProgress
Backpressure.debounce(root, 2000, function() {
console.warn("!!! SIMULATION: SUCCESS")
addKeyPairState = Onboarding.AddKeyPairState.Success
})()
}
onKeypairAddContinueRequested: console.warn("!!! onKeypairAddContinueRequested")
onReloadKeycardRequested: console.warn("!!! onReloadKeycardRequested")
onCreateProfilePageRequested: console.warn("!!! onCreateProfilePageRequested")
}

ComboBox {
id: ctrlState
anchors.right: parent.right
anchors.bottom: parent.bottom
width: 350
model: ["Onboarding.AddKeyPairState.InProgress", "Onboarding.AddKeyPairState.Success", "Onboarding.AddKeyPairState.Failed"]
onCurrentIndexChanged: progressPage.addKeyPairState = currentIndex
}
}

// category: Onboarding
// status: good
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1305-48023&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1305-48081&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1305-48102&node-type=frame&m=dev
20 changes: 20 additions & 0 deletions storybook/pages/KeycardCreatePinPagePage.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import QtQuick 2.15

import AppLayouts.Onboarding2.pages 1.0

Item {
id: root

KeycardCreatePinPage {
anchors.fill: parent
onKeycardPinCreated: (pin) => console.warn("!!! PIN CREATED:", pin)
}
}

// category: Onboarding
// status: good
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=595-57785&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=595-57989&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=595-58027&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=507-34789&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1053-53693&node-type=frame&m=dev
51 changes: 51 additions & 0 deletions storybook/pages/KeycardEnterPinPagePage.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import QtQuick 2.15
import QtQuick.Controls 2.15

import AppLayouts.Onboarding2.pages 1.0

Item {
id: root

readonly property string existingPin: "111111"

KeycardEnterPinPage {
id: page
anchors.fill: parent
tryToSetPinFunction: (pin) => {
const valid = pin === root.existingPin
if (!valid)
remainingAttempts--
return valid
}
remainingAttempts: 3
onKeycardPinEntered: (pin) => {
console.warn("!!! PIN:", pin)
console.warn("!!! RESETTING FLOW")
state = "entering"
}
onReloadKeycardRequested: {
console.warn("!!! RELOAD KEYCARD")
remainingAttempts--
state = "entering"
}
onKeycardFactoryResetRequested: {
console.warn("!!! FACTORY RESET KEYCARD")
remainingAttempts = 3
state = "entering"
}
}

Label {
anchors.bottom: parent.bottom
anchors.right: parent.right
text: "Hint: %1".arg(root.existingPin)
}
}

// category: Onboarding
// status: good
// 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
Loading