Skip to content

Conversation

Annaseli
Copy link
Contributor

@Annaseli Annaseli commented Aug 13, 2025

Closes #9430

Change Description

Description

In this PR, I made the following changes:

  • Updated the appearance of the login page:
    • Removed the simplified top navbar when the user is logged out.
    • Added a lakeFS logo inside the login modal.
    • Moved down the login modal on the page.
    • Removed the login title from the modal because the button already has the word "Login".
  • Fixed TypeScript errors in login.tsx.

Old lakeFS login page:
old_login_page

New lakeFS login page:

Screenshot 2025-09-16 at 11 47 44

@Annaseli Annaseli added the include-changelog PR description should be included in next release changelog label Aug 13, 2025
@Annaseli Annaseli requested review from a team August 13, 2025 20:02
Copy link
Contributor

@yonipeleg33 yonipeleg33 left a 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

Copy link
Contributor

@itaigilo itaigilo left a 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.

Copy link
Contributor

@nopcoder nopcoder left a 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.

@Annaseli
Copy link
Contributor Author

The UI feature I was referring to in the description of this PR is linked here.

@Annaseli
Copy link
Contributor Author

Is it possible to split the UI change with the functionality to extend. It will enable a quicker way to approve changes.

@nopcoder
sure i'll split it now.

@Annaseli Annaseli changed the title Added plugin support for login method selection in Enterprise and updated login page appearance Updated login page appearance Aug 14, 2025
@Annaseli
Copy link
Contributor Author

This PR previously included changes that I moved to this PR. It now contains only appearance-related updates and TypeScript error fixes.

Copy link
Contributor

@itaigilo itaigilo left a 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;
Copy link
Contributor

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.

Copy link
Contributor Author

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


.login-container {
height: 100vh;
Copy link
Contributor

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?

Copy link
Contributor Author

@Annaseli Annaseli Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the login-container

} 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">
Copy link
Contributor

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">
Copy link
Contributor

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?

Copy link
Contributor Author

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.

<div className="mb-3">
<img src="/logo.png" alt="lakeFS" className="login-logo" />
</div>
<h4 className="mb-0">Login</h4>
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@nopcoder nopcoder removed their request for review August 20, 2025 08:35
@nopcoder nopcoder dismissed their stale review August 20, 2025 08:37

remove myself as I wanted to verify this change does not include the functionality related to the login selection.

@Annaseli
Copy link
Contributor Author

Now the propesed login page looks like this:

image

Copy link
Contributor

@itaigilo itaigilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

setLoginError(null);
const username = formData.get('username');
const password = formData.get('password');
if (typeof username === 'string' && typeof password === 'string') {
Copy link
Contributor

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?

Copy link
Contributor Author

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).

@nopcoder
Copy link
Contributor

Getting the following error while Login page is loaded:

