Skip to content

ref(dashboards): Extract shared heat map chart utilities#117873

Merged
gggritso merged 6 commits into
masterfrom
georgegritsouk/extract-shared-heat-map-utils
Jun 17, 2026
Merged

ref(dashboards): Extract shared heat map chart utilities#117873
gggritso merged 6 commits into
masterfrom
georgegritsouk/extract-shared-heat-map-utils

Conversation

@gggritso

@gggritso gggritso commented Jun 16, 2026

Copy link
Copy Markdown
Member

In an attempt to make a future PR less insane, this PR takes some of the current Heat Map behaviour and splits out the helpers into their own files and so on.
Refs DAIN-1654

Move Explore's heat map helpers into a shared heatMapWidget location so the
upcoming dashboards heat map widget can reuse them: the X/Y bucket-sizing
helpers (getHeatmapXAxisBucketInterval, getHeatmapYAxisBucketCount), the
metric-unit patch (mergeMetricUnit), and heat map settings
(PIXELS_PER_BUCKET, HEATMAP_Z_AXIS_SCALE). The Explore metric panel and heat
map now import them. Behavior-preserving refactor split from the larger heat
map dashboard widget work.

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

linear-code Bot commented Jun 16, 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 16, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5b180cc. Configure here.

Comment thread static/app/views/explore/metrics/metricPanel/index.tsx Outdated
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 93.70% 93.70% ±0%
Typed 133,000 133,001 🟢 +1
Untyped 8,943 8,943 ±0
🔍 1 new type safety issue introduced

Type assertions (as) (1 new)

File Line Detail
static/app/views/dashboards/widgets/heatMapWidget/utils/mergeMetricUnit.tsx 29 as DataUnitunit as DataUnit

This is informational only and does not block the PR.

gggritso added 2 commits June 16, 2026 18:44
Move Explore's existing heat map helpers verbatim instead of rewriting them.
The previous version of this branch simplified the helpers while relocating
them, which silently changed Explore's behavior (it dropped the 1d interval
option for long ranges and replaced the width-gated Y-bucket math). Restore the
original getHeatmapXBucketInterval / getHeatmapYBuckets bodies and signatures
(and PIXELS_PER_X_BUCKET = 15) under the renamed shared files so this is a true
no-op refactor for Explore.

Refs DAIN-1654
…at-map-utils' into georgegritsouk/extract-shared-heat-map-utils

; Conflicts:
;	static/app/views/dashboards/widgets/heatMapWidget/settings.ts

@nikkikapadia nikkikapadia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm!

@gggritso gggritso merged commit 192b9a1 into master Jun 17, 2026
71 checks passed
@gggritso gggritso deleted the georgegritsouk/extract-shared-heat-map-utils branch June 17, 2026 15:51
billyvg pushed a commit that referenced this pull request Jun 17, 2026
In an attempt to make a future PR less insane, this PR takes some of the
current Heat Map behaviour and splits out the helpers into their own
files and so on.
Refs DAIN-1654

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@fathert0rque

Copy link
Copy Markdown

nice

sehr-m pushed a commit that referenced this pull request Jun 23, 2026
In an attempt to make a future PR less insane, this PR takes some of the
current Heat Map behaviour and splits out the helpers into their own
files and so on.
Refs DAIN-1654

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

3 participants