-
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 new Login screen #17057
Conversation
544dd34
to
f6b898d
Compare
Jenkins BuildsClick to see older builds (178)
|
f6b898d
to
7be9676
Compare
7be9676
to
401e2e0
Compare
401e2e0
to
b688aae
Compare
b688aae
to
c263dfc
Compare
d5524fd
to
35b8620
Compare
c263dfc
to
73ddd3b
Compare
29ce4b0
to
43a5b68
Compare
73ddd3b
to
0557b49
Compare
0557b49
to
a9fecc4
Compare
a9fecc4
to
5e00603
Compare
5e00603
to
589e17c
Compare
589e17c
to
0157c62
Compare
0157c62
to
e788759
Compare
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
c7d2222
to
8712ca6
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.
Cool! Looks good in general as it's nicely extending what we had and therefore easy to understand code.
I left propositions of several smaller or bigger improvements and structural alignments.
ui/app/AppLayouts/Onboarding2/controls/LoginUserSelectorDelegate.qml
Outdated
Show resolved
Hide resolved
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.
As the LoginPage
name is already free, can we rename this one to LoginPage
?
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.
🤷 dunno, I liked the LoginScreen
better but yeah, I can rename 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.
Two more reasons, I never liked the LoginPagePage
pattern for storybook, and also this is not really a "page" in the sense of the onboarding; rather a separate thing
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.
now we have flows, pages and layout, combining all the things together. Screen just doesn't fit to that convention for me, structurally it's like other "pages" we have. "PagePage" is Storybook's problem and shouldn't affect naming patterns in the app.
function init() { | ||
root.stackView.push(welcomePage) | ||
} | ||
|
||
function startCreateProfileFlow() { | ||
root.stackView.push(createProfilePage) | ||
} | ||
|
||
function startLoginFlow() { | ||
root.stackView.push(loginPage) | ||
} |
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.
Actually all three method do initialization of the flow, the difference is starting page. So it would be nice to align naming somehow.
What about changing init
into startWelcomeFlow
or startWelcomePage
?
Otherwise it's easy to think that it's necessary to call init
first, even before calling e.g. startCreateProfileFlow
.
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.
Yeah I'll think about something, as I'm adding more things in the followup PR
storybook/pages/LoginScreenPage.qml
Outdated
onSelectedProfileKeyIdChanged: biometricsPopup.visible = Qt.binding(() => ctrlBiometrics.checked && ctrlTouchIdUser.checked && store.keycardState === Onboarding.KeycardState.NotEmpty) | ||
} | ||
|
||
Dialog { |
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.
It could be excluded to a separate file, could be stored in pages
dir as some other utilities that are intended to be used only from pages and are not general purpose storybook utils.
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.
Yeah good idea; I was thinking about the same for the "keycard state" buttons/combobox, it's just duplicated all over the place
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, extracted to a separate component
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.
putting it into status-desktop/storybook/src/Storybook/BiometricsPopup.qml
breaks the convention. storybook/src/Storybook/
is location of generic storybook components that could be used in any project. App-specific helpers should go directly to pages
dir.
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
8712ca6
to
435e210
Compare
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
435e210
to
0cdbe5b
Compare
@micieslak I think I handled and fixed all the comments, pls have a second look; same for @jrainville. Would be nice to be able to merge this so that we have at least some integration to work with |
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
let uid = keyUid | ||
if (uid === "") | ||
uid = proxyModel.get(0, "keyUid") // select the first entry from the model | ||
currentEntry.value = uid |
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.
let uid = keyUid | |
if (uid === "") | |
uid = proxyModel.get(0, "keyUid") // select the first entry from the model | |
currentEntry.value = uid | |
currentEntry.value = keyUid === "" ? (proxyModel.get(0, "keyUid") ?? "") : keyUid |
There are several potential problems in the imperative code fetching the first entry key:
- Model may be empty and the fetched value is undefied (fixed by the proposed code)
- If model is empty when
setSelection
is called and populated later, first entry won't be fetched - If the provided
keyUid
is not in the model, fallback to the first entry won't work
That situation shows limitations of ModelEntry
which is limited it terms of how the entry is pointed. The solution could be generalizing the ModelEntry
to support more generic search criteria.
I created ticket proposing changes to ModelEntry
which could allow handling cases like that in simple, declarative way: #17117
ui/app/AppLayouts/Onboarding2/controls/LoginUserSelectorDelegate.qml
Outdated
Show resolved
Hide resolved
- explicitely provide a bg color - also fix the mouse cursor shape
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
0cdbe5b
to
40e8411
Compare
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
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.
Nice!
There is one comment not addressed regarding moving BiometricsPopup.qml
. Would be nice to do for preserving the current order.
I did move it to a shared location: Or did you mean something else? |
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
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
- implement the new UI and frontend logic of the Login screen - integrate it (as a separate page) into the OnboardingLayout - add SB pages - add an integration QML test - add some TODOs and FIXMEs for the existing and new external flows, which will be covered separately in followup PRs Fixes #17057
What does the PR do
TODO for followup PRs:
UnblockWithPukFlow
#17111Fixes #17049
Fixes #17081
Fixes #17100
Affected areas
Login screen
Architecture compliance
My PR is consistent with this document: Status Desktop Architecture Guide
Screenshot of functionality (including design for comparison)
OnboardingLayout SB page (showing the Login screen):
![image](https://private-user-images.githubusercontent.com/5377645/404928273-93bbdff1-20c8-4d95-890c-b82541fb04f8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzUxMTgsIm5iZiI6MTczODkzNDgxOCwicGF0aCI6Ii81Mzc3NjQ1LzQwNDkyODI3My05M2JiZGZmMS0yMGM4LTRkOTUtODkwYy1iODI1NDFmYjA0ZjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTMyNjU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Zjc4MzA0NTU0ZGM1YmIzNWRmMDY1NWZlZmQzYTE1NmQ5YjVlNjAwNjRjYzIyYzFiMTdiMWI2ZDk4YmMwNmJiMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.KKYEw8qlG2WzE1O16wEUxMh4MddUiVdoylc92L_QXN4)
Selecting a different user/profile:
![image](https://private-user-images.githubusercontent.com/5377645/404928471-ebdc4209-c926-424b-8477-9f0042b048e7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzUxMTgsIm5iZiI6MTczODkzNDgxOCwicGF0aCI6Ii81Mzc3NjQ1LzQwNDkyODQ3MS1lYmRjNDIwOS1jOTI2LTQyNGItODQ3Ny05ZjAwNDJiMDQ4ZTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTMyNjU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWQ5NjZiMWM3ODlhOGJhNTQxMmIyZmI5N2Q1ZmE2ZGIzMDNjMzNlMmM2MzZjNWJmMTQ5OGE4OWQ4NjRlOWQ1ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.MqTGvv2Zsb8dpO-0ISoXLr0fY_Y9t2_JYlY20HsFmfw)
Password:
![image](https://private-user-images.githubusercontent.com/5377645/404928517-36510256-8daa-4578-be41-e5dd0d26122e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzUxMTgsIm5iZiI6MTczODkzNDgxOCwicGF0aCI6Ii81Mzc3NjQ1LzQwNDkyODUxNy0zNjUxMDI1Ni04ZGFhLTQ1NzgtYmU0MS1lNWRkMGQyNjEyMmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTMyNjU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzIwODFmMDA1Y2RkM2QyMzkzMDVmMjU5ZWYxNzAyNWJjYTcyMjM0NGE2MWY3OGJiN2FlODRjMjA1NTBiNjJhYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.04x_5q1igSSpaAXRdbZf8Di3kqx8sikZZ8HpZbviF8c)
Keycard/biometrics:
![image](https://private-user-images.githubusercontent.com/5377645/404928568-5f1aa1eb-8afe-46f2-afe4-3f1d9395f856.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzUxMTgsIm5iZiI6MTczODkzNDgxOCwicGF0aCI6Ii81Mzc3NjQ1LzQwNDkyODU2OC01ZjFhYTFlYi04YWZlLTQ2ZjItYWZlNC0zZjFkOTM5NWY4NTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTMyNjU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjYzYjYxNDE1MjVlZWFmOTY3OTExZTRlZTAxNzY2M2YzNDZiMjNkNTFhYmY3NDM2ZjE2MWFmNTkzMzExNTZmYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Hv0tApRykcR3Y1b2AM9-oCp7fPRSAUobFtwUqV2LmSo)