Skip to content

feat(aci): Add sorting to monitor list table #93841

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

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

malwilley
Copy link
Member

Adds the ability to click column headers to change the sort. This is a little different than tables in other parts of the app since it uses a button element and has hover/pressed states because I wanted it to be obvious which columns were sortable. Will need to extract some of this to use in the automations page as well.

CleanShot 2025-06-18 at 11 18 20@2x

@malwilley malwilley requested a review from a team as a code owner June 18, 2025 18:21
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 18, 2025
@@ -108,43 +110,4 @@ const RowWrapper = styled('div')<{disabled?: boolean}>`
opacity: 0.6;
}
`}

.type,
Copy link
Member Author

@malwilley malwilley Jun 18, 2025

Choose a reason for hiding this comment

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

Was able to use subgrid here as well (already did so in automations) to get rid of some duplicate grid column definitions

<HeaderCell name="name" sortKey="name" sort={sort}>
{t('Name')}
</HeaderCell>
<HeaderCell name="type" divider sortKey="type" sort={sort}>
Copy link
Member

Choose a reason for hiding this comment

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

Are these sortKeys temporary until the API implements more sorting? In the designs I only see the option to sort by Last Issue

Copy link
Member Author

Choose a reason for hiding this comment

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

I added all the ones that the API currently supports. When we get the open periods stuff I'll add in the sorting by last issue, but I think it's good to be able to sort by all the columns we can

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense! As long as the column headers don't get too cramped 😅

@malwilley malwilley enabled auto-merge (squash) June 18, 2025 18:30
@malwilley malwilley merged commit 900fa32 into master Jun 18, 2025
46 checks passed
@malwilley malwilley deleted the malwilley/feat/aci-detector-list-sorting branch June 18, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants