feat(dashboards): Support linked dashboards in timeseries widgets#111078
Conversation
Allow setting linkedDashboards on groupBy columns for timeseries widgets with breakdown legend type. Previously only table widgets supported this. - Add link button to groupBy selector when legend type is breakdown - Allow SET_LINKED_DASHBOARDS for breakdown legend type, not just tables - Clear linkedDashboards when legend type changes away from breakdown - Populate linkedDashboards in widget builder when editing existing widgets - Handle linkedDashboards in SET_STATE action and URL query params Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
…ed-dashboards-in-timeseries-widgets
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
static/app/views/dashboards/widgetBuilder/components/groupBySelector.tsx
Show resolved
Hide resolved
…ed-dashboards-in-timeseries-widgets
Filter out existing entries for the same field before appending the new linked dashboard, preventing duplicate entries when a user re-links a field that already has a linked dashboard. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderState.tsx
Show resolved
Hide resolved
narsaynorath
left a comment
There was a problem hiding this comment.
Just a small comment about renderExtraActions, it's not a big deal but worth considering a cleanup for if you don't want to block this PR on it
| canDrag={canDrag} | ||
| canDelete={canDelete} | ||
| disabled={disable} | ||
| renderExtraActions={renderExtraActions?.(column, index)} |
There was a problem hiding this comment.
We don't need to provide the index if the newest instance of this doesn't require it, right?
There was a problem hiding this comment.
And instead of passing down this function.. Would it be better to just compose extra actions as a component and pass that component down? Or maybe if you need all the scope and don't want to drill it down, possibly consider a component where this renderExtraActions is defined?
I've heard of it's a possible performance issue, I found this article on it but maybe there are others discussing it better: https://playfulprogramming.com/posts/functions-are-killing-react-performance/#render-functions
There was a problem hiding this comment.
Yeah, a prop for a component is better, i'll make that change! I'll do it in a followup

Adds support for setting linkedDashboards on groupBy columns in timeseries widgets when using breakdown legend type. Previously, linked dashboards were only configurable for table widgets.
The timeseries visualization already rendered linked dashboard URLs in the breakdown legend footer, but there was no way to configure them through the widget builder for non-table widgets.
Changes:
SET_LINKED_DASHBOARDSaction for breakdown legend type in addition to table display typerenderExtraActionsprop toQueryFieldandGroupBySelectorfor extensibility