Skip to content
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

chore: update charts /failed-queries, fix CodeDialog #397

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

duyet
Copy link
Owner

@duyet duyet commented Nov 4, 2024

Summary by Sourcery

Update the failed queries chart configuration to show data for the last 7 days and add a new chart for the last 24 hours. Fix the CodeDialog component to correctly handle dialog titles and descriptions. Add the @radix-ui/react-visually-hidden package to the project dependencies.

Bug Fixes:

  • Fix the CodeDialog component to ensure dialog titles and descriptions are displayed correctly.

Enhancements:

  • Update the failed queries chart to display data for the last 7 days instead of 14 days, and add a new chart for the last 24 hours.

Chores:

  • Update package.json to include the @radix-ui/react-visually-hidden dependency.

Copy link
Contributor

sourcery-ai bot commented Nov 4, 2024

Reviewer's Guide by Sourcery

This PR updates the failed queries charts configuration and improves the CodeDialog component's accessibility and styling. The changes primarily focus on adjusting time ranges for failed query visualizations and enhancing the code display dialog's user interface.

Updated class diagram for CodeDialogFormat component

classDiagram
    class CodeDialogFormat {
        +value
        +options
        +DialogTrigger
        +DialogContent
        +DialogHeader
        +DialogTitle
        +DialogDescription
        +content
    }
    note for CodeDialogFormat "Updated to include VisuallyHidden.Root for accessibility and improved styling for code display."
Loading

Updated class diagram for failedQueriesConfig

classDiagram
    class failedQueriesConfig {
        +failed-query-count
        +failed-query-count-by-user
        +title: String
        +interval: String
        +lastHours: Number
        +showLegend: Boolean
    }
    note for failedQueriesConfig "Updated time ranges and titles for failed query visualizations."
Loading

File-Level Changes

Change Details Files
Modified failed queries chart configurations and time ranges
  • Updated chart titles to be more descriptive
  • Changed default time range from 14 days to 7 days
  • Added a new 24-hour failed queries by users chart
  • Added a break between charts
  • Updated default lastHours parameter to 7 days
app/[host]/[query]/queries/failed-queries.ts
components/charts/failed-query-count.tsx
Enhanced CodeDialog component accessibility and styling
  • Added VisuallyHidden component for better screen reader support
  • Made dialog header always present with default title
  • Improved code content wrapping behavior
  • Added whitespace-pre-wrap and text-wrap classes to pre element
components/data-table/cells/code-dialog-format.tsx
Fixed chart key generation in RelatedCharts component
  • Updated key generation to include chart title to prevent potential rendering issues
components/related-charts.tsx
Added new dependency for accessibility
  • Added @radix-ui/react-visually-hidden package
package.json
yarn.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clickhouse-monitoring ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 7:36am

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @duyet - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2024

Bundle Report

Changes will increase total bundle size by 379 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
clickhouse-monitoring-bundle-server-cjs 2.37MB 260 bytes (0.01%) ⬆️
clickhouse-monitoring-bundle-edge-server-array-push 127.42kB 4 bytes (-0.0%) ⬇️
clickhouse-monitoring-bundle-client-array-push 3.58MB 123 bytes (0.0%) ⬆️

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (7569b0f) to head (9835393).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #397   +/-   ##
=======================================
  Coverage   78.34%   78.34%           
=======================================
  Files           5        5           
  Lines         157      157           
  Branches       58       58           
=======================================
  Hits          123      123           
  Misses         34       34           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@duyet duyet merged commit 617dbf3 into main Nov 4, 2024
21 checks passed
@duyet duyet deleted the chore/update-update branch November 4, 2024 07:41
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.

2 participants