Navigated to http://localhost:3000/auth/login?next=%2Frepositories&redirected=true
index.js:81  GET http://localhost:3000/api/v1/config 401 (Unauthorized)
apiRequest @ index.js:81
getConfig @ index.js:1085
(anonymous) @ configProvider.tsx:64
commitHookEffectListMount @ chunk-SKXUPSEW.js?v=2ac58ab6:16931
commitPassiveMountOnFiber @ chunk-SKXUPSEW.js?v=2ac58ab6:18174
commitPassiveMountEffects_complete @ chunk-SKXUPSEW.js?v=2ac58ab6:18147
commitPassiveMountEffects_begin @ chunk-SKXUPSEW.js?v=2ac58ab6:18137
commitPassiveMountEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:18127
flushPassiveEffectsImpl @ chunk-SKXUPSEW.js?v=2ac58ab6:19511
flushPassiveEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:19468
(anonymous) @ chunk-SKXUPSEW.js?v=2ac58ab6:19349
workLoop @ chunk-SKXUPSEW.js?v=2ac58ab6:197
flushWork @ chunk-SKXUPSEW.js?v=2ac58ab6:176
performWorkUntilDeadline @ chunk-SKXUPSEW.js?v=2ac58ab6:384
pluginsContext.tsx:20 Warning: React has detected a change in the order of Hooks called by LoginPage. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
1. useContext                 useContext
2. useContext                 useContext
3. useContext                 useContext
4. useContext                 useContext
5. useContext                 useContext
6. useContext                 useContext
7. useContext                 useContext
8. useContext                 useContext
9. useContext                 useContext
10. useContext                useContext
11. useContext                useContext
12. useContext                useContext
13. useRef                    useRef
14. useContext                useContext
15. useLayoutEffect           useLayoutEffect
16. useCallback               useCallback
17. useContext                useContext
18. useContext                useContext
19. useContext                useContext
20. useContext                useContext
21. useContext                useContext
22. useContext                useContext
23. useContext                useContext
24. useContext                useContext
25. useContext                useContext
26. useContext                useContext
27. useContext                useContext
28. useContext                useContext
29. useRef                    useRef
30. useContext                useContext
31. useLayoutEffect           useLayoutEffect
32. useCallback               useCallback
33. useState                  useState
34. useState                  useState
35. useEffect                 useEffect
36. useEffect                 useEffect
37. undefined                 useContext
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Error Component Stack
    at LoginPage (login.tsx:119:20)
    at RenderedRoute (react-router-dom.js?v=2ac58ab6:3491:5)
    at Outlet (react-router-dom.js?v=2ac58ab6:3812:26)
    at div (<anonymous>)
    at ConfigProvider (configProvider.tsx:58:59)
    at Layout (layout.tsx:9:41)
    at RenderedRoute (react-router-dom.js?v=2ac58ab6:3491:5)
    at Routes (react-router-dom.js?v=2ac58ab6:3872:5)
    at WithLoginConfigContext (conf.tsx:28:41)
    at WithAppContext (appContext.tsx:53:36)
    at Router (react-router-dom.js?v=2ac58ab6:3819:15)
    at BrowserRouter (react-router-dom.js?v=2ac58ab6:4526:5)
    at IndexPage (<anonymous>)
    at PluginManagerProvider (pluginsContext.tsx:11:78)
    at LakeFSApp (lakefsApp.tsx:10:41)
overrideMethod @ hook.js:608
printWarning @ chunk-SKXUPSEW.js?v=2ac58ab6:521
error @ chunk-SKXUPSEW.js?v=2ac58ab6:505
warnOnHookMismatchInDev @ chunk-SKXUPSEW.js?v=2ac58ab6:12146
updateHookTypesDev @ chunk-SKXUPSEW.js?v=2ac58ab6:12116
useContext @ chunk-SKXUPSEW.js?v=2ac58ab6:13348
useContext @ chunk-EFTEWGEA.js?v=2ac58ab6:1062
usePluginManager @ pluginsContext.tsx:20
LoginPage @ login.tsx:148
renderWithHooks @ chunk-SKXUPSEW.js?v=2ac58ab6:12199
updateFunctionComponent @ chunk-SKXUPSEW.js?v=2ac58ab6:14605
beginWork @ chunk-SKXUPSEW.js?v=2ac58ab6:15940
beginWork$1 @ chunk-SKXUPSEW.js?v=2ac58ab6:19774
performUnitOfWork @ chunk-SKXUPSEW.js?v=2ac58ab6:19219
workLoopSync @ chunk-SKXUPSEW.js?v=2ac58ab6:19158
renderRootSync @ chunk-SKXUPSEW.js?v=2ac58ab6:19137
performConcurrentWorkOnRoot @ chunk-SKXUPSEW.js?v=2ac58ab6:18696
workLoop @ chunk-SKXUPSEW.js?v=2ac58ab6:197
flushWork @ chunk-SKXUPSEW.js?v=2ac58ab6:176
performWorkUntilDeadline @ chunk-SKXUPSEW.js?v=2ac58ab6:384
index.js:81  GET http://localhost:3000/api/v1/config 401 (Unauthorized)
apiRequest @ index.js:81
getConfig @ index.js:1085
(anonymous) @ configProvider.tsx:64
commitHookEffectListMount @ chunk-SKXUPSEW.js?v=2ac58ab6:16931
commitPassiveMountOnFiber @ chunk-SKXUPSEW.js?v=2ac58ab6:18174
commitPassiveMountEffects_complete @ chunk-SKXUPSEW.js?v=2ac58ab6:18147
commitPassiveMountEffects_begin @ chunk-SKXUPSEW.js?v=2ac58ab6:18137
commitPassiveMountEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:18127
flushPassiveEffectsImpl @ chunk-SKXUPSEW.js?v=2ac58ab6:19511
flushPassiveEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:19468
(anonymous) @ chunk-SKXUPSEW.js?v=2ac58ab6:19349
workLoop @ chunk-SKXUPSEW.js?v=2ac58ab6:197
flushWork @ chunk-SKXUPSEW.js?v=2ac58ab6:176
performWorkUntilDeadline @ chunk-SKXUPSEW.js?v=2ac58ab6:384

