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
Update login screen for existing logged in user #40125
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~144 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Async-loaded Components (~150 bytes added 📈 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
fa292c9
to
1396181
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.
Tests well. Tested:
- connecting Jetpack, no signup form presented when already logged in
- open
/log-in
and/log-in/en
as authenticated, non-authenticated, and 2fa users - open
/log-in?site=SITE_SLUG
same as above - Tested that actually logging in with another user in this scenario worked
With ?site=SITE_SLUG
still works (my name is the site name in this case):
Non-2FA user, no first+lastname set, english locale:
With 2FA user in different locale:
(These texts just need translating)
Added |
There's a short gap when the login form is rendered while data loads and this avatar step isn't loaded: https://cloudup.com/cL5OLeTemOW Assuming that would be the case even if we would constantly show the form, this isn't a big change in behavior. To prevent this, we should hide the login form until API response tells us that the user in-fact is logged in. That would delay the login form visibility for many, while this visual jump is visible to few, so I think it's acceptable. @Automattic/team-calypso @sgomes would you like to review/test this before merging as it's touching the login landingpage? |
Thanks, @simison! I think this PR mostly deals with UI questions, not performance issues, so I'm going to leave any considerations to more knowledgeable folks in that area. There seems to be nothing concerning, perf-wise, from a brief glance at the code and the ICFY results. |
Some of the test failures seem related (test runner cannot see an element with |
Thanks for checking this out @amamujee !
Looks like the new CSS definitions included in this PR are ignored by your browser. I'm not sure if there can be a caching issue given the hash in the live URL. Anyway if this doesn't go away with a hard refresh (CMD + shift + R in Chrome), please share the browser version. I've tested in latest Chrome/Firefox/Safari including mobile and it looks fine.
This is the UI issue @simison mentioned earlier and it's illustrated in this demo: https://cloudup.com/cL5OLeTemOW |
We could ease it a bit by fading the avatar into the view, so it'll look more intentional instead of the sudden jump. |
Comment on the idea to improve the jump. Let's ship without that for now. Because this change was meant to be a quick adjustment to a much-used screen, speed is more important than perfect. The change is already a major improvement for users, and those additional improvements fall into the nice-to-have category, "maybe later." |
How hard is the fade to implement? When I tried it, I personally felt it was pretty jarring and also like there was a bug or screen that I missed that made me feel anxious. If the fade is not easy, I think the delay is a better UX than the disappearing screen for 1 second (although I've not tried it side by side). I think @razvanpapadopol and @simison should make the call here though. |
f4637d2
to
94358cc
Compare
Yes, some of the tests were expecting the login form to always be there. Fixed in 898153b cc @Automattic/e2e-test-reviewers |
898153b
to
0554f3d
Compare
@razvanpapadopol What do you think about @simison's suggestion to hide the login form until the API request is successful? Now that I understand the issue, I can see how the login form hide / show delay even on a fast connection is not ideal. Another suggestion is to use a loading icon and then once ready, show the correct version of the page. |
remove empty space Co-Authored-By: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
- Remove handleChangeAccount const from ContinueAsUser
- add loginAsAnotherUser id to ContinueAsUser component - add try/catch block in login method of LoginPage
- don't wait for #loginAsAnotherUser
cdf3279
to
6e4ff74
Compare
fixed the failing e2e tests by implemented suggested change. Thanks!
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 good and works well. 👍
Once translations are done, we can switch to final texts in a separate PR.
Thanks for tackling this one!
Merging this one now and once translations are ready we can do the switch on #40314 🚀 |
Work still needed to wrap up the feedback: #40314 |
created #40556 to capture the design feedback |
Changes proposed in this Pull Request
Log in with another account
text below with a link to show login form and everything elseTesting instructions
/log-in
Fixes (together with #40314): #39988
Related: #35309