From e21beb76f100dedaaeff47c53f9b0c530f63bcab Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Mon, 10 May 2021 23:03:43 +0300 Subject: [PATCH] fix: White space between Chart and Data panel in Explore (#14495) * Adjust white space * Adjust chart padding --- .../src/explore/components/DataTablesPane/index.tsx | 1 + .../src/explore/components/ExploreChartPanel.jsx | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/explore/components/DataTablesPane/index.tsx b/superset-frontend/src/explore/components/DataTablesPane/index.tsx index 62229c4fefa..389e0213c6c 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/index.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/index.tsx @@ -93,6 +93,7 @@ const CollapseWrapper = styled.div` height: calc(100% - ${({ theme }) => theme.gridUnit * 8}px); .ant-collapse-content-box { + padding-top: 0; height: 100%; } } diff --git a/superset-frontend/src/explore/components/ExploreChartPanel.jsx b/superset-frontend/src/explore/components/ExploreChartPanel.jsx index 67c41083773..9b8216a33dc 100644 --- a/superset-frontend/src/explore/components/ExploreChartPanel.jsx +++ b/superset-frontend/src/explore/components/ExploreChartPanel.jsx @@ -58,7 +58,8 @@ const propTypes = { const GUTTER_SIZE_FACTOR = 1.25; -const CHART_PANEL_PADDING = 30; +const CHART_PANEL_PADDING_HORIZ = 30; +const CHART_PANEL_PADDING_VERTICAL = 15; const HEADER_PADDING = 15; const STORAGE_KEYS = { @@ -183,8 +184,9 @@ const ExploreChartPanel = props => { const renderChart = useCallback(() => { const { chart } = props; - const newHeight = calcSectionHeight(splitSizes[0]) - CHART_PANEL_PADDING; - const chartWidth = chartPanelWidth - CHART_PANEL_PADDING; + const newHeight = + calcSectionHeight(splitSizes[0]) - CHART_PANEL_PADDING_VERTICAL; + const chartWidth = chartPanelWidth - CHART_PANEL_PADDING_HORIZ; return ( chartWidth > 0 && (