Skip to content

Added Sortable headers for Pipeline Table #1094

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

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

Conversation

end-9214
Copy link
Contributor

@end-9214 end-9214 commented Apr 14, 2025

Closes #1092

Added Sortable Headers for Pipeline Table. Users can click on the column names of the Pipeline Table and see the sorted entries in asc or desc order, And the order is being indicated via arrows facing upwards for asc and downwards for desc.

I added click handlers to the column headers in the pipeline table with the visual indication of arrows. Also added css styling to make sortable columns look different from the non-sortable.

In backend i extended schema to accept and validate sort parameters like - added sort_by field to find which column to sort; sort_order to find the direction (desc or asc).

I added get_sort_field_and_apply_order to handle sorting at the database level. And updated tasks and requested _tasks to use this sorting functionality.

Screenshot from 2025-04-14 18-50-03
Screenshot from 2025-04-14 18-50-22
Screenshot from 2025-04-14 18-50-48
Screenshot from 2025-04-14 18-51-03

Copy link

codecov bot commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 46.00000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 88.17%. Comparing base (99ae8e6) to head (cc1786e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
dispatcher/backend/src/routes/utils.py 10.71% 25 Missing ⚠️
...ckend/src/routes/requested_tasks/requested_task.py 88.88% 1 Missing ⚠️
dispatcher/backend/src/routes/tasks/task.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1094      +/-   ##
==========================================
- Coverage   88.56%   88.17%   -0.39%     
==========================================
  Files         102      102              
  Lines        5560     5608      +48     
==========================================
+ Hits         4924     4945      +21     
- Misses        636      663      +27     

☔ View full report in Codecov by Sentry.
📢 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.

fixed import order

fixed import order

fixed import order

fixed import order
Copy link
Collaborator

@benoit74 benoit74 left a comment

Choose a reason for hiding this comment

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

See inline comments.

@end-9214
Copy link
Contributor Author

I've Done the required changes :)

@benoit74
Copy link
Collaborator

@end-9214 please fix the CI issues

Also I feel like passing all following properties to every component is wrong:

:current-sort-column="sortColumn" 
:current-sort-order="sortOrder" 
@sort="sortBy"

There must be some leaniest way to do it, please investigate.

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.

Sortable Headers for Pipeline's Tables
2 participants