You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2023/04/26 08:07:07 UTC
[superset] branch master updated: fix: Hide FiltersPanel in standalone mode 3 (#23811)
This is an automated email from the ASF dual-hosted git repository.
diegopucci pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 8a88ab3c4b fix: Hide FiltersPanel in standalone mode 3 (#23811)
8a88ab3c4b is described below
commit 8a88ab3c4b2358fefaa0d7f038aa124239a5028a
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Wed Apr 26 11:06:58 2023 +0300
fix: Hide FiltersPanel in standalone mode 3 (#23811)
---
.../src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx | 5 +++--
.../src/dashboard/components/nativeFilters/FilterBar/index.tsx | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
index dffa7bc3b2..ea0354334a 100644
--- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
+++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
@@ -153,11 +153,12 @@ const StyledDiv = styled.div`
`;
// @z-index-above-dashboard-charts + 1 = 11
-const FiltersPanel = styled.div<{ width: number }>`
+const FiltersPanel = styled.div<{ width: number; hidden: boolean }>`
grid-column: 1;
grid-row: 1 / span 2;
z-index: 11;
width: ${({ width }) => width}px;
+ ${({ hidden }) => hidden && `display: none;`}
`;
const StickyPanel = styled.div<{ width: number }>`
@@ -654,6 +655,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
return (
<FiltersPanel
width={filterBarWidth}
+ hidden={isReport}
data-test="dashboard-filters-panel"
>
<StickyPanel ref={containerRef} width={filterBarWidth}>
@@ -667,7 +669,6 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
height: filterBarHeight,
offset: filterBarOffset,
}}
- hidden={isReport}
/>
</ErrorBoundary>
</StickyPanel>
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
index 52d36c254c..5dfcaba488 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
@@ -52,6 +52,8 @@ import ActionButtons from './ActionButtons';
import Horizontal from './Horizontal';
import Vertical from './Vertical';
+// FilterBar is just being hidden as it must still
+// render fully due to encapsulated logics
const HiddenFilterBar = styled.div`
display: none;
`;