Skip to content

ref(dashboards): Use a render prop for heat map tooltip actions#118107

Open
gggritso wants to merge 4 commits into
masterfrom
georgegritsouk/heat-map-tooltip-render-prop
Open

ref(dashboards): Use a render prop for heat map tooltip actions#118107
gggritso wants to merge 4 commits into
masterfrom
georgegritsouk/heat-map-tooltip-render-prop

Conversation

@gggritso

@gggritso gggritso commented Jun 19, 2026

Copy link
Copy Markdown
Member

Replace HeatMapWidgetVisualization's makeExploreUrl callback prop with a renderTooltipActions render prop. Instead of building the cell tooltip's "View connected spans" / "Add to filter" links itself, the visualization now hands the caller the hovered cell's value-range query and time-narrowed selection and lets the caller render its own tooltip action rows. The visualization no longer needs to know about metrics or Explore URLs.

This makes it a lot easier to adapt this to Dashboards, because now the visualization doesn't need any external information, but it can still do things like route to Explore URLs without having to know the specifics of what the query is, for example.

This is behavior-preserving for Explore: its metric panel (metricsHeatMap.tsx) builds the same two links via the render prop, so the rendered tooltip is unchanged.

Refs DAIN-1654

Replace HeatMapWidgetVisualization's makeExploreUrl callback with a
renderTooltipActions render prop. The visualization now hands the caller the
hovered cell's value-range query and time-narrowed selection and lets the
caller render its own tooltip action rows, so it no longer needs to know about
metrics or Explore URLs. Explore's metric panel builds the same "View
connected spans" / "Add to filter" links via the render prop — behavior is
unchanged.

Split out of the heat map dashboard widget work, which needs this seam so the
dashboards caller can build its own tooltip actions.

Refs DAIN-1654
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gggritso gggritso requested review from a team as code owners June 19, 2026 20:57
@linear-code

linear-code Bot commented Jun 19, 2026

Copy link
Copy Markdown

DAIN-1654

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 19, 2026
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-li1dsqu5q.sentry.dev

Replace updateLocalFilterQuery with a generic tooltipActionHandlers map (button
id -> handler). Tooltip buttons carry data-tooltip-action / data-tooltip-action-value;
the visualization dispatches a click to the matching handler. Navigation links
keep using data-traces-link. Explore's 'Add to filter' registers under the map.

Refs DAIN-1654
HeatMapTooltipContext exposes the hovered cell's raw bounds (valueMin, valueMax,
timestampStart, timestampEnd) instead of a prebuilt value-range query + narrowed
selection. The caller turns those into whatever it needs; the visualization no
longer knows about metric query syntax or page filters for the tooltip.

Refs DAIN-1654
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.

1 participant