Copy link
Contributor

@nopcoder nopcoder left a 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.

@Annaseli
Copy link
Contributor Author

Annaseli commented Sep 15, 2025

Getting the following error while Login page is loaded:

Navigated to http://localhost:3000/auth/login?next=%2Frepositories&redirected=true
index.js:81  GET http://localhost:3000/api/v1/config 401 (Unauthorized)
apiRequest @ index.js:81
getConfig @ index.js:1085
(anonymous) @ configProvider.tsx:64
commitHookEffectListMount @ chunk-SKXUPSEW.js?v=2ac58ab6:16931
commitPassiveMountOnFiber @ chunk-SKXUPSEW.js?v=2ac58ab6:18174
commitPassiveMountEffects_complete @ chunk-SKXUPSEW.js?v=2ac58ab6:18147
commitPassiveMountEffects_begin @ chunk-SKXUPSEW.js?v=2ac58ab6:18137
commitPassiveMountEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:18127
flushPassiveEffectsImpl @ chunk-SKXUPSEW.js?v=2ac58ab6:19511
flushPassiveEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:19468
(anonymous) @ chunk-SKXUPSEW.js?v=2ac58ab6:19349
workLoop @ chunk-SKXUPSEW.js?v=2ac58ab6:197
flushWork @ chunk-SKXUPSEW.js?v=2ac58ab6:176
performWorkUntilDeadline @ chunk-SKXUPSEW.js?v=2ac58ab6:384
pluginsContext.tsx:20 Warning: React has detected a change in the order of Hooks called by LoginPage. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
1. useContext                 useContext
2. useContext                 useContext
3. useContext                 useContext
4. useContext                 useContext
5. useContext                 useContext
6. useContext                 useContext
7. useContext                 useContext
8. useContext                 useContext
9. useContext                 useContext
10. useContext                useContext
11. useContext                useContext
12. useContext                useContext
13. useRef                    useRef
14. useContext                useContext
15. useLayoutEffect           useLayoutEffect
16. useCallback               useCallback
17. useContext                useContext
18. useContext                useContext
19. useContext                useContext
20. useContext                useContext
21. useContext                useContext
22. useContext                useContext
23. useContext                useContext
24. useContext                useContext
25. useContext                useContext
26. useContext                useContext
27. useContext                useContext
28. useContext                useContext
29. useRef                    useRef
30. useContext                useContext
31. useLayoutEffect           useLayoutEffect
32. useCallback               useCallback
33. useState                  useState
34. useState                  useState
35. useEffect                 useEffect
36. useEffect                 useEffect
37. undefined                 useContext
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Error Component Stack
    at LoginPage (login.tsx:119:20)
    at RenderedRoute (react-router-dom.js?v=2ac58ab6:3491:5)
    at Outlet (react-router-dom.js?v=2ac58ab6:3812:26)
    at div (<anonymous>)
    at ConfigProvider (configProvider.tsx:58:59)
    at Layout (layout.tsx:9:41)
    at RenderedRoute (react-router-dom.js?v=2ac58ab6:3491:5)
    at Routes (react-router-dom.js?v=2ac58ab6:3872:5)
    at WithLoginConfigContext (conf.tsx:28:41)
    at WithAppContext (appContext.tsx:53:36)
    at Router (react-router-dom.js?v=2ac58ab6:3819:15)
    at BrowserRouter (react-router-dom.js?v=2ac58ab6:4526:5)
    at IndexPage (<anonymous>)
    at PluginManagerProvider (pluginsContext.tsx:11:78)
    at LakeFSApp (lakefsApp.tsx:10:41)
