From 11fcd58d65be2216335cacd7170a33bc5b215616 Mon Sep 17 00:00:00 2001 From: Arash Afghahi Date: Wed, 3 Feb 2021 13:28:31 -0500 Subject: [PATCH 1/8] added text and changed margins --- superset-frontend/src/datasource/DatasourceEditor.jsx | 1 + superset-frontend/stylesheets/less/cosmo/variables.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index c0863dca60427..b8ca9119c8b13 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -610,6 +610,7 @@ class DatasourceEditor extends React.PureComponent { fieldKey="offset" label={t('Hours offset')} control={} + description={t('The number of hours, negative or positive, to shift the time column. This can be used to move UTC time to local time.')} /> {this.state.isSqla && ( Date: Wed, 3 Feb 2021 14:35:51 -0500 Subject: [PATCH 2/8] linted --- superset-frontend/src/datasource/DatasourceEditor.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index b8ca9119c8b13..746608ca089e2 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -610,7 +610,9 @@ class DatasourceEditor extends React.PureComponent { fieldKey="offset" label={t('Hours offset')} control={} - description={t('The number of hours, negative or positive, to shift the time column. This can be used to move UTC time to local time.')} + description={t( + 'The number of hours, negative or positive, to shift the time column. This can be used to move UTC time to local time.', + )} /> {this.state.isSqla && ( Date: Wed, 3 Feb 2021 18:47:45 -0500 Subject: [PATCH 3/8] changed the margin-bottom only for DatasourceEditor --- superset-frontend/src/datasource/DatasourceEditor.jsx | 6 +++++- superset-frontend/stylesheets/less/cosmo/variables.less | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 746608ca089e2..54e3cb4470266 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -51,13 +51,17 @@ import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags'; const DatasourceContainer = styled.div` .change-warning { - margin: 16px 10px 0; + margin: 16px 10px 0x; color: ${({ theme }) => theme.colors.warning.base}; } .change-warning .bold { font-weight: ${({ theme }) => theme.typography.weights.bold}; } + + .form-group { + margin-bottom: 8px; + } `; const FlexRowContainer = styled.div` diff --git a/superset-frontend/stylesheets/less/cosmo/variables.less b/superset-frontend/stylesheets/less/cosmo/variables.less index 85297a445f721..6b9e3b0ca1895 100644 --- a/superset-frontend/stylesheets/less/cosmo/variables.less +++ b/superset-frontend/stylesheets/less/cosmo/variables.less @@ -220,7 +220,7 @@ ); // ** `.form-group` margin -@form-group-margin-bottom: 8px; +@form-group-margin-bottom: 16px; @legend-color: @text-color; @legend-border-color: @gray-bg; From 6f2d4207094d9d01e32082dd8ad6a578699e7ee5 Mon Sep 17 00:00:00 2001 From: Arash Afghahi Date: Wed, 3 Feb 2021 21:11:37 -0500 Subject: [PATCH 4/8] help block instead of form group margin --- superset-frontend/src/datasource/DatasourceEditor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 54e3cb4470266..66432e47203c7 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -59,7 +59,7 @@ const DatasourceContainer = styled.div` font-weight: ${({ theme }) => theme.typography.weights.bold}; } - .form-group { + .help-block { margin-bottom: 8px; } `; From ea868cc31fdb26a00defb4b78ce7af2be93e056c Mon Sep 17 00:00:00 2001 From: Arash Afghahi Date: Wed, 3 Feb 2021 21:14:07 -0500 Subject: [PATCH 5/8] whoops meant margin-top --- superset-frontend/src/datasource/DatasourceEditor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 66432e47203c7..e6fa542b00124 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -60,7 +60,7 @@ const DatasourceContainer = styled.div` } .help-block { - margin-bottom: 8px; + margin-top: 8px; } `; From 07d05edff07acd3e85fde0dae42eab3af268f782 Mon Sep 17 00:00:00 2001 From: Arash Afghahi Date: Thu, 4 Feb 2021 14:01:42 -0500 Subject: [PATCH 6/8] removed floating x --- superset-frontend/src/datasource/DatasourceEditor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index e6fa542b00124..d293080c4024c 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -51,7 +51,7 @@ import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags'; const DatasourceContainer = styled.div` .change-warning { - margin: 16px 10px 0x; + margin: 16px 10px 0; color: ${({ theme }) => theme.colors.warning.base}; } From 4a5441c0713541b7f49fda1ef0327fb569deefbc Mon Sep 17 00:00:00 2001 From: Arash Afghahi Date: Fri, 5 Feb 2021 11:14:36 -0500 Subject: [PATCH 7/8] changed margins --- superset-frontend/src/datasource/DatasourceEditor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index d293080c4024c..418d5c18574f3 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -59,8 +59,8 @@ const DatasourceContainer = styled.div` font-weight: ${({ theme }) => theme.typography.weights.bold}; } - .help-block { - margin-top: 8px; + .form-group.has-feedback > .help-block { + margin-top: -8px; } `; From 3c9c4b68abbb232458477cf29b8281c798f03ee3 Mon Sep 17 00:00:00 2001 From: Arash Afghahi Date: Fri, 5 Feb 2021 11:36:25 -0500 Subject: [PATCH 8/8] actual changes --- superset-frontend/src/datasource/DatasourceEditor.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 418d5c18574f3..5d3cf1cd3b64e 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -60,7 +60,11 @@ const DatasourceContainer = styled.div` } .form-group.has-feedback > .help-block { - margin-top: -8px; + margin-top: 8px; + } + + .form-group.form-group-md { + margin-bottom: 8px; } `;