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

feat(KFLUXUI-125): allow sorting pipeline runs by status and type #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marcin-michal
Copy link
Contributor

Fixes

https://issues.redhat.com/browse/KFLUXUI-125

Description

Before, in the application's activity tab, it was only possible to sort pipeline runs by status, and in the snapshot's pipeline runs by type. Now, it's possible to sort by both of these attributes in either of the page, making it more consistent.

Type of change

  • Feature
  • Bugfix
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Screen shots / Gifs for design review

image
image
image

How to test or reproduce?

Go to the activity tab for any application and view the pipeline runs. To view the snapshots pipeline runs, click on any pipeline run from the previous page, click on the snapshot and select the pipeline runs tab.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 93.84615% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.23%. Comparing base (1b04567) to head (25e824c).

Files with missing lines Patch % Lines
...neRun/PipelineRunListView/PipelineRunsListView.tsx 91.17% 2 Missing and 1 partial ⚠️
.../SnapshotDetails/tabs/SnapshotPipelineRunsList.tsx 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   80.15%   80.23%   +0.07%     
==========================================
  Files         569      569              
  Lines       21391    21447      +56     
  Branches     5299     5318      +19     
==========================================
+ Hits        17146    17207      +61     
+ Misses       4220     4215       -5     
  Partials       25       25              
Flag Coverage Δ
unittests 80.23% <93.84%> (+0.07%) ⬆️

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

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

@marcin-michal
Copy link
Contributor Author

/retest

@CryptoRodeo CryptoRodeo self-requested a review January 15, 2025 16:00
@CryptoRodeo
Copy link
Contributor

Overall LGTM. I still need to take a closer look and test the functionality live before final review.
For some reason I cannot connect to the staging environment (browser or Konflux UI proxy).

Copy link
Contributor

@StanislavJochman StanislavJochman left a comment

Choose a reason for hiding this comment

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

LGTM

@StanislavJochman
Copy link
Contributor

LGTM

Copy link
Collaborator

@sahil143 sahil143 left a comment

Choose a reason for hiding this comment

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

Component Details page and Commits details page also has pipeline runs list page. WE will need to update the same filters their also.

@@ -145,6 +184,41 @@ const SnapshotPipelineRunsList: React.FC<React.PropsWithChildren<SnapshotPipelin
value={nameFilter}
/>
</ToolbarItem>
<ToolbarItem>
<Select
Copy link
Collaborator

Choose a reason for hiding this comment

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

See if you can create a Reusable component for status filter that can be used in all of the pipeline run list pages

Comment on lines +125 to +131
const setTypeFilters = (filters: string[]) => setTypeFiltersParam(filters.join(','));

const typeFilterObj = React.useMemo(() => {
return pipelineRuns.reduce((acc, plr) => {
if (customFilter && !customFilter(plr)) {
return acc;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This same code is being used in Other component, Create reusable utilities or component for the toolbar

@marcin-michal
Copy link
Contributor Author

Component Details page and Commits details page also has pipeline runs list page. WE will need to update the same filters their also.

@sahil143 Thanks, did not notice pipeline runs were in the Commit details page as well. By Component Details page, do you mean the ComponentActivityTab component or a different one? If so, the filters are already there.

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.

4 participants