Skip to content

feat: add Session Improvements #3659

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

Merged
merged 21 commits into from
May 12, 2025
Merged

Conversation

andre-code
Copy link
Contributor

@andre-code andre-code commented Apr 25, 2025

This PR includes a set of enhancements and UI refinements to improve the session launcher and session-related views:

✨ Features:

  1. Added a documentation link to assist users in setting up a custom environment and remove toggle of Advance settings.
    Screenshot 2025-05-05 at 11 50 37

  2. Implemented new proposal for environment icons in the environment selector.

  3. Reordered session launcher options and updated copy text on action buttons.
    Screenshot 2025-05-05 at 11 51 44

  4. Added a share link button on the show session page.
    Screenshot 2025-05-05 at 11 52 42

  5. Updated copy text for the shared session link
    Screenshot 2025-05-05 at 11 52 56

  6. Modified session tiles to show session details on hover instead of on click.
    Screenshot 2025-05-05 at 11 54 01

  7. Repositioned error/success messages closer to the update button.
    Screenshot 2025-05-05 at 11 54 51

  8. Disabled search functionality in the code repository selector and show code repository name for better UX
    Screenshot 2025-05-05 at 11 56 03

🐛 Fixes:

  • Fixed navigation to the show session page after resuming a session.

/deploy renku=andrea/session-improvements extra-values=dataService.imageBuilders.enabled=true,dataService.imageBuilders.pushSecretName=harbor-secret,dataService.imageBuilders.outputImagePrefix=harbor.dev.renku.ch/andrea-dev/

@andre-code andre-code changed the base branch from main to andrea/add-new-session-card-design April 25, 2025 08:11
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 April 25, 2025 08:11 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-3659.dev.renku.ch

@andre-code andre-code temporarily deployed to renku-ci-ui-3659 April 25, 2025 09:17 — with GitHub Actions Inactive
@andre-code andre-code force-pushed the andrea/add-new-session-card-design branch from 33ac8a8 to 23b76e2 Compare April 29, 2025 06:01
@andre-code andre-code force-pushed the andrea/other-session-improvements branch from 1d86cf3 to ce6f270 Compare April 29, 2025 06:41
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 April 29, 2025 06:41 — with GitHub Actions Inactive
@andre-code andre-code force-pushed the andrea/add-new-session-card-design branch from 23b76e2 to 863ca6e Compare April 29, 2025 06:56
@andre-code andre-code force-pushed the andrea/other-session-improvements branch from ce6f270 to 91eae40 Compare April 29, 2025 06:57
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 April 29, 2025 06:57 — with GitHub Actions Inactive
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 April 30, 2025 09:38 — with GitHub Actions Inactive
@andre-code andre-code force-pushed the andrea/add-new-session-card-design branch from 275eb89 to 8373c13 Compare May 2, 2025 09:12
@andre-code andre-code force-pushed the andrea/other-session-improvements branch from 85e0f94 to aa6284e Compare May 2, 2025 10:49
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 2, 2025 10:49 — with GitHub Actions Inactive
@andre-code andre-code force-pushed the andrea/add-new-session-card-design branch from 8373c13 to dd36bf5 Compare May 5, 2025 10:09
@andre-code andre-code changed the title feat: add session improvements II feat: add Session Improvements May 5, 2025
@andre-code andre-code force-pushed the andrea/other-session-improvements branch from a0e42a8 to 695f2d4 Compare May 5, 2025 10:28
Base automatically changed from andrea/add-new-session-card-design to main May 5, 2025 11:56
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 5, 2025 13:52 — with GitHub Actions Inactive
@andre-code andre-code force-pushed the andrea/other-session-improvements branch from b632052 to b36744e Compare May 6, 2025 07:17
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 6, 2025 07:17 — with GitHub Actions Inactive
@andre-code andre-code marked this pull request as ready for review May 6, 2025 07:19
@andre-code andre-code requested a review from a team as a code owner May 6, 2025 07:19
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 6, 2025 07:53 — with GitHub Actions Inactive
@leafty leafty self-assigned this May 7, 2025
<div className={cx("d-flex", "gap-2")}>
<img
src={sessionStyles.sessionIcon}
alt="Session icon indicator"
Copy link
Member

Choose a reason for hiding this comment

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

Improvement: make the alt text reflect the status of the session

Comment on lines 525 to 532
const { launcherId } = useMemo(() => {
if (session == null) {
return { launcherId: undefined };
}
return {
launcherId: session.launcher_id,
};
}, [session]);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const { launcherId } = useMemo(() => {
if (session == null) {
return { launcherId: undefined };
}
return {
launcherId: session.launcher_id,
};
}, [session]);
const launcherId = session?.launcher_id;

import useSessionStartLink from "./useSessionStartLink.hook";

interface SessionStartLinkModalProps {
isOpen: boolean;
launcher: SessionLauncher;
project: Project;
launcherId: Ulid;
Copy link
Member

Choose a reason for hiding this comment

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

This is just a string for the client:

Suggested change
launcherId: Ulid;
launcherId: string;

}: {
launcher: SessionLauncher;
project: Project;
launcherId: Ulid;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
launcherId: Ulid;
launcherId: string;

@@ -160,7 +161,7 @@ function CodeRepositorySelect({
inputId="builder-environment-code-repository-select-input"
name={name}
isClearable={false}
isSearchable
isSearchable={false}
Copy link
Member

Choose a reason for hiding this comment

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

Why? It works and is useful for cases with a lot of repositories. This is not an improvement, this is a downgrade!! 😢

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, however, users can easily misunderstand how the search logic works in this context. In one case, a user pasted a repository URL into the search bar without realizing that it hadn't matched an existing repository. The input silently switched to an existing repo, and the user didn’t notice the change. As a result, they launched a session using the wrong repository.

To avoid this kind of confusion, our longer-term goal is to include a clear option to add a new repository explicitly when launching a session. For now, though, this change already helps mitigate a major source of user frustration.

Copy link
Member

Choose a reason for hiding this comment

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

I very much disagree here, look at this project -> https://dev.renku.ch/v2/projects/flora.thiebaut/flora-test-many-repos. How is it an improvement to remove the search bar here?!? With the search feature, I can easily pick which repository I want to use without having to scroll and find the repository I need.

I don't think that the search is causing a major frustration. Its absence is doing that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! You’re totally right — the search is super handy when there are lots of repositories, and I get why removing it feels like a step back.

That said, in testing, most projects had just one or two repos, and we saw users getting confused. One person pasted a repo URL, and because it didn’t exactly match anything, the input silently picked a different repo — they didn’t notice, and ended up launching the session with the wrong one. That caused a lot of frustration.

I think both situations are frustrating in their own way, which is why we want to fix them separately. Ideally, we’d add something like a clear “+ Add new repository” button that opens a modal or something more obvious.

Comment on lines 88 to 92
<ExternalLink
role="text"
url={Links.RENKU_2_HOW_TO_USE_OWN_DOCKER_IMAGE}
title="documentation"
/>{" "}
Copy link
Member

Choose a reason for hiding this comment

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

Include the box arrow up right icon in the link here.

<InfoAlert dismissible={false} timeout={0}>
<p className="mb-0">
Please see the{" "}
<ExternalLink
Copy link
Member

Choose a reason for hiding this comment

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

Same here, include the external link icon.

import { Loader } from "../../../../components/Loader";
import { Links } from "../../../../utils/constants/Docs.js";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { Links } from "../../../../utils/constants/Docs.js";
import { Links } from "../../../../utils/constants/Docs";

"flex-row",
"gap-3",
"text-center",
"text-md-start"
Copy link
Member

Choose a reason for hiding this comment

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

Add align-items-center here for nicer looks: see it fixed here on the last option.
Screenshot 2025-05-07 at 08 08 31

- show icon external link for documentation
- make icon alt status show the current session status
- fix vertical alignment in environment selector
- use type string for launcherId instead of Ulid
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 7, 2025 09:13 — with GitHub Actions Inactive
@andre-code
Copy link
Contributor Author

Thanks @leafty for the review!
I’ve added your suggestions in the latest commit.

@andre-code andre-code requested a review from leafty May 7, 2025 09:14
if (!status.message) return null;

const popover = (
<UncontrolledPopover target={uid} trigger="legacy" placement="bottom">
<UncontrolledPopover target={ref} trigger="hover" placement="bottom">
Copy link
Member

Choose a reason for hiding this comment

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

For accessibility:

Suggested change
<UncontrolledPopover target={ref} trigger="hover" placement="bottom">
<UncontrolledPopover target={ref} placement="bottom">

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok! Hover or focus works well, still mobile-friendly that way.

@@ -223,16 +232,18 @@ export function SessionListRowStatusExtraDetailsV2({
return (
<>
{" "}
<span id={uid} className={cx("text-muted", "cursor-pointer")}>
(Click here for details.)
<span ref={ref} className={cx("text-muted", "cursor-pointer")}>
Copy link
Member

Choose a reason for hiding this comment

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

For accessibility:

Suggested change
<span ref={ref} className={cx("text-muted", "cursor-pointer")}>
<span ref={ref} className={cx("text-muted", "cursor-pointer")} tabIndex={0}>

See: https://getbootstrap.com/docs/5.3/components/tooltips/#disabled-elements

@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 8, 2025 18:51 — with GitHub Actions Inactive
@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 9, 2025 10:31 — with GitHub Actions Inactive
@andre-code andre-code requested a review from leafty May 9, 2025 10:50
Comment on lines +227 to +229
onClick={(event) => {
event.stopPropagation();
}}
Copy link
Member

Choose a reason for hiding this comment

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

This is not needed, popovers are created outside of the app root.

@andre-code andre-code temporarily deployed to renku-ci-ui-3659 May 9, 2025 14:06 — with GitHub Actions Inactive
if (!status.message) return null;

const popover = (
<UncontrolledPopover target={uid} trigger="legacy" placement="bottom">
<UncontrolledPopover target={ref} trigger="hover focus" placement="bottom">
Copy link
Member

Choose a reason for hiding this comment

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

Note: "focus" does not allow users to select the text inside the popover.

Copy link
Member

Choose a reason for hiding this comment

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

maybe try "hover click" for the trigger

leafty
leafty previously approved these changes May 9, 2025
@andre-code
Copy link
Contributor Author

@leafty I reverted the last change because it was causing the side panel to open when clicking inside the popover body. I verified that it's still possible to copy the text inside the popover.

@andre-code andre-code requested a review from leafty May 12, 2025 07:43
@andre-code andre-code merged commit a0caa13 into main May 12, 2025
38 checks passed
@andre-code andre-code deleted the andrea/other-session-improvements branch May 12, 2025 08:28
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants