Skip to content

Move cluster chooser to the sidebar #3504

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joaquimrocha
Copy link
Contributor

@joaquimrocha joaquimrocha commented Jun 20, 2025

This does the following:

  1. Adds support for sidebar items to support an action (like the favorites PR does)
  2. Moves the cluster chooser to the cluster sidebar item
  3. Removes the topbar cluster chooser (leaves the logic for the plugins who override it though)

Screenshot showing the cluster chooser action
Screenshot showing the cluster chooser opened

What's missing

  • Support for plugins to override the cluster chooser action
  • Check if/how plugins can register these actions
  • Make the cluster chooser work while the sidebar is collapsed (due to the actions not being shown, the chooser is not displayed)

How to test

  • Go to a cluster view -> Verify the top cluster chooser button is no longer visible
  • Verify there's a new button in the cluster sidebar item, click it (or use Ctrl+Shift+L) -> The cluster chooser popup is shown

Since I may not be able to advance much more on it, I'd like @sniok to check it out and eventually add the missing parts (the branch is in the headlamp-k8s org).

fixes #3189

This action is shown at the end of the sidebar item and can be used
to display things like e.g. a cluster chooser, a bookmark/favorites
button, etc.

Signed-off-by: Joaquim Rocha <joaquim.rocha@microsoft.com>
@k8s-ci-robot k8s-ci-robot requested review from skoeva and vyncent-t June 20, 2025 22:24
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joaquimrocha

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 20, 2025
And disable the cluster chooser button. The logic for the cluster
chooser button however remains, in order to support the plugin-registered
chooser components.

Signed-off-by: Joaquim Rocha <joaquim.rocha@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Development

Successfully merging this pull request may close these issues.

Irrelevant cluster selector button
2 participants