-
Notifications
You must be signed in to change notification settings - Fork 395
Updated login page appearance #9425
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
Updated login page appearance #9425
Conversation
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.
Partial review, of course. I don't have enough context to approve
webui/src/extendable/plugins/impls/DefaultLoginMethodSelectionPlugin.tsx
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.
Nice plugin design!
I'd like to see the Enterprise part before completing this review, as some context is missing in this case.
Plus, blocking for the (info) comment atm.
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.
Is it possible to split the UI change with the functionality to extend. It will enable a quicker way to approve changes.
The UI feature I was referring to in the description of this PR is linked here. |
@nopcoder |
This PR previously included changes that I moved to this PR. It now contains only appearance-related updates and TypeScript error fixes. |
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 cleanup,
I like this move.
This can / should be cleaned-up and simplified though.
Plus, the image currently looks squashed 🤷
webui/src/styles/auth.css
Outdated
.login-logo { | ||
width: 170px; | ||
height: 60px; |
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.
These are wrong values:
The image itself is 359x82 (if I'm looking at the right one),
Plus, the image looks squashed horizontally.
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.
you're right, updated it
webui/src/styles/auth.css
Outdated
|
||
.login-container { | ||
height: 100vh; |
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.
What is vh
?
Do we use it anywhere 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.
removed the login-container
webui/src/pages/auth/login.tsx
Outdated
} catch(err) { | ||
if (err instanceof AuthenticationError && err.status === 401) { | ||
const contents = {__html: `${loginConfig.login_failed_message}` || | ||
<div className="d-flex align-items-center justify-content-center login-container"> |
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.
The login-container
(and its css) isn't needed, and positioning can / should be simplified.
Just define for the login-card
:
margin: 50px auto auto auto
It will place it at a fixed margin from the top, and center it horizontally.
And in addition, vertical centering is tricky with html + css, and prone for errors.
webui/src/pages/auth/login.tsx
Outdated
if (err instanceof AuthenticationError && err.status === 401) { | ||
const contents = {__html: `${loginConfig.login_failed_message}` || | ||
<div className="d-flex align-items-center justify-content-center login-container"> | ||
<Card className="login-widget shadow-lg border-0 login-card"> |
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.
Why both login-widget
and login-card
?
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.
The login-widget
was already here before my changes. I saw that there’s no actual CSS class with that name, and the only reference I found was in the design/accepted/ui-testing.md
document, where it was used as a selector in this old design doc. So I removed it.
webui/src/pages/auth/login.tsx
Outdated
<div className="mb-3"> | ||
<img src="/logo.png" alt="lakeFS" className="login-logo" /> | ||
</div> | ||
<h4 className="mb-0">Login</h4> |
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 is more for @nopcoder , I guess, but -
There's already a button that says Login
,
So there's no need to repeat it (is creates an unnecessary cognitive load on the user).
IMO this h4
can simply be removed.
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 agree I removed it. Let's see what @nopcoder thinks about that and the whole appearance change.
remove myself as I wanted to verify this change does not include the functionality related to the login selection.
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 👍
webui/src/pages/auth/login.tsx
Outdated
setLoginError(null); | ||
const username = formData.get('username'); | ||
const password = formData.get('password'); | ||
if (typeof username === 'string' && typeof password === 'string') { |
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.
Does this allow empty strings?
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.
@itaigilo
Yes, this check allows empty strings, but I actually removed this:
if (typeof username === 'string' && typeof password === 'string')
before the call to:
await auth.login(username, password);
because in the previous code we didn’t have this check, and I don’t want to change the logic. If formData.get('username') or formData.get('password') are not strings, the auth.login() call will handle them the same way it did before (resulting in a 401 response for the request).
Getting the following error while Login page is loaded:
|
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.
Add comment with error found in console while login page is loaded.
…fore calling to auth.login()
@nopcoder |
@treeverse/product In this PR, I changed the appearance of the login page. The description includes screenshots of both the old and new versions for comparison. Do you approve this change or have any feedback? |
Looks better! Thank you :) |
…election_feature-9424
…nd centered position
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. not. comment.
webui/src/lib/components/navbar.jsx
Outdated
@@ -64,39 +64,31 @@ const TopNavLink = ({ href, children }) => { | |||
}; | |||
|
|||
const TopNav = ({logged = true}) => { | |||
if (!logged) { | |||
if (logged) { |
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.
code style - can we !logged and return early or return logged && the component so it will take the code indent a bit left.
Closes #9430
Change Description
Description
In this PR, I made the following changes:
Old lakeFS login page:

New lakeFS login page: