-
Notifications
You must be signed in to change notification settings - Fork 390
feat: Wire heatmap chart into dashboard editor and tile rendering #2107
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
Open
alex-fedotyev
wants to merge
24
commits into
main
Choose a base branch
from
cursor/heatmap-chart-editor-dashboard-5801
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ec48095
feat: wire heatmap chart into dashboard editor and rendering
cursoragent 1ee7f0f
feat: auto-populate duration defaults for trace sources, pass numberF…
cursoragent 21dfd1a
fix: add tableSource to useEffect dependency array
cursoragent f21af1f
feat: auto-populate heatmap defaults on source change, disable intera…
cursoragent 9a15708
feat: fill Value/Count fields with actual defaults, add Display Setti…
cursoragent 58011b3
refactor: unify Heatmap Settings across search, chart editor, and das…
cursoragent a7d7646
fix: reduce uPlot top padding, prevent drawer scroll lock, restore Ch…
cursoragent aa64f1a
fix: prevent layout shift by portaling HeatmapSettingsDrawer, revert …
cursoragent 1f5b425
fix: auto-run chart preview when editing dashboard tiles
cursoragent 09854eb
rename: Heatmap Settings → Display Settings for consistency
cursoragent 9b4dc70
fix: lift HeatmapSettingsDrawer to EditTimeChartForm level to prevent…
cursoragent 1895cee
refactor: address code review — extract toHeatmapChartConfig, fix sta…
cursoragent 0160d84
merge: resolve conflict with main (raw SQL alert validation)
cursoragent af06542
fix: remove unused HeatmapSelectExtras export, memoize defaultValues
cursoragent b392516
fix: widen Y-axis and add right padding to prevent label clipping
cursoragent 78c26de
fix: dynamic Y-axis sizing and compact tick labels
cursoragent d68bb1a
fix: prettier formatting in formatDurationMsCompact
cursoragent 9772d1f
fix: X-axis label overlap, replace IIFEs with components
cursoragent 2721fb6
fix: increase X-axis min tick spacing to prevent cramped labels in sm…
cursoragent badd8d5
fix: add 4px left padding to prevent Y-axis label clipping
cursoragent 58fd368
fix: add left padding to search heatmap container to prevent Y-axis c…
cursoragent 7180587
fix: add right padding to search heatmap container to match left
cursoragent 59b2476
fix: hide Generated SQL for heatmap, clean up useEffect deps
cursoragent a587ca2
fix: restrict heatmap data source picker to trace sources only
alex-fedotyev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -29,6 +29,7 @@ import { IS_LOCAL_MODE } from '@/config'; | |||||
| import { DEFAULT_TILE_ALERT } from '@/utils/alerts'; | ||||||
|
|
||||||
| import { ChartSeriesEditor } from './ChartSeriesEditor'; | ||||||
| import { HeatmapSeriesEditor } from './HeatmapSeriesEditor'; | ||||||
| import { TileAlertEditor } from './TileAlertEditor'; | ||||||
|
|
||||||
| type ChartEditorControlsProps = { | ||||||
|
|
@@ -56,6 +57,7 @@ type ChartEditorControlsProps = { | |||||
| chartConfigForExplanations?: ChartConfigWithOptTimestamp; | ||||||
| onSubmit: (suppressErrorNotification?: boolean) => void; | ||||||
| openDisplaySettings: () => void; | ||||||
| openHeatmapSettings?: () => void; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need to be optional? Looks like it is always provided
Suggested change
|
||||||
| }; | ||||||
|
|
||||||
| export function ChartEditorControls({ | ||||||
|
|
@@ -83,6 +85,7 @@ export function ChartEditorControls({ | |||||
| chartConfigForExplanations, | ||||||
| onSubmit, | ||||||
| openDisplaySettings, | ||||||
| openHeatmapSettings, | ||||||
| }: ChartEditorControlsProps) { | ||||||
| return ( | ||||||
| <> | ||||||
|
|
@@ -96,6 +99,11 @@ export function ChartEditorControls({ | |||||
| control={control} | ||||||
| name="source" | ||||||
| data-testid="source-selector" | ||||||
| allowedSourceKinds={ | ||||||
| displayType === DisplayType.Heatmap | ||||||
| ? [SourceKind.Trace] | ||||||
| : undefined | ||||||
| } | ||||||
| sourceSchemaPreview={ | ||||||
| <SourceSchemaPreview source={tableSource} variant="text" /> | ||||||
| } | ||||||
|
|
@@ -113,7 +121,15 @@ export function ChartEditorControls({ | |||||
| )} | ||||||
| </Group> | ||||||
| </Flex> | ||||||
| {displayType !== DisplayType.Search && Array.isArray(select) ? ( | ||||||
| {displayType === DisplayType.Heatmap && Array.isArray(select) ? ( | ||||||
| <HeatmapSeriesEditor | ||||||
| control={control} | ||||||
| setValue={setValue} | ||||||
| tableSource={tableSource} | ||||||
| onSubmit={onSubmit} | ||||||
| onOpenDisplaySettings={openHeatmapSettings ?? openDisplaySettings} | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would we ever want to open the display settings here?
Suggested change
|
||||||
| /> | ||||||
| ) : displayType !== DisplayType.Search && Array.isArray(select) ? ( | ||||||
| <> | ||||||
| {fields.map((field, index) => ( | ||||||
| <ChartSeriesEditor | ||||||
|
|
@@ -208,7 +224,8 @@ export function ChartEditorControls({ | |||||
| <Flex mt={4} align="center" justify="space-between"> | ||||||
| <Group gap="xs"> | ||||||
| {displayType !== DisplayType.Number && | ||||||
| displayType !== DisplayType.Pie && ( | ||||||
| displayType !== DisplayType.Pie && | ||||||
| displayType !== DisplayType.Heatmap && ( | ||||||
| <Button | ||||||
| variant="subtle" | ||||||
| size="sm" | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the unit tests to cover the changes in this file