Skip to content

Commit 8a1d3d9

Browse files
authored
feat(explore): Add way to toggle explore chart (#93918)
This adds a way to show/hide a chart in explore.
1 parent adb7886 commit 8a1d3d9

File tree

3 files changed

+368
-211
lines changed

3 files changed

+368
-211
lines changed

static/app/views/dashboards/widgets/widget/widget.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import styled from '@emotion/styled';
44

55
import ErrorBoundary from 'sentry/components/errorBoundary';
66
import {space} from 'sentry/styles/space';
7+
import {defined} from 'sentry/utils';
78
import {
89
MIN_HEIGHT,
910
MIN_WIDTH,
@@ -73,6 +74,7 @@ function WidgetLayout(props: Widget) {
7374
height={props.height}
7475
borderless={props.borderless}
7576
revealActions={revealActions}
77+
minHeight={defined(props.height) ? Math.min(props.height, MIN_HEIGHT) : MIN_HEIGHT}
7678
>
7779
<Header noPadding={props.noHeaderPadding}>
7880
{props.Title && <Fragment>{props.Title}</Fragment>}
@@ -132,14 +134,15 @@ const TitleHoverItems = styled('div')`
132134
const Frame = styled('div')<{
133135
borderless?: boolean;
134136
height?: number;
137+
minHeight?: number;
135138
revealActions?: 'always' | 'hover';
136139
}>`
137140
position: relative;
138141
display: flex;
139142
flex-direction: column;
140143
141144
height: ${p => (p.height ? `${p.height}px` : '100%')};
142-
min-height: ${MIN_HEIGHT}px;
145+
min-height: ${p => p.minHeight}px;
143146
width: 100%;
144147
min-width: ${MIN_WIDTH}px;
145148

0 commit comments

Comments
 (0)