Skip to content

Commit d9d805e

Browse files
lzhao-sentryconstantinius
authored andcommitted
feat(dashboards): add cell actions to viewer modal (#98151)
### Changes Add table cell actions to the table widget viewer modal. Only enabled if the `discover-cell-actions-v2` is on <img width="1170" height="1198" alt="Screenshot 2025-08-25 at 9 27 52 AM" src="https://github.com/user-attachments/assets/1e8c17bb-eec5-48ba-990c-a5f28fc6cb73" />
1 parent 5851af1 commit d9d805e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

static/app/components/modals/widgetViewerModal.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,13 @@ import ReleaseWidgetQueries from 'sentry/views/dashboards/widgetCard/releaseWidg
108108
import {WidgetCardChartContainer} from 'sentry/views/dashboards/widgetCard/widgetCardChartContainer';
109109
import WidgetQueries from 'sentry/views/dashboards/widgetCard/widgetQueries';
110110
import type WidgetLegendSelectionState from 'sentry/views/dashboards/widgetLegendSelectionState';
111+
import {ALLOWED_CELL_ACTIONS} from 'sentry/views/dashboards/widgets/common/settings';
111112
import {TableWidgetVisualization} from 'sentry/views/dashboards/widgets/tableWidget/tableWidgetVisualization';
112113
import {
113114
convertTableDataToTabularData,
114115
decodeColumnAliases,
115116
} from 'sentry/views/dashboards/widgets/tableWidget/utils';
117+
import {Actions} from 'sentry/views/discover/table/cellAction';
116118
import {decodeColumnOrder} from 'sentry/views/discover/utils';
117119
import {MetricsDataSwitcher} from 'sentry/views/performance/landing/metricsDataSwitcher';
118120

@@ -1373,6 +1375,14 @@ function ViewerTableV2({
13731375
);
13741376
}
13751377

1378+
let cellActions: Actions[] = [];
1379+
if (organization.features.includes('discover-cell-actions-v2')) {
1380+
cellActions =
1381+
tableWidget.widgetType === WidgetType.SPANS
1382+
? [...ALLOWED_CELL_ACTIONS, Actions.OPEN_ROW_IN_EXPLORE]
1383+
: ALLOWED_CELL_ACTIONS;
1384+
}
1385+
13761386
return (
13771387
<Fragment>
13781388
<TableWidgetVisualization
@@ -1402,7 +1412,7 @@ function ViewerTableV2({
14021412
eventView,
14031413
} satisfies RenderFunctionBaggage;
14041414
}}
1405-
allowedCellActions={[]}
1415+
allowedCellActions={cellActions}
14061416
/>
14071417
{!(
14081418
tableWidget.queries[0]!.orderby.match(/^-?release$/) &&

0 commit comments

Comments
 (0)