Skip to content

Commit a4ac88d

Browse files
authored
fix(dashboards): Remove fullscreen from Add to Dashboard (#81330)
The add to dashboard modal shouldn't have the fullscreen option. Also disable it in the widget builder.
1 parent c7987c9 commit a4ac88d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

static/app/components/modals/widgetBuilder/addToDashboardModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ function AddToDashboardModal({
310310
? {selected: unselectedReleasesForCharts}
311311
: undefined
312312
}
313+
disableFullscreen
313314
/>
314315

315316
<IndexedEventsSelectionAlert widget={widget} />

static/app/views/dashboards/widgetBuilder/buildSteps/visualizationStep.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export function VisualizationStep({
146146
: undefined
147147
}
148148
widgetLegendState={widgetLegendState}
149+
disableFullscreen
149150
/>
150151

151152
<IndexedEventsSelectionAlert widget={widget} />

static/app/views/dashboards/widgetCard/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ type Props = WithRouterProps & {
6868
widgetLegendState: WidgetLegendSelectionState;
6969
widgetLimitReached: boolean;
7070
dashboardFilters?: DashboardFilters;
71+
disableFullscreen?: boolean;
7172
hasEditAccess?: boolean;
7273
index?: string;
7374
isEditingWidget?: boolean;
@@ -129,6 +130,7 @@ function WidgetCard(props: Props) {
129130
onSetTransactionsDataset,
130131
legendOptions,
131132
widgetLegendState,
133+
disableFullscreen,
132134
} = props;
133135

134136
if (widget.displayType === DisplayType.TOP_N) {
@@ -289,7 +291,9 @@ function WidgetCard(props: Props) {
289291
actionsDisabled={actionsDisabled}
290292
actionsMessage={actionsMessage}
291293
actions={actions}
292-
onFullScreenViewClick={onFullScreenViewClick}
294+
onFullScreenViewClick={
295+
disableFullscreen ? undefined : onFullScreenViewClick
296+
}
293297
isLoading={loading}
294298
thresholds={widget.thresholds ?? undefined}
295299
value={value}
@@ -311,7 +315,7 @@ function WidgetCard(props: Props) {
311315
error={widgetQueryError}
312316
actionsMessage={actionsMessage}
313317
actions={actions}
314-
onFullScreenViewClick={onFullScreenViewClick}
318+
onFullScreenViewClick={disableFullscreen ? undefined : onFullScreenViewClick}
315319
>
316320
<WidgetCardChartContainer
317321
location={location}

0 commit comments

Comments
 (0)