Skip to content

Add sorting and page size control to Supported Projects table#99

Merged
jkondrat merged 1 commit into
mainfrom
feature/supported-projects-sorting
Jun 24, 2026
Merged

Add sorting and page size control to Supported Projects table#99
jkondrat merged 1 commit into
mainfrom
feature/supported-projects-sorting

Conversation

@igor-soldev

Copy link
Copy Markdown
Member

📌 Summary

This PR introduces improvements to the Supported Projects table by adding column sorting and a configurable page size selector for pagination. These enhancements improve usability when working with larger sets of infrastructure projects.


✨ Features

🔃 Column Sorting

Users can now sort the Supported Projects table by:

  • Project
  • Scans (12m)
  • Latest Scan
  • Grade

Behavior

  • Clicking a column header sorts ascending
  • Clicking the same header toggles descending order
  • Only one column can be sorted at a time
  • Active sort column is visually indicated (↑ / ↓ icon)
  • Sorting applies to the full dataset (not only current page)

📄 Page Size Selector

A new control has been added to allow users to change the number of rows displayed per page.

Available options:

  • 10
  • 25
  • 50
  • 100

Behavior

  • Default page size remains unchanged from current implementation
  • Changing page size updates pagination dynamically
  • Selected value persists during session navigation

🧠 Technical Details

  • Introduced unified state management for:

    • sortColumn
    • sortDirection
    • pageSize
    • currentPage
  • Ensured correct interaction between:

    • Sorting logic
    • Pagination logic
    • Page size changes
  • Sorting implemented to support correct data types:

    • String (Project)
    • Number (Scans 12m)
    • Date (Latest Scan)
    • Enum (Grade)
  • Ensured clean separation between UI and data handling logic


🧪 Testing

The following scenarios were verified manually:

  • Sorting works for all columns (asc/desc toggle)
  • Only one active sort column at a time
  • Sorting indicator is displayed correctly
  • Page size selector updates table correctly
  • Pagination recalculates properly after page size change
  • State persists during navigation
  • No regressions in existing pagination behavior

⚠️ Notes

  • No breaking changes introduced
  • No changes to existing API contracts required (unless backend sorting is enabled)
  • Fully backward compatible with existing pagination system

🚀 Impact

This update improves:

  • Data discoverability in large datasets
  • User control over table layout
  • Overall UX of the Supported Projects section

@igor-soldev igor-soldev requested a review from jkondrat June 24, 2026 08:26
@igor-soldev igor-soldev added the enhancement New feature or request label Jun 24, 2026
@jkondrat jkondrat merged commit 0b6d6c7 into main Jun 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants