ref(dashboards): Use VisualizationWidget in fullscreen widget viewer#110765
Merged
DominikB2014 merged 2 commits intomasterfrom Mar 16, 2026
Conversation
Add onZoom, legendSelection, and onLegendSelectionChange props to VisualizationWidget and forward them to TimeSeriesWidgetVisualization. Update the data widget viewer modal to render VisualizationWidget for time series widgets instead of always using WidgetCardChartContainer. This aligns the fullscreen view with the dashboard card rendering path, using the newer TimeSeriesWidgetVisualization for LINE, AREA, and BAR display types. Non-time-series widgets (TABLE, BIG_NUMBER, etc.) still fall back to WidgetCardChartContainer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
@sentry review |
Contributor
Author
|
@cursor review |
… in modal WidgetLegendSelectionState encodes series names with a widget ID delimiter that TimeSeriesWidgetVisualization does not understand, causing legend toggling to update the URL instead of hiding series. Let the widget manage its own local legend state instead. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Legend state props not passed to VisualizationWidget
- The fullscreen modal now passes both legend selection state and a legend-selection callback into VisualizationWidget, preserving legend toggles and existing analytics tracking.
Or push these changes by commenting:
@cursor push 05fd143b26
Preview (05fd143b26)
diff --git a/static/app/components/modals/dataWidgetViewerModal.tsx b/static/app/components/modals/dataWidgetViewerModal.tsx
--- a/static/app/components/modals/dataWidgetViewerModal.tsx
+++ b/static/app/components/modals/dataWidgetViewerModal.tsx
@@ -631,6 +631,10 @@
widget={primaryWidget}
tableItemLimit={widget.limit}
onZoom={onZoom}
+ legendSelection={widgetLegendState.getWidgetSelectionState(widget)}
+ onLegendSelectionChange={nextLegendSelection =>
+ onLegendSelectChanged({selected: nextLegendSelection})
+ }
showConfidenceWarning={
widget.widgetType === WidgetType.SPANS ||
widget.widgetType === WidgetType.TRACEMETRICS ||This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
edwardgou-sentry
approved these changes
Mar 16, 2026
3 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Use
VisualizationWidget(backed byTimeSeriesWidgetVisualization) inthe fullscreen data widget viewer modal for time series widgets (LINE,
AREA, BAR), aligning it with the dashboard card rendering path.
Previously the modal always used
WidgetCardChartContainerwhich rendersvia the older ECharts chart components in
chart.tsx. This is a steptoward eventually removing the time series rendering code from
WidgetCardChartContainer/chart.tsx.To support this,
VisualizationWidgetgains three new props that areforwarded to
TimeSeriesWidgetVisualization:onZoom— zoom callback for the modal's custom zoom-to-selection behaviorlegendSelection— controlled legend selection stateonLegendSelectionChange— legend toggle callbackNon-time-series widgets (TABLE, BIG_NUMBER, TEXT, etc.) still fall back
to
WidgetCardChartContainer.Refs DAIN-1258