overrideMethod @ hook.js:608
printWarning @ chunk-SKXUPSEW.js?v=2ac58ab6:521
error @ chunk-SKXUPSEW.js?v=2ac58ab6:505
warnOnHookMismatchInDev @ chunk-SKXUPSEW.js?v=2ac58ab6:12146
updateHookTypesDev @ chunk-SKXUPSEW.js?v=2ac58ab6:12116
useContext @ chunk-SKXUPSEW.js?v=2ac58ab6:13348
useContext @ chunk-EFTEWGEA.js?v=2ac58ab6:1062
usePluginManager @ pluginsContext.tsx:20
LoginPage @ login.tsx:148
renderWithHooks @ chunk-SKXUPSEW.js?v=2ac58ab6:12199
updateFunctionComponent @ chunk-SKXUPSEW.js?v=2ac58ab6:14605
beginWork @ chunk-SKXUPSEW.js?v=2ac58ab6:15940
beginWork$1 @ chunk-SKXUPSEW.js?v=2ac58ab6:19774
performUnitOfWork @ chunk-SKXUPSEW.js?v=2ac58ab6:19219
workLoopSync @ chunk-SKXUPSEW.js?v=2ac58ab6:19158
renderRootSync @ chunk-SKXUPSEW.js?v=2ac58ab6:19137
performConcurrentWorkOnRoot @ chunk-SKXUPSEW.js?v=2ac58ab6:18696
workLoop @ chunk-SKXUPSEW.js?v=2ac58ab6:197
flushWork @ chunk-SKXUPSEW.js?v=2ac58ab6:176
performWorkUntilDeadline @ chunk-SKXUPSEW.js?v=2ac58ab6:384
index.js:81  GET http://localhost:3000/api/v1/config 401 (Unauthorized)
apiRequest @ index.js:81
getConfig @ index.js:1085
(anonymous) @ configProvider.tsx:64
commitHookEffectListMount @ chunk-SKXUPSEW.js?v=2ac58ab6:16931
commitPassiveMountOnFiber @ chunk-SKXUPSEW.js?v=2ac58ab6:18174
commitPassiveMountEffects_complete @ chunk-SKXUPSEW.js?v=2ac58ab6:18147
commitPassiveMountEffects_begin @ chunk-SKXUPSEW.js?v=2ac58ab6:18137
commitPassiveMountEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:18127
flushPassiveEffectsImpl @ chunk-SKXUPSEW.js?v=2ac58ab6:19511
flushPassiveEffects @ chunk-SKXUPSEW.js?v=2ac58ab6:19468
(anonymous) @ chunk-SKXUPSEW.js?v=2ac58ab6:19349
workLoop @ chunk-SKXUPSEW.js?v=2ac58ab6:197
flushWork @ chunk-SKXUPSEW.js?v=2ac58ab6:176
performWorkUntilDeadline @ chunk-SKXUPSEW.js?v=2ac58ab6:384

@nopcoder
This error also appears on master, so it’s unrelated to the changes in this PR. And it only occurs when running with npm run dev, and not on localhost:8000. I’ll address this issue in a separate PR.

@Annaseli
Copy link
Contributor Author

@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?

@ozkatz
Copy link
Collaborator

ozkatz commented Sep 15, 2025

Looks better! Thank you :)

@Annaseli Annaseli requested a review from nopcoder September 15, 2025 13:11
Copy link
Contributor

@nopcoder nopcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. not. comment.

@@ -64,39 +64,31 @@ const TopNavLink = ({ href, children }) => {
};

const TopNav = ({logged = true}) => {
if (!logged) {
if (logged) {
Copy link
Contributor

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.

@Annaseli Annaseli merged commit 247e86e into master Sep 16, 2025
41 checks passed
@Annaseli Annaseli deleted the task/add_plugin_support_for_login_method_selection_feature-9424 branch September 16, 2025 16:39
nopcoder pushed a commit that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include-changelog PR description should be included in next release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the appearance of the login page
5 participants