-
Notifications
You must be signed in to change notification settings - Fork 390
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
base: master
Are you sure you want to change the base?
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
|
||
class DefaultLoginMethodSelectionPlugin implements PluginLoginMethodSelection { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
renderMethodSelection(_loginConfig: LoginConfig | undefined): React.ReactElement | null { |
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.
Following my proposal in the other PR,
renderMethodSelection(_loginConfig: LoginConfig | undefined): React.ReactElement | null { | |
renderLoginMethod(_loginConfig: LoginConfig | undefined): React.ReactElement | null { |
And plugins will check the method string to know which component to return
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.
@yonipeleg33
thanks I renamed it to: renderLoginMethodComponent
and the Plugin name to: PluginLoginMethod
and the default plugin imp to: DefaultLoginMethodPlugin
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 PR previously included changes that I moved to this PR. It now contains only appearance-related updates and TypeScript error fixes. The comments provided here have been addressed in the other PR.
webui/src/pages/auth/login.tsx
Outdated
if (router.query.method === 'local' && loginConfig) { | ||
return <LoginForm loginConfig={loginConfig}/>; |
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.
If you can ensure LoginConfig isn't false-y, remove | undefined
from the plugin's signature
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.
@@ -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.
What happens if !logged
?
There's no Navbar? How does the user logs in in this case?
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
The TopNav component refers to the black navigation bar at the top, as shown here:
In the new login page, when !logged
, TopNav will return nothing, meaning the black top navigation bar will not be displayed.
The only element visible when !logged
will be the Login modal, as seen here:
But as requested by Barak, I’ll split this PR to two PR, this one will handle the design changes and the other will cover the plugin functionality.
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.
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 🤷
.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.
|
||
.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?
} 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.
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
?
<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.
remove myself as I wanted to verify this change does not include the functionality related to the login selection.
Closes #9430
Change Description
Description
This PR previously included changes that I moved to this PR. It now contains only appearance-related updates and TypeScript error fixes. The comments provided here have been addressed in the other PR.
Old lakeFS login page:

New lakeFS login page:
