-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Laushinka/login 6826 #7046
Laushinka/login 6826 #7046
Conversation
bc90eae
to
7a8226e
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.
Many thanks for improving the login screen UX!
Unfortunately, there still seems to be some uncertainty around what exactly the page should look like in #6826, but I guess this PR can be adjusted when the final design is agreed upon.
(I have a slight suspicion that we might move to something like #6826 (comment) but with a dropdown element to the Continue with GitHub
button as shown in PROPOSAL
in #6826 (comment) -- but let's see).
I gave this a try, and it seems to work as intended in various scenarios. 👍
Except, however, that it always shows the welcome screen for me (while the PR description says "1. No welcome section"). Maybe that's unintended?
No repo | With GitHub repo | With GitLab repo |
---|---|---|
Also left some minor thoughts in the code, but please let me know if you'd like a more thorough code review at this point -- happy to do that! 😊
@jankeromnes Oh this shouldn't have happened. I will check, thanks!
I'm always happy with that! We can also do it synchronously if that works for you? 🤗 |
Sure! More than happy to sync on this -- how about this afternoon, e.g. 14:00 or 15:00? (Or please feel free to pick any time you like here 😁) I often feel like we should do more pair programming at Gitpod, but somehow there is always a bit of friction to set it up, so I end up never doing it. 🙈 Thanks for providing this opportunity! 🙏 |
💯💯💯💯💯💯 |
@Foge9627: changing LGTM is restricted to collaborators In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
013a256
to
e0ad6a6
Compare
@jankeromnes |
3293f6b
to
09fbb2d
Compare
/werft run 👍 started the job as gitpod-build-laushinka-login-6826.18 |
/werft run 👍 started the job as gitpod-build-laushinka-login-6826.19 |
Build finally green again after werft issue fixed. Ready for another code review if you'd like @jankeromnes. (I don't mean this weekend of course 🙈) |
/werft run 👍 started the job as gitpod-build-laushinka-login-6826.20 |
Thanks @laushinka - nice and clean :) I'm missing the Gitpod name on the page somewhere. The "Log in / Sign up" should not be bigger than the line below it, which carries an equally important messge. I got into trouble trying to login with GitLab (ended up on another login page with 3 buttons) - I would suggest giving the GitLab flow a little more testing. |
Looks like the version from the first comment was implemented and not the one that I understood was agreed on. Is that intentional? |
Hooray! 🙌
Thanks Laurie! 🙏😊 Sure, I'm happy to do another code review (could you please re-request review in the top right of this PR? This helps me differentiate PRs between "work in progress" and "blocked until reviewed" 😇). However, I also agree with Sven: Could you first please adjust the design to this version? I agree the issue isn't very clear (so many design variations 🙈) but I think that one is the current best compromise. |
@svenefftinge I can do this version - it did get confusing inside the issue, but I will take the comments in this PR as final, and specify that in the issue as well. cc @jldec to make sure we're aligned. |
Will plug in the experiments code once this is merged. |
cf2f6c5
to
df25033
Compare
@geropl Please review the experiments code 🙏🏽 |
Thanks again @laushinka! Taking another look now/soon 😇 (EDIT: Will check the theme fixes when the build is done 😋) |
@@ -28,6 +28,7 @@ const Experiments = { | |||
* Experiment "example" will be activate on login for 10% of all clients. | |||
*/ | |||
// "example": 0.1, | |||
"login-from-context-6826": 0.5, |
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.
Some documentation incl. a link to this PR would be nice!
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.
Also, side question: Can you manually "force" A or B to test code-dev deployments?
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.
Can you manually "force" A or B to test code-dev deployments?
Sure, you have to manipulate localStorage
in your web dev tools. They are configured to be stable atm, so will happily accept your changes.
Update: just recognized that this is not true, actually! And found a bug in the experiment impl (not this PR). Will fix after lunch. 🙃
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.
PR: #7103
components/dashboard/src/Login.tsx
Outdated
|
||
useEffect(() => { | ||
(async () => { | ||
setAuthProviders(await getGitpodService().server.getAuthProviders()); | ||
})(); | ||
}, []) | ||
|
||
if (Experiment.has(experiment)) { |
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.
👍
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.
@laushinka My bad, turns our React does not like this: build failed with Line 83:9: React Hook "useEffect" is called conditionally. React Hooks must be called in the exact same order in every component render react-hooks/rules-of-hooks
.
Then the if(Experiment.hat...
goes into the useEffect
, on top-level. 👍
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.
Yes just saw this as well
components/dashboard/src/Login.tsx
Outdated
|
||
useEffect(() => { | ||
(async () => { | ||
setAuthProviders(await getGitpodService().server.getAuthProviders()); | ||
})(); | ||
}, []) | ||
|
||
if (Experiment.has(experiment)) { |
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.
React doesn't seem to like the conditional useEffect
.
Maybe always run the useEffect
, but do if (!Experiment.has(experiment)) { return; }
at the top of 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.
Yes just realized this too
5795c11
to
21cdd69
Compare
@laushinka Sorry for the additional confusion - and thx for fixing. 🙏 Here's a follow-up PR to fix other issues as well: #7103 |
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.
Cannot test - "max number of users for licence" reached 🤷
But tested before, and code lgtm, so: 👍
LGTM label has been added. Git tree hash: 26cdb08ca8eb7574a013df588f0031e3827e8a76
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Foge9627, geropl Associated issue: #6826 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Unlogged visitors using a prefix are shown:
Related Issue(s)
Fixes #6826
Depends on #7081
How to test
https://laushinka-login-6826.staging.gitpod-dev.com/#
Release Notes
Documentation