Skip to content

feat: save sorting columns in queries #2234

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No 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? No Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025
Merged

feat: save sorting columns in queries #2234

merged 2 commits into from
Apr 30, 2025

Conversation

astandrik
Copy link
Collaborator

@astandrik astandrik commented Apr 30, 2025

Closes #2230

Stand

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
318 317 0 1 0

😟 No changes in tests. 😕

Bundle Size: 🔺

Current: 83.38 MB | Main: 83.38 MB
Diff: +7.25 KB (0.01%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Raubzeug previously approved these changes Apr 30, 2025
@astandrik astandrik added this pull request to the merge queue Apr 30, 2025
Merged via the queue into main with commit dea22d1 Apr 30, 2025
7 checks passed
@astandrik astandrik deleted the astandrik.2230 branch April 30, 2025 13:23
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: save sorting columns in queries
2 participants