Skip to content

SRVKP-12918: Fix responsive toolbar filter count to show active filter categories instead of total chips - #1217

Open
ankrsinha wants to merge 1 commit into
openshift-pipelines:masterfrom
ankrsinha:fix/SRVKP-12918
Open

SRVKP-12918: Fix responsive toolbar filter count to show active filter categories instead of total chips#1217
ankrsinha wants to merge 1 commit into
openshift-pipelines:masterfrom
ankrsinha:fix/SRVKP-12918

Conversation

@ankrsinha

@ankrsinha ankrsinha commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Migration
  • CVE Fix

Summary

Fixes the responsive toolbar badge on PipelineRuns and TaskRuns list pages to display the number of active filter categories instead of the total number of selected filter values.

Problem:

When the toolbar collapses on smaller viewports, PatternFly counts every chip across all ToolbarFilter components.
Ex - Selecting both "Cluster" and "Archived" in the Data source filter plus a Time Range counted as 3, even though only 2 filter categories are active.

Fix:

Added activeFilterCount that counts filter categories with at least one selected value, and overrides PF's default count via the numberOfFiltersText prop on Toolbar.

Screen Recordings / Screenshot

Screencast.From.2026-07-28.17-27-41.mp4

@openshift-ci-robot

openshift-ci-robot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

@ankrsinha: This pull request references SRVKP-12918 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 bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Migration
  • CVE Fix

Summary

Fixes the responsive toolbar badge on PipelineRuns and TaskRuns list pages to display the number of active filter categories instead of the total number of selected filter values.

Problem:

When the toolbar collapses on smaller viewports, PatternFly counts every chip across all ToolbarFilter components.
Ex - Selecting both "Cluster" and "Archived" in the Data source filter plus a Time Range counted as 3, even though only 2 filter categories are active.

Fix:

Added activeFilterCount that counts filter categories with at least one selected value, and overrides PF's default count via the numberOfFiltersText prop on Toolbar.

Screen Recordings / Screenshot

Screencast.From.2026-07-27.14-22-06.mp4

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.

@qodo-code-review

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Warning

/review is deprecated. Use /agentic_review instead (removal date not yet scheduled).

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Incorrect Pluralization

Building the badge text by concatenating the count with t('filters applied') produces grammatically incorrect text for one active category and prevents translators from reordering or pluralizing the full message. Pass the count as an interpolation/pluralization parameter to a complete translation string.

numberOfFiltersText={() => `${activeFilterCount} ${t('filters applied')}`}
customLabelGroupContent={

…d of total chips

Signed-off-by: Ankur Sinha <anksinha@redhat.com>

@adityavshinde adityavshinde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we change the description's screen recording, as it is showing "1 filters applied" but it is showing correct while I was reviewing ("1 filter applied") ?
The code changes are working fine.

Screencast.From.2026-07-28.16-56-44.mp4

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Looks Good to Me Label label Jul 28, 2026
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adityavshinde, ankrsinha
Once this PR has been reviewed and has the lgtm label, please assign arvindk-softwaredev for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@ankrsinha

Copy link
Copy Markdown
Contributor Author

Can we change the description's screen recording, as it is showing "1 filters applied" but it is showing correct while I was reviewing ("1 filter applied") ? The code changes are working fine.

Screencast.From.2026-07-28.16-56-44.mp4
/lgtm

Okay, i will update the screen recording in the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants