-
Notifications
You must be signed in to change notification settings - Fork 233
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
frontend: RecentClusters: Add multi cluster selection feature #2513
base: main
Are you sure you want to change the base?
Conversation
9462687
to
4b35fd4
Compare
If there are multiple clusters then this allows selecting up to three of them from the recent clusters list. If there is a single cluster it acts as before. This feature can be enabled by using: - `REACT_APP_MULTI_ENABLED=true make run-frontend` Signed-off-by: René Dudfield <[email protected]>
This should be replaced by the commits in https://github.com/headlamp-k8s/headlamp/commits/aggregated-view-original-rebased/ (lookout for fixups) related to e9b7f46 . |
The button group showing recent clusters doesn't seem to be very intuitive, I think it would be hard to understand What if we did something like this? (names would still be links, just not shown on the screenshot) |
Yeah, we can add multiple select with checkboxes like that. But I'll explain why I didn't... and then talk about the checkboxes below.
For what it's worth I tried it with two people without prompting "Select multiple clusters" and they figured it out. The third person I just showed the video and they suggested changing it to use the existing Recent cluster cards instead of just the words. Mainly this code is a temporary step to allow something now and until both
The reasons are:
checkboxes versionWhat about these changes to your "selected checkboxes" image above in a temporary step?
(I would keep the changes in Recent clusters except change them to use the existing card design as requested) |
@joaquimrocha we discussed this is a temporary measure for reasons mentioned here. Additionally it was discussed and agreed to take this approach with Chris. First a minimal version that is disabled, and then the full version. |
If this is temporary and was user tested a bit then it's okay, we can do checkboxes later |
@sniok ok For the checkboxes is what I proposed to handle maxium of 3 sound ok? Or if you have any other ideas for that I'd appreciate it. |
Yeah that's reasonable. Although I'm a bit worried about allowed namespaces feature. If we have 2 allowed namespaces for each of 3 selected clusters and go to Workloads page then we'll get (7 workloads)(3 cluster)(2 namespaces) websockets. But it's and edgecase.
I think it's better to disable the "connect" (or "view") button (keep the message, but highlight in red "Selected 4 of 3. Currently only...") but still allow selecting checkboxes, I think it'll be less frustrating |
Thanks @sniok |
ATM we should rather add the named groups feature instead of a radio button based solution. |
}); | ||
|
||
/** Allow selecting multiple recent clusters. */ | ||
const MULTI_ENABLED = import.meta.env.REACT_APP_MULTI_ENABLED === 'true' || true; |
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 am willing to merge this PR as a temporary way to test this, but seems like this is enabled all the time.
|
If there are multiple clusters then this allows selecting up to three of them from the recent clusters list.
If there is a single cluster it acts as before.
This feature can be enabled by using:
REACT_APP_MULTI_ENABLED=true make run-frontend
Screenshot
Here we see a toggle button group of the three most recently used clusters.
As a bonus this fixes a bug:
How to test