Skip to content

Conversation

@pulpdrew
Copy link
Contributor

@pulpdrew pulpdrew commented Jan 6, 2026

Closes HDX-2748

Summary

This PR introduces a new ChartContainer component which is used to wrap various Chart components, and provides a standardized way to put titles and toolbar icons above charts.

Motivation: we have various items above charts already (display switchers, titles, materialized view optimization icons) and we plan to add additional ones (for noting when time ranges have been updated to align with chart or MV granularities). With this change, we can put all of the items in the same row, which does not overlap with the chart data (Closes HDX-2748) and consolidate some logic.

Demo

Preset Dashboards

Screenshot 2026-01-06 at 1 44 54 PM Screenshot 2026-01-06 at 1 45 44 PM Screenshot 2026-01-06 at 1 46 09 PM

Custom Dashboards

Screenshot 2026-01-06 at 1 47 00 PM

Chart Explorer

Screenshot 2026-01-06 at 1 48 04 PM

Infra Side Panel

Screenshot 2026-01-06 at 1 49 07 PM

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

🦋 Changeset detected

Latest commit: 378adc9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview, Comment Jan 7, 2026 8:05pm

@claude
Copy link

claude bot commented Jan 6, 2026

Code Review - PR #1560

No critical issues found.

The refactoring introduces a clean ChartContainer abstraction that consolidates chart toolbar logic across multiple components. The implementation follows existing patterns and maintains type safety.

Observations (non-blocking):

  • Good: Keys are properly added to toolbar items (commit e5f29b0)
  • Good: Consistent API design with toolbarPrefix/toolbarSuffix for flexibility
  • Good: Proper memoization of toolbar items to prevent unnecessary re-renders
  • Good: Tests updated to reflect new component structure

Minor notes:

  • Line 21 in ChartContainer.tsx: The condition check could be slightly simplified to match the outer condition, but current implementation works fine
  • Consider adding PropTypes or more detailed TSDoc for the new ChartContainer component to document the intended usage patterns

Overall, this is a solid refactoring that improves code organization and maintainability. ✅

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

E2E Test Results

All tests passed • 56 passed • 4 skipped • 719s

Status Count
✅ Passed 56
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 4

Tests ran across 4 shards in parallel.

View full report →

@pulpdrew pulpdrew force-pushed the drew/chart-container-with-toolbar branch from f9d9c14 to e1dff08 Compare January 6, 2026 18:27
@pulpdrew pulpdrew marked this pull request as ready for review January 6, 2026 18:54
@brandon-pereira
Copy link
Member

Overall, change looks good. A couple minor feedback items:

Thoughts on swapping these button groups? I feel like the edit/delete icons should be on the outside.
Screenshot 2026-01-07 at 10 14 17 AM

Doesn't look like the reset button uses the new component, not super urgent but if it's easy for uniformity, maybe we update?
Screenshot 2026-01-07 at 11 51 19 AM

Also noticed the search page time chart does not use this component, but that one seems pretty complex so definitely fine to punt that

@pulpdrew
Copy link
Contributor Author

pulpdrew commented Jan 7, 2026

Thoughts on swapping these button groups? I feel like the edit/delete icons should be on the outside.

My concern there is that the edit/delete icons only appear on hover, which would then push the display switcher to the left when the user goes to click it

We could make the edit/delete buttons persistent (ie. show up even without hovering) but my thought was that that might be too many icons then, so I kept the current behavior.

@brandon-pereira
Copy link
Member

Thoughts on swapping these button groups? I feel like the edit/delete icons should be on the outside.

My concern there is that the edit/delete icons only appear on hover, which would then push the display switcher to the left when the user goes to click it

We could make the edit/delete buttons persistent (ie. show up even without hovering) but my thought was that that might be too many icons then, so I kept the current behavior.

Good point - I agree! Disregard :)

brandon-pereira
brandon-pereira previously approved these changes Jan 7, 2026
children
) : (
<div
// Hack, recharts will release real fix soon https://github.com/recharts/recharts/issues/172
Copy link
Member

Choose a reason for hiding this comment

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

At some point- we should bump recharts version :P

@pulpdrew pulpdrew merged commit 158ccef into main Jan 7, 2026
21 of 23 checks passed
kodiakhq bot pushed a commit that referenced this pull request Jan 9, 2026
# Summary

This PR adds the hover edit/duplicate/delete buttons back to the search tile. They were inadvertently removed as part of #1560 .

## Before

<img width="813" height="430" alt="Screenshot 2026-01-09 at 11 48 32 AM" src="https://github.com/user-attachments/assets/393f402b-b64a-4633-8261-dd169ba2c011" />

## After

<img width="814" height="421" alt="Screenshot 2026-01-09 at 11 48 10 AM" src="https://github.com/user-attachments/assets/9afc368a-5b12-462e-8909-61fe6a581615" />
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.

3 participants