Skip to content
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

Use dropdown for session options when many choices #2461

Merged
merged 15 commits into from
Apr 17, 2023

Conversation

leafty
Copy link
Member

@leafty leafty commented Apr 11, 2023

The button group used for session options is replaced with a dropdown
menu when there are more than 5 choices. This is done to avoid choices
spilling over other options.

Fixes #2237.

/deploy #persist #cypress

@leafty leafty changed the title Leafty/2237 fix session options Use dropdown for session options when many choices Apr 11, 2023
The button group used for session options is replaced with a dropdown
menu when there are more than 5 choices. This is done to avoid choices
spilling over other options.

Fixes #2237.
@leafty leafty force-pushed the leafty/2237-fix-session-options branch from f8058a6 to 74d4601 Compare April 11, 2023 15:35
@leafty
Copy link
Member Author

leafty commented Apr 12, 2023

Current UI, without a lot of styling:
leafty dev renku ch_projects_workflows-pet-projects_workflows-flights-tutorial_sessions_new_
leafty dev renku ch_projects_workflows-pet-projects_workflows-flights-tutorial_sessions_new_ (1)

Note: the dropdown is configured to go "down" but I think it goes up because there are too many options.

@RenkuBot
Copy link
Contributor

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

@leafty leafty temporarily deployed to renku-ci-ui-2461 April 12, 2023 11:53 — with GitHub Actions Inactive
@leafty leafty temporarily deployed to renku-ci-ui-2461 April 12, 2023 14:15 — with GitHub Actions Inactive
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Nice solution using CSS modules!

Apart from a couple of linting errors to fix, it would be nice to use the same thicker border already in use for the selected radio button. Otherwise, it feels "unselected".

image

I noticed the size is also slightly different; perhaps it's related to the borders? Please double-check it again after adjusting borders just to be on the safe side 😁

image

@leafty
Copy link
Member Author

leafty commented Apr 13, 2023

Added a helper function to estimate the size of the button group and use the dropdown when > 250px.

image
image

@leafty leafty temporarily deployed to renku-ci-ui-2461 April 13, 2023 09:49 — with GitHub Actions Inactive
@leafty leafty marked this pull request as ready for review April 13, 2023 11:23
@leafty leafty requested a review from a team as a code owner April 13, 2023 11:23
@leafty leafty temporarily deployed to renku-ci-ui-2461 April 13, 2023 11:23 — with GitHub Actions Inactive
@leafty leafty requested a review from lorenzo-cavazzi April 13, 2023 11:24
@leafty leafty temporarily deployed to renku-ci-ui-2461 April 13, 2023 18:42 — with GitHub Actions Inactive
@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-ui-2461 April 13, 2023 19:28 — with GitHub Actions Inactive
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Excellent solution, it works well!

@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-ui-2461 April 13, 2023 20:15 — with GitHub Actions Inactive
@leafty leafty had a problem deploying to renku-ci-ui-2461 April 14, 2023 09:37 — with GitHub Actions Failure
@leafty leafty temporarily deployed to renku-ci-ui-2461 April 14, 2023 09:39 — with GitHub Actions Inactive
@leafty leafty requested a review from lorenzo-cavazzi April 14, 2023 11:03
@leafty leafty temporarily deployed to renku-ci-ui-2461 April 14, 2023 11:47 — with GitHub Actions Inactive
@lorenzo-cavazzi lorenzo-cavazzi deployed to renku-ci-ui-2461 April 14, 2023 16:40 — with GitHub Actions Active
@leafty leafty merged commit 631df8b into master Apr 17, 2023
@leafty leafty deleted the leafty/2237-fix-session-options branch April 17, 2023 06:33
@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.

Group buttons in sessions not reachable
3 participants