You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/06/28 23:20:14 UTC

[superset] branch customize_screenshot_width updated: Fix style

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

beto pushed a commit to branch customize_screenshot_width
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/customize_screenshot_width by this push:
     new 5c5f567997 Fix style
5c5f567997 is described below

commit 5c5f5679971ac2adbde7fffac29b3b5b9eb34a25
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Wed Jun 28 16:20:01 2023 -0700

    Fix style
---
 superset-frontend/src/components/ReportModal/index.tsx    | 15 +++++++++++----
 superset-frontend/src/components/ReportModal/styles.tsx   |  4 ++++
 .../src/features/alerts/AlertReportModal.tsx              |  6 +++++-
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/superset-frontend/src/components/ReportModal/index.tsx b/superset-frontend/src/components/ReportModal/index.tsx
index cb229f1f3f..c66ea0e6c3 100644
--- a/superset-frontend/src/components/ReportModal/index.tsx
+++ b/superset-frontend/src/components/ReportModal/index.tsx
@@ -41,10 +41,14 @@ import {
   NOTIFICATION_FORMATS,
 } from 'src/reports/types';
 import { reportSelector } from 'src/views/CRUD/hooks';
-import { TRANSLATIONS } from 'src/features/alerts/AlertReportModal';
+import {
+  TRANSLATIONS,
+  StyledInputContainer,
+} from 'src/features/alerts/AlertReportModal';
 import { CreationMethod } from './HeaderReportDropdown';
 import {
   antDErrorAlertStyles,
+  CustomWidthHeaderStyle,
   StyledModal,
   StyledTopSection,
   StyledBottomSection,
@@ -260,8 +264,11 @@ function ReportModal({
     </>
   );
   const renderCustomWidthSection = (
-    <div>
-      <div className="control-label">
+    <StyledInputContainer>
+      <div
+        className="control-label"
+        css={(theme: SupersetTheme) => CustomWidthHeaderStyle(theme)}
+      >
         {TRANSLATIONS.CUSTOM_SCREENSHOT_WIDTH_TEXT}
       </div>
       <div className="input-container">
@@ -277,7 +284,7 @@ function ReportModal({
           }}
         />
       </div>
-    </div>
+    </StyledInputContainer>
   );
 
   return (
diff --git a/superset-frontend/src/components/ReportModal/styles.tsx b/superset-frontend/src/components/ReportModal/styles.tsx
index 960da9b10e..dd0a410ef5 100644
--- a/superset-frontend/src/components/ReportModal/styles.tsx
+++ b/superset-frontend/src/components/ReportModal/styles.tsx
@@ -90,6 +90,10 @@ export const TimezoneHeaderStyle = (theme: SupersetTheme) => css`
   margin: ${theme.gridUnit * 3}px 0 ${theme.gridUnit * 2}px;
 `;
 
+export const CustomWidthHeaderStyle = (theme: SupersetTheme) => css`
+  margin: ${theme.gridUnit * 3}px 0 ${theme.gridUnit * 2}px;
+`;
+
 export const SectionHeaderStyle = (theme: SupersetTheme) => css`
   margin: ${theme.gridUnit * 3}px 0;
 `;
diff --git a/superset-frontend/src/features/alerts/AlertReportModal.tsx b/superset-frontend/src/features/alerts/AlertReportModal.tsx
index 0aeae9103e..d8d82b33ce 100644
--- a/superset-frontend/src/features/alerts/AlertReportModal.tsx
+++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx
@@ -46,6 +46,7 @@ import Owner from 'src/types/Owner';
 import { AntdCheckbox, AsyncSelect, Select } from 'src/components';
 import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
 import { useCommonConf } from 'src/features/databases/state';
+import { CustomWidthHeaderStyle } from 'src/components/ReportModal/styles';
 import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
 import {
   NotificationMethodOption,
@@ -1487,7 +1488,10 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
             )}
             {isScreenshot && (
               <StyledInputContainer>
-                <div className="control-label">
+                <div
+                  className="control-label"
+                  css={(theme: SupersetTheme) => CustomWidthHeaderStyle(theme)}
+                >
                   {TRANSLATIONS.CUSTOM_SCREENSHOT_WIDTH_TEXT}
                 </div>
                 <div className="input-container">