Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors how sorting columns are handled in queries by extracting sorting hooks into dedicated files and syncing sort parameters with the URL. Key changes include:
- Removal of sorting hooks from utils.ts and moving them into dedicated hooks (useTopQueriesSort, useSortParam, and useRunningQueriesSort)
- Implementation of a new hook (useSortParam) to manage URL sort parameters with zod validation.
- Updates to TopQueriesData.tsx and RunningQueriesData.tsx to use the new hooks.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/containers/Tenant/Diagnostics/TopQueries/utils.ts | Removed sorting hooks; retained only table settings export |
| src/containers/Tenant/Diagnostics/TopQueries/hooks/useTopQueriesSort.ts | Added dedicated hook for top queries sorting |
| src/containers/Tenant/Diagnostics/TopQueries/hooks/useSortParam.ts | Added hook to manage and validate URL sort parameters using zod |
| src/containers/Tenant/Diagnostics/TopQueries/hooks/useRunningQueriesSort.ts | Added dedicated hook for running queries sorting |
| src/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.tsx | Updated to use new top queries sorting hook |
| src/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.tsx | Updated to use new running queries sorting hook |
Raubzeug
previously approved these changes
Apr 30, 2025
Raubzeug
approved these changes
Apr 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2230
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
😟 No changes in tests. 😕
Bundle Size: 🔺
Current: 83.38 MB | Main: 83.38 MB
Diff: +7.25 KB (0.01%)
ℹ️ CI Information