Skip to content

fix: Console-like list toolbar spacing/alignment and Rollout status filter - #365

Open
aali309 wants to merge 2 commits into
redhat-developer:mainfrom
aali309:GITOPS-12257
Open

aali309 wants to merge 2 commits into
redhat-developer:mainfrom
aali309:GITOPS-12257

Conversation

@aali309

@aali309 aali309 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

See: https://redhat.atlassian.net/browse/GITOPS-12257
What this PR does:

  • Fixes the big empty gap on list pages (Applications, etc.) so layout matches Console: filters → top pagination → chips/Clear all → table.
  • Moves top pagination into GitOpsListPageToolbar; table keeps only the bottom pager.
  • Keeps Manage columns next to Search (or Argo CD on History/Sources) with correct alignment.
  • Fixes Rollout/Pod status filters so a selected status with count 0 no longer still shows rows. (NEW BUG FOUND)

Before:

Screenshot 2026-12-01 at 11 40 14 AM

After:
Screenshot 2026-12-01 at 1 28 39 PM

Rollout status filter before:
Screenshot 2026-12-01 at 1 30 57 PM

Rollout status filter after:
Screenshot 2026-12-01 at 1 19 26 PM

…ilter

Signed-off-by: Atif Ali <atali@redhat.com>
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Pagination controls now appear in the toolbar across GitOps lists and detail views, alongside filters and actions.
    • Top-of-table pagination remains available where appropriate, including when lists are empty.
  • Bug Fixes
    • Rollout and pod status filters now consistently match selected statuses and exclude items without a status when specific statuses are selected. With no statuses selected, all items remain visible.
    • Pagination and toolbar layouts are more consistent across views.

GitOps list views now place pagination controls in their toolbars, with configurable table pagination for views that retain a top pager. Rollout and pod status filters use shared logic that requires a defined matching phase when statuses are selected.

Changes: List Pagination

Layer / File(s) Summary
Data-view pager rendering
src/gitops/components/shared/DataView/GitOpsDataViewTable.tsx, src/gitops/components/shared/DataView/GitOpsDataViewTable.scss, src/gitops/components/shared/DataView/index.ts
The table supports a configurable top pager and a separate bottom pager. GitOpsListPagination is exported, and pagination styles reflect the updated placement.
Toolbar pagination layout
src/gitops/components/shared/GitOpsListPageToolbar.tsx, src/gitops/components/shared/GitOpsListPageToolbar.scss
The toolbar accepts pagination content and renders it in a dedicated row. Its layout arranges filters, column management, actions, and pagination.
List-view pagination integration
src/gitops/components/application/*, src/gitops/components/project/*, src/gitops/components/shared/*, src/gitops/components/imageupdater/*, src/gitops/components/rollout/*
These views add toolbar pagination under their item-count, error, and view conditions. They set top-pager visibility for their table views.

Rollout and Pod Status Filtering

Layer / File(s) Summary
Shared selected-phase matching
src/gitops/components/rollout/utils/rollout-utils.ts, src/gitops/components/rollout/utils/rollout-utils.test.ts, src/gitops/components/rollout/RolloutList.tsx, src/gitops/components/rollout/components/PodList/PodList.tsx
The rollout and pod filters use shared phase-matching logic. With no selected statuses, the filters accept all items. With selected statuses, they accept only items with a defined phase that matches a selection.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Suggested reviewers: keithchong

Merge Risk: Minimal · up to a72d6

This change moves list-page pagination into the toolbar and fixes status filters so selecting a status with a zero count no longer leaves rows visible. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two main parts of the changeset: list toolbar spacing and alignment (top pagination moved into GitOpsListPageToolbar, Manage columns alignment) and the Rollout status filter fix (m…
Description check Passed The description states the purpose of the PR: fixing list page layout to match Console, moving top pagination into the toolbar, keeping Manage columns aligned, and fixing Rollout/Pod status filters. I…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main parts of the changeset: list toolbar spacing and alignment (top pagination moved into GitOpsListPageToolbar, Manage columns alignment) and the Rollout status filter fix (matchesSelectedStatusPhase). It is a single sentence, though it is somewhat long at 74 characters.

Full details: Description check

Explanation

The description states the purpose of the PR: fixing list page layout to match Console, moving top pagination into the toolbar, keeping Manage columns aligned, and fixing Rollout/Pod status filters. It links the Jira ticket and includes before/after screenshots. It relates directly to the changeset.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b37ffbc1-8d61-4b78-930f-067042cfa5e2
Commits

Reviewing files that changed from the base of the PR and between 658d282 and a72d605.

Files selected for processing: 5

  • src/gitops/components/rollout/RolloutList.tsx
  • src/gitops/components/rollout/components/PodList/PodList.tsx
  • src/gitops/components/rollout/utils/rollout-utils.test.ts
  • src/gitops/components/rollout/utils/rollout-utils.ts
  • src/gitops/components/shared/GitOpsListPageToolbar.scss
Files skipped from review as they are similar to previous changes: 1

  • src/gitops/components/shared/GitOpsListPageToolbar.scss

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@openshift-ci
openshift-ci Bot requested review from keithchong and wtam2018 December 1, 2026 18:31
@codecov-commenter

codecov-commenter commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.14286% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.67%. Comparing base (3bd1dab) to head (a72d605).
⚠️ Report is 123 commits behind head on main.

Files with missing lines Patch % Lines
...components/shared/DataView/GitOpsDataViewTable.tsx 0.00% 7 Missing ⚠️
src/gitops/components/rollout/RolloutList.tsx 0.00% 6 Missing ⚠️
.../components/rollout/components/PodList/PodList.tsx 0.00% 5 Missing ⚠️
...gitops/components/shared/GitOpsListPageToolbar.tsx 0.00% 5 Missing ⚠️
...s/components/application/ApplicationSourcesTab.tsx 0.00% 4 Missing ⚠️
...itops/components/imageupdater/ImageUpdaterList.tsx 0.00% 4 Missing ⚠️
src/gitops/components/project/ProjectList.tsx 0.00% 4 Missing ⚠️
src/gitops/components/shared/ApplicationList.tsx 0.00% 4 Missing ⚠️
...mponents/shared/ApplicationSetApplicationsView.tsx 0.00% 4 Missing ⚠️
...rc/gitops/components/shared/ApplicationSetList.tsx 0.00% 4 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #365      +/-   ##
==========================================
+ Coverage   11.30%   15.67%   +4.36%     
==========================================
  Files         169      234      +65     
  Lines        6679     8562    +1883     
  Branches     2235     2930     +695     
==========================================
+ Hits          755     1342     +587     
- Misses       5923     7218    +1295     
- Partials        1        2       +1     
Flag Coverage Δ
unit-tests 15.67% <7.14%> (+4.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if (!input.selected?.length) {
return true;
}
return !!pod?.status?.phase && input.selected.includes(pod.status.phase);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This LGTM

if (!input.selected?.length) {
return true;
}
return !!rollout?.status?.phase && input.selected.includes(rollout.status.phase);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This LGTM. Tested

@@ -156,6 +157,11 @@ const ApplicationResourcesView: React.FC<ApplicationResourcesViewProps> = ({
actions={
<ApplicationResourcesToolbar viewType={viewType} onViewChange={onViewChange} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This resources toolbar (the view switcher button) is not on the right side. It should not be directly next to the filter/column management widgets

ListGraphButton ListGraphButton2 Original

@@ -117,6 +121,11 @@ const ApplicationSetApplicationsView: React.FC<ApplicationSetApplicationsViewPro
testId="application-set-applications-view-switcher"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Similar to my other comment for apps, the AppSet Apps tab has the switcher. The button should be over to the right.

AppsetAppView-ListGraphButton

Originally:

AppSetAppView-ListGraphButton-original

actions={
<ApplicationResourcesToolbar viewType={viewType} onViewChange={onViewChange} />
}
pagination={

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also test it when you resize the browser window to a small width, and ensure everything is layed out properly. Ensure there are filters enabled.

For example this is what i see before the fix:

NarrowWindow

Expanding the filter:

NarrowWindowWithFilters

I saw some issues with this.

Signed-off-by: Atif Ali <atali@redhat.com>
@aali309

aali309 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

@keith, PTAL. I applied your review comments. Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants