You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kg...@apache.org on 2022/08/16 17:29:38 UTC

[superset] branch master updated: fix(dashboard): Fix scroll behaviour in DashboardBuilderSidepane (#20969)

This is an automated email from the ASF dual-hosted git repository.

kgabryje 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 6f3a555e58 fix(dashboard): Fix scroll behaviour in DashboardBuilderSidepane (#20969)
6f3a555e58 is described below

commit 6f3a555e589cd8caee7ef6d5e667531b5e7ac43d
Author: EugeneTorap <ev...@gmail.com>
AuthorDate: Tue Aug 16 20:29:28 2022 +0300

    fix(dashboard): Fix scroll behaviour in DashboardBuilderSidepane (#20969)
---
 .../dashboard/components/BuilderComponentPane/index.tsx   | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx b/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx
index 4e47e161e4..7a1019a0e2 100644
--- a/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx
+++ b/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx
@@ -41,8 +41,7 @@ export interface BCPProps {
 
 const SUPERSET_HEADER_HEIGHT = 59;
 const SIDEPANE_ADJUST_OFFSET = 4;
-const SIDEPANE_HEADER_HEIGHT = 64; // including margins
-const SIDEPANE_FILTERBAR_HEIGHT = 56;
+const TOP_PANEL_OFFSET = 210;
 
 const BuilderComponentPaneTabs = styled(Tabs)`
   line-height: inherit;
@@ -52,20 +51,10 @@ const BuilderComponentPaneTabs = styled(Tabs)`
 const DashboardBuilderSidepane = styled.div<{
   topOffset: number;
 }>`
-  height: 100%;
+  height: calc(100% - ${TOP_PANEL_OFFSET}px);
   position: fixed;
   right: 0;
   top: 0;
-
-  .ReactVirtualized__List {
-    padding-bottom: ${({ topOffset }) =>
-      `${
-        SIDEPANE_HEADER_HEIGHT +
-        SIDEPANE_FILTERBAR_HEIGHT +
-        SIDEPANE_ADJUST_OFFSET +
-        topOffset
-      }px`};
-  }
 `;
 
 const BuilderComponentPane: React.FC<BCPProps> = ({