-
Notifications
You must be signed in to change notification settings - Fork 6
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: display session details in session page Renku 2.0 #3258
Conversation
You can access the deployment of this PR at https://renku-ci-ui-3258.dev.renku.ch |
5e10098
to
2f82d5c
Compare
2f82d5c
to
5289676
Compare
5289676
to
5b863f7
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.
Nice changes!
The code looks overall good, but there are a few details that require adjustments before merging -- see inline comments.
)} | ||
> | ||
<div className={cx("px-3", "text-white")}>{sessionName}</div> | ||
<div className={cx("px-3", "text-truncate")}> |
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 to adjust the vertical alignment -- the difference is subtle
<div className={cx("px-3", "text-truncate")}> | |
<div className={cx("d-flex", "px-3", "text-truncate")}> |
@@ -220,10 +232,17 @@ export default function ShowSessionPage() { | |||
"d-flex", | |||
"flex-grow-1", | |||
"justify-content-between", | |||
"py-2" | |||
"py-2", | |||
"text-truncate" |
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.
text-truncate
is actually a good idea here 👍
I suggest adjusting this and the two children components to improve the UX. I see the following 2 problems:
-
With the vertical padding here and no padding in the button for opening the modal, the vertical clickable area is reduced.
Removing the padding here and leaving the button padding would be better. You can adjust the icon position by playing withalign-items-center
. -
(nitpick) There is a bigger gap between the text and the logo when the space is tight
After addressing the previous point, you might need to change the padding in the icon. You probably need only the right padding (pe-3
, depending on the other code changes).
slug: project?.slug, | ||
}); | ||
|
||
if (isLoadingLaunchers || isLoadingProject) return <Loader />; |
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.
> | ||
<Journals className="bi" /> | ||
<span className="visually-hidden">Resources</span> | ||
<FileEarmarkText className={cx("bi", "me-1")} /> |
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 (isLoadingLaunchers || isLoadingProject) return <Loader />; | ||
if (launchersError || !launcher) return <i>Session not accessible</i>; |
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.
const detailsModal = project && session && projectUrl && ( | ||
<Modal backdrop="static" centered isOpen={isOpen} size="lg" toggle={toggle}> | ||
<ModalHeader toggle={toggle}>Session details {launcher.name}</ModalHeader> | ||
<ModalBody> |
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 spacing is a little messed up here: you always add the class mb-2
to the divs, but sometimes they contain a single p
child with a bigger bottom margin (equivalent to mb-3
) making the class useless, while in other cases the margin is applied but other components add additional vertical margins (see CommandCopy
).
I suggest:
- Remove the margins within the child components. Depending on the case, you might drop the
div
entirely leaving ap className="mb-0"
, or drop themb-2
on the div, or use properties to remove the margins like in<CommandCopy noMargin ... />
. - Handle the spacing between the children at the parent component by adding
d-flex, flex-column, gap-3
Show session name in show session page and open session details, remove docs and cheat sheet modal
bfbc368
to
8cbe1a2
Compare
Thank you, @lorenzo-cavazzi, for your review and suggestions. I've applied those changes in the latest commit. They make a lot of sense! |
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.
Looks great! Just a tiny detail before merging
className={cx( | ||
"d-block", | ||
"d-lg-flex", | ||
"pb-2", | ||
"pb-lg-0", | ||
"gap-2", | ||
"align-items-center" | ||
)} |
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.
No need to add additional space on the bottom since the spacing is already handled by the parent component with gap-3
className={cx( | |
"d-block", | |
"d-lg-flex", | |
"pb-2", | |
"pb-lg-0", | |
"gap-2", | |
"align-items-center" | |
)} | |
className={cx( | |
"d-block", | |
"d-lg-flex", | |
"gap-2", | |
"align-items-center" | |
)} |
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 @lorenzo-cavazzi I have removed the unnecessary style
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.
🚀
Tearing down the temporary RenkuLab deplyoment for this PR. |
PR to address small issues in Renku v2
Issues:
What is included in this PR:
/deploy