You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2021/05/07 17:07:22 UTC
[superset] branch fix-control-info-tooltip-positioning updated:
fix: moves LESS styles into Emotion, fixes broken layout of tooltips
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch fix-control-info-tooltip-positioning
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/fix-control-info-tooltip-positioning by this push:
new 91b8eed fix: moves LESS styles into Emotion, fixes broken layout of tooltips
91b8eed is described below
commit 91b8eedb495856da08787d39b3be1795c8f289d8
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Fri May 7 10:05:52 2021 -0700
fix: moves LESS styles into Emotion, fixes broken layout of tooltips
---
.../explore/components/ControlPanelsContainer.tsx | 31 +++++++++++++++++++++-
superset-frontend/src/explore/main.less | 24 -----------------
2 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
index 9181a56..f6b9cc3 100644
--- a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
+++ b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
@@ -26,6 +26,7 @@ import {
getChartControlPanelRegistry,
QueryFormData,
DatasourceType,
+ css,
} from '@superset-ui/core';
import {
ControlPanelSectionConfig,
@@ -211,7 +212,35 @@ export class ControlPanelsContainer extends React.Component<ControlPanelsContain
return (
<Collapse.Panel
- className="control-panel-section"
+ css={theme => css`
+ margin-bottom: 0;
+ box-shadow: none;
+
+ &:last-child {
+ padding-bottom: ${theme.gridUnit * 10}px;
+ }
+
+ .panel-body {
+ margin-left: ${theme.gridUnit * 4}px;
+ padding-bottom: 0px;
+ }
+
+ .control-label {
+ margin-bottom: 0px;
+ position: relative;
+ span + span {
+ // this is targeting the little info icons
+ position: absolute;
+ top: 50%;
+ right: ${theme.gridUnit * -3}px;
+ transform: translateY(-50%);
+ }
+ }
+
+ span.label {
+ display: inline-block;
+ }
+ `}
header={PanelHeader()}
key={sectionId}
>
diff --git a/superset-frontend/src/explore/main.less b/superset-frontend/src/explore/main.less
index 84ae27e..43de0da 100644
--- a/superset-frontend/src/explore/main.less
+++ b/superset-frontend/src/explore/main.less
@@ -47,34 +47,10 @@
margin-right: 3px;
}
-.control-panel-section {
- margin-bottom: 0;
- box-shadow: none;
-
- &:last-child {
- padding-bottom: 40px;
- }
-}
-
.background-transparent {
background-color: transparent !important;
}
-.control-panel-section {
- .panel-body {
- margin-left: 15px;
- padding-bottom: 0px;
- }
-
- .control-label {
- margin-bottom: 0px;
- }
-
- span.label {
- display: inline-block;
- }
-}
-
.fa.expander {
width: 15px;
}