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

ODC-7770: Remove perspective switcher if only one perspective is present #14762

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

Conversation

logonoff
Copy link
Member

https://issues.redhat.com/browse/ODC-7770

before:

Screenshot From 2025-02-12 16-39-29

after:

Screenshot From 2025-02-12 16-47-02

/assign @vikram-raj @sanketpathak

/label px-approved docs-approved acknowledge-critical-fixes-only

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 12, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 12, 2025

@logonoff: This pull request references ODC-7770 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

https://issues.redhat.com/browse/ODC-7770

before:

Screenshot From 2025-02-12 16-39-29

after:

Screenshot From 2025-02-12 16-47-02

/assign @vikram-raj @sanketpathak

/label px-approved docs-approved acknowledge-critical-fixes-only

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from jhadvig and kyoto February 12, 2025 21:50
@openshift-ci openshift-ci bot added component/core Related to console core functionality px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. labels Feb 12, 2025
appendTo: () =>
document.querySelector("[data-test-id='perspective-switcher-toggle']"),
}}
return activePerspective !== ACM_PERSPECTIVE_ID && perspectiveItems.length > 1 ? (
Copy link
Member

Choose a reason for hiding this comment

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

Does this logic work properly with ACM since we handle that perspective specially? If it's just the admin and acm perspectives, is the dropdown still hidden?

cc @KevinFCormier

Choose a reason for hiding this comment

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

Good question. FWIW, I have advocated for the removal of the special treatment of the "All Clusters" perspective since it causes confusion frequently when people expect the switcher to list all managed clusters, and further, ACM is introducing the ability to refer to "local-cluster" by any name the user chooses. Unsure what we would call this perspective though.

Copy link
Member

Choose a reason for hiding this comment

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

Let's re-open this discussion since we're changing perspectives anyway... The cluster dropdown seems to create confusion, and we don't have any near term plans to add other clusters to the list. Can we make ACM a normal perspective? And what should it be called? cc @imjoyjean @kevinhatchoua

@logonoff Let's update the logic in this PR to handle ACM properly and make any ACM perspective changes in a follow-up. You should filter out the ACM perspective from the array before checking the length since ACM doesn't show up in this dropdown.

@logonoff
Copy link
Member Author

/retest

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

👍

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 18, 2025
@spadgett
Copy link
Member

/lgtm cancel

@logonoff Sorry, I looked again at the code, and it seems ACM is already filtered out from perpsectiveItems. We can remove the additional filter. My fault.

@openshift-ci openshift-ci bot removed lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 18, 2025
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2025
Copy link
Contributor

openshift-ci bot commented Feb 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, spadgett

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2025
Copy link
Contributor

openshift-ci bot commented Feb 18, 2025

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@invincibleJai
Copy link
Member

/cc @sanketpathak for QE review

@openshift-ci openshift-ci bot requested a review from sanketpathak February 19, 2025 05:44
Copy link
Contributor

openshift-ci bot commented Feb 19, 2025

@invincibleJai: GitHub didn't allow me to request PR reviews from the following users: for, QE, review.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @sanketpathak for QE review

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants