-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(ws): add namespace dropdown to UI #154
Conversation
YosiElias
commented
Dec 5, 2024
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.
Hi @YosiElias , thanks for the PR! I added a few comments inline, and I would like to ask you a few things to align this PR with the Kubeflow contributing guide and to make the review easier:
- I can see a few extra commits in this PR's branch, please consider adding just the one related to your changes, with your sign-off.
- To follow the commit naming convention, please consider having the text "
feat(ws): Notebooks 2.0 // Frontend // Namespace selector
" for the commit message and PR label.
Also please consider adding some Cypress tests to automate the namespace changing verification. Thanks!
@@ -0,0 +1,9 @@ | |||
import { useEffect } from "react" | |||
|
|||
const useMount = (callback:()=>void): void => { |
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.
IMHO, the useEffect
could be used directly, without this hook.
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.
It is a preparation for future useEffect calls without dependencies, meaning, it's much for "readable" and compact this way in our opinion (one line simple call wrapping a function, instead of whole useEffect syntax)
If you still think a direct useEffect call is better, we will refactor it back.
72f6ab6
to
fee7584
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.
If you make the changes I suggested, you can then run the following in the frontend/
dir:
npm run test:fix
and that should fix your CI failure.
workspaces/frontend/src/app/context/NamespaceContextProvider.tsx
Outdated
Show resolved
Hide resolved
38e5ed6
to
fd04832
Compare
f830c37
to
3a985e3
Compare
Signed-off-by: yelias <yossi.elias@nokia.com>
Signed-off-by: yelias <yossi.elias@nokia.com>
3a985e3
to
59127ec
Compare
59127ec
to
60ee75b
Compare
60ee75b
to
b52b774
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.
I think it looks good nice work!
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.
Thanks @YosiElias , just a few small comments, otherwise LGTM!
workspaces/frontend/src/__tests__/cypress/cypress/tests/e2e/NamespaceSelector.cy.ts
Outdated
Show resolved
Hide resolved
workspaces/frontend/src/app/context/NamespaceContextProvider.tsx
Outdated
Show resolved
Hide resolved
workspaces/frontend/src/app/context/NamespaceContextProvider.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: yelias <yossi.elias@nokia.com>
b52b774
to
8552a96
Compare
Thank you @paulovmr and @Griffin-Sullivan for the comments! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ederign, Griffin-Sullivan, paulovmr 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 |
/lgtm |
Thank you for the PR @YosiElias ! |