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 2022/08/22 18:00:11 UTC

[superset] 07/19: Fix height of modal.

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

diegopucci pushed a commit to branch chore/e2e-tests-drilltodetail-modal
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 0e931e620c819c4fa4a12314ee4b5053d2623749
Author: Cody Leff <co...@preset.io>
AuthorDate: Fri Aug 5 17:56:48 2022 -0400

    Fix height of modal.
---
 .../components/DrillDetailPane/DrillDetailPane.tsx | 28 ++++++++++++++++------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/superset-frontend/src/dashboard/components/DrillDetailPane/DrillDetailPane.tsx b/superset-frontend/src/dashboard/components/DrillDetailPane/DrillDetailPane.tsx
index 915b636412..aeb330cb16 100644
--- a/superset-frontend/src/dashboard/components/DrillDetailPane/DrillDetailPane.tsx
+++ b/superset-frontend/src/dashboard/components/DrillDetailPane/DrillDetailPane.tsx
@@ -190,13 +190,19 @@ export default function DrillDetailPane({
   //  Render error if page download failed
   if (responseError) {
     return (
-      <pre
+      <div
         css={css`
-          margin-top: ${theme.gridUnit * 4}px;
+          height: ${theme.gridUnit * 128}px;
         `}
       >
-        {responseError}
-      </pre>
+        <pre
+          css={css`
+            margin-top: ${theme.gridUnit * 4}px;
+          `}
+        >
+          {responseError}
+        </pre>
+      </div>
     );
   }
 
@@ -205,7 +211,7 @@ export default function DrillDetailPane({
     return (
       <div
         css={css`
-          height: ${theme.gridUnit * 25}px;
+          height: ${theme.gridUnit * 128}px;
         `}
       >
         <Loading />
@@ -216,7 +222,15 @@ export default function DrillDetailPane({
   //  Render empty state if no results are returned for page
   if (resultsPage?.total === 0) {
     const title = t('No rows were returned for this dataset');
-    return <EmptyStateMedium image="document.svg" title={title} />;
+    return (
+      <div
+        css={css`
+          height: ${theme.gridUnit * 128}px;
+        `}
+      >
+        <EmptyStateMedium image="document.svg" title={title} />
+      </div>
+    );
   }
 
   //  Render chart if at least one page has successfully loaded
@@ -225,6 +239,7 @@ export default function DrillDetailPane({
       css={css`
         display: flex;
         flex-direction: column;
+        height: ${theme.gridUnit * 128}px;
       `}
     >
       <TableControls
@@ -251,7 +266,6 @@ export default function DrillDetailPane({
         css={css`
           min-height: 0;
           overflow: scroll;
-          height: ${theme.gridUnit * 128}px;
         `}
       />
     </div>