This is an automated email from the ASF dual-hosted git repository. kgabryje pushed a commit to branch what-if in repository https://gitbox.apache.org/repos/asf/superset.git
commit fd43d2facd4ae632af58b46d3ea1c025046824e9 Author: Kamil Gabryjelski <[email protected]> AuthorDate: Thu Dec 18 16:55:39 2025 +0100 toggle panel --- superset-frontend/src/dashboard/components/Header/index.jsx | 5 ++++- superset-frontend/src/dashboard/components/WhatIfDrawer/index.tsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx b/superset-frontend/src/dashboard/components/Header/index.jsx index 3829a23c31..8730257bb5 100644 --- a/superset-frontend/src/dashboard/components/Header/index.jsx +++ b/superset-frontend/src/dashboard/components/Header/index.jsx @@ -216,6 +216,7 @@ const Header = () => { maxUndoHistoryExceeded, editMode, lastModifiedTime, + whatIfPanelOpen, } = useSelector( state => ({ expandedSlices: state.dashboardState.expandedSlices, @@ -231,6 +232,7 @@ const Header = () => { maxUndoHistoryExceeded: !!state.dashboardState.maxUndoHistoryExceeded, editMode: !!state.dashboardState.editMode, lastModifiedTime: state.lastModifiedTime, + whatIfPanelOpen: !!state.dashboardState.whatIfPanelOpen, }), shallowEqual, ); @@ -740,7 +742,7 @@ const Header = () => { <button type="button" css={whatIfButtonStyle} - onClick={() => dispatch(toggleWhatIfPanel(true))} + onClick={() => dispatch(toggleWhatIfPanel(!whatIfPanelOpen))} data-test="what-if-button" aria-label={t('What-if playground')} > @@ -781,6 +783,7 @@ const Header = () => { undoLength, userCanEdit, userCanSaveAs, + whatIfPanelOpen, ], ); diff --git a/superset-frontend/src/dashboard/components/WhatIfDrawer/index.tsx b/superset-frontend/src/dashboard/components/WhatIfDrawer/index.tsx index f3b0883d80..60dc4c2dd8 100644 --- a/superset-frontend/src/dashboard/components/WhatIfDrawer/index.tsx +++ b/superset-frontend/src/dashboard/components/WhatIfDrawer/index.tsx @@ -109,7 +109,7 @@ const PanelContent = styled.div` const FormSection = styled.div` display: flex; flex-direction: column; - gap: ${({ theme }) => theme.sizeUnit}px; + gap: ${({ theme }) => theme.sizeUnit * 2}px; `; const Label = styled.label`
