Skip to content

Commit e67649e

Browse files
authored
fix(explore): Bad collapsing of explore charts (#97903)
The footer was still visible when the charts were collapsed.
1 parent 905dccc commit e67649e

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

static/app/views/explore/components/chart/chartVisualization.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export function ChartVisualization({
3434
toolBox,
3535
chartInfo,
3636
chartRef,
37-
hidden = false,
3837
}: ChartVisualizationProps) {
3938
const theme = useTheme();
4039

@@ -73,10 +72,6 @@ export function ChartVisualization({
7372
chartInfo.timeseriesResult.isPending
7473
);
7574

76-
if (hidden) {
77-
return null;
78-
}
79-
8075
if (chartInfo.timeseriesResult.isPending) {
8176
if (previousPlottables.length === 0) {
8277
const loadingMessage =

static/app/views/explore/spans/charts/index.tsx

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,30 @@ function Chart({
246246
Title={Title}
247247
Actions={Actions}
248248
Visualization={
249-
<ChartVisualization
250-
chartInfo={chartInfo}
251-
hidden={!visible}
252-
chartRef={chartRef}
253-
brush={boxSelectOptions.brush}
254-
onBrushEnd={boxSelectOptions.onBrushEnd}
255-
onBrushStart={boxSelectOptions.onBrushStart}
256-
toolBox={boxSelectOptions.toolBox}
257-
/>
249+
visible && (
250+
<ChartVisualization
251+
chartInfo={chartInfo}
252+
chartRef={chartRef}
253+
brush={boxSelectOptions.brush}
254+
onBrushEnd={boxSelectOptions.onBrushEnd}
255+
onBrushStart={boxSelectOptions.onBrushStart}
256+
toolBox={boxSelectOptions.toolBox}
257+
/>
258+
)
258259
}
259260
Footer={
260-
<ConfidenceFooter
261-
sampleCount={chartInfo.sampleCount}
262-
isLoading={chartInfo.timeseriesResult?.isPending || false}
263-
isSampled={chartInfo.isSampled}
264-
confidence={chartInfo.confidence}
265-
topEvents={
266-
topEvents ? Math.min(topEvents, chartInfo.series.length) : undefined
267-
}
268-
dataScanned={chartInfo.dataScanned}
269-
/>
261+
visible && (
262+
<ConfidenceFooter
263+
sampleCount={chartInfo.sampleCount}
264+
isLoading={chartInfo.timeseriesResult?.isPending || false}
265+
isSampled={chartInfo.isSampled}
266+
confidence={chartInfo.confidence}
267+
topEvents={
268+
topEvents ? Math.min(topEvents, chartInfo.series.length) : undefined
269+
}
270+
dataScanned={chartInfo.dataScanned}
271+
/>
272+
)
270273
}
271274
height={chartHeight}
272275
revealActions="always"

0 commit comments

Comments
 (0)