Skip to content

[release-4.21] OCPBUGS-80931: Hide filter category selector when only one filter exists#16199

Open
rhamilto wants to merge 1 commit intoopenshift:release-4.21from
rhamilto:OCPBUGS-80931
Open

[release-4.21] OCPBUGS-80931: Hide filter category selector when only one filter exists#16199
rhamilto wants to merge 1 commit intoopenshift:release-4.21from
rhamilto:OCPBUGS-80931

Conversation

@rhamilto
Copy link
Member

Summary

Cherry-pick of OCPBUGS-78543 to release-4.21 branch. This improves UX by hiding the filter category dropdown selector when there's only one filter type available in ConsoleDataView.

Changes

  • Added ConsoleDataView.scss with .co-console-data-view-single-filter class
  • Applied class to DataView component when single filter is present
  • Imported CSS utilities and stylesheet in ConsoleDataView.tsx
  • Added Cypress test to verify category selector is hidden for both text and select filter types
  • Added reusable test helper verifySingleFilterCategoryHidden
  • Updated alertmanager receiver tests for consistency

The CSS uses !important to ensure the rule works across all breakpoints and targets the first child of the filter group (the category selector).

Test plan

  • Verify filter category selector is hidden when only one filter exists
  • Test with text-only filter (e.g., AlertmanagerConfig page)
  • Test with select-only filter (e.g., Pod search page)
  • Verify multiple filters still show the category selector
  • Run Cypress tests to ensure new tests pass

🤖 Generated with Claude Code

Adds CSS to hide the filter category dropdown selector when there's only
one filter type available in ConsoleDataView, improving UX by removing
unnecessary UI elements.

Changes:
- Create ConsoleDataView.scss with `.co-console-data-view-single-filter` class
- Apply class to DataView component when single filter is present
- Import CSS utilities and stylesheet in ConsoleDataView.tsx
- Add Cypress test to verify category selector is hidden for both text and select filter types
- Add reusable test helper `verifySingleFilterCategoryHidden`

The CSS uses `!important` to ensure the rule works across all breakpoints
and targets the first child of the filter group (the category selector).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 26, 2026
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-80931, which is invalid:

  • expected dependent Jira Issue OCPBUGS-78543 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

Cherry-pick of OCPBUGS-78543 to release-4.21 branch. This improves UX by hiding the filter category dropdown selector when there's only one filter type available in ConsoleDataView.

Changes

  • Added ConsoleDataView.scss with .co-console-data-view-single-filter class
  • Applied class to DataView component when single filter is present
  • Imported CSS utilities and stylesheet in ConsoleDataView.tsx
  • Added Cypress test to verify category selector is hidden for both text and select filter types
  • Added reusable test helper verifySingleFilterCategoryHidden
  • Updated alertmanager receiver tests for consistency

The CSS uses !important to ensure the rule works across all breakpoints and targets the first child of the filter group (the category selector).

Test plan

  • Verify filter category selector is hidden when only one filter exists
  • Test with text-only filter (e.g., AlertmanagerConfig page)
  • Test with select-only filter (e.g., Pod search page)
  • Verify multiple filters still show the category selector
  • Run Cypress tests to ensure new tests pass

🤖 Generated with Claude Code

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 26, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c2a47fc2-47bc-493f-8a2a-ce813cd7b26c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@rhamilto rhamilto changed the title OCPBUGS-80931: Hide filter category selector when only one filter exists [release-4.21] OCPBUGS-80931: Hide filter category selector when only one filter exists Mar 26, 2026
@openshift-ci openshift-ci bot requested review from TheRealJon and spadgett March 26, 2026 12:05
@openshift-ci openshift-ci bot added component/core Related to console core functionality kind/cypress Related to Cypress e2e integration testing approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 26, 2026
@rhamilto
Copy link
Member Author

/approve
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Mar 26, 2026
@rhamilto
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-80931, which is invalid:

  • expected dependent Jira Issue OCPBUGS-78543 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is MODIFIED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/jira refresh

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.

@sg00dwin sg00dwin added the verified Signifies that the PR passed pre-merge verification criteria label Mar 26, 2026
@sg00dwin
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 26, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, sg00dwin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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
Copy link
Contributor

openshift-ci bot commented Mar 26, 2026

@rhamilto: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. component/core Related to console core functionality jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants