You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2022/05/06 10:00:12 UTC
[superset] branch mobile-friendly-dash updated: delint
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch mobile-friendly-dash
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/mobile-friendly-dash by this push:
new 38bcef2a26 delint
38bcef2a26 is described below
commit 38bcef2a26201670a071aebf667184e027c7448b
Author: Ville Brofeldt <vi...@gmail.com>
AuthorDate: Fri May 6 12:51:08 2022 +0300
delint
---
superset-frontend/src/components/Chart/Chart.jsx | 2 +-
.../DashboardBuilder/DashboardBuilder.tsx | 5 +++--
.../nativeFilters/FilterBar/Header/index.tsx | 25 +---------------------
.../components/nativeFilters/FilterBar/index.tsx | 11 ++++------
4 files changed, 9 insertions(+), 34 deletions(-)
diff --git a/superset-frontend/src/components/Chart/Chart.jsx b/superset-frontend/src/components/Chart/Chart.jsx
index d2253e088f..54641bf3b9 100644
--- a/superset-frontend/src/components/Chart/Chart.jsx
+++ b/superset-frontend/src/components/Chart/Chart.jsx
@@ -314,7 +314,7 @@ class Chart extends React.PureComponent {
<ChartRenderer
{...this.props}
// this is gross..
- width={window.innerWidth > 767 ? this.props.width : "100%"}
+ width={window.innerWidth > 767 ? this.props.width : '100%'}
source={this.props.dashboardId ? 'dashboard' : 'explore'}
data-test={this.props.vizType}
/>
diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
index 65fbe584ca..9508f3d4cc 100644
--- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
+++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
@@ -158,14 +158,15 @@ const StickyPanel = styled.div<{ width: number }>`
`;
// @z-index-above-dashboard-popovers (99) + 1 = 100
-const StyledHeader = styled.div`
+const StyledHeader = styled.div<{ dashboardFiltersOpen: boolean }>`
grid-column: 2;
grid-row: 1;
/* position: sticky; */
top: 32px;
z-index: 100;
@media (max-width: 767px) {
- /* ${({ dashboardFiltersOpen }) => dashboardFiltersOpen && `display: none;`} */
+ /* ${({ dashboardFiltersOpen }) =>
+ dashboardFiltersOpen && `display: none;`} */
.dragdroppable {
margin-left: 0px !important;
}
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx
index 55f29f7157..82943da7ba 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx
@@ -39,28 +39,6 @@ const TitleArea = styled.h4`
}
`;
-const MobileCollapse = styled(Icons.LeftOutlined)`
- @media (min-width: 768px) {
- .ant-btn > .anticon + span {
- margin: 0;
- }
- svg {
- display: none;
- }
- }
-`;
-
-const Collapse = styled(Icons.Expand)`
- @media (max-width: 767px) {
- .ant-btn > .anticon + span {
- margin: 0;
- }
- svg {
- display: none;
- }
- }
-`;
-
const HeaderButton = styled(Button)`
padding: 0;
`;
@@ -118,8 +96,7 @@ const Header: FC<HeaderProps> = ({ toggleFiltersBar }) => {
buttonSize="xsmall"
onClick={() => toggleFiltersBar(false)}
>
- <Collapse iconColor={theme.colors.grayscale.base} />
- <MobileCollapse iconSize="l" />
+ <Icons.Expand iconColor={theme.colors.grayscale.base} />
</HeaderButton>
</TitleArea>
{canEdit && (
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
index 0bb94b9c5d..05979d9680 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
@@ -36,7 +36,6 @@ import {
DataMask,
HandlerFunction,
styled,
- css,
t,
SLOW_DEBOUNCE,
isNativeFilter,
@@ -81,7 +80,7 @@ const BarWrapper = styled.div<{ width: number }>`
& .ant-tabs-top > .ant-tabs-nav {
margin: 0;
}
-
+
&.open {
width: ${({ width }) => width}px; // arbitrary...
}
@@ -143,16 +142,14 @@ const CollapsedBar = styled.div<{ offset: number }>`
width: ${({ theme }) => theme.gridUnit * 10}px;
height: ${({ theme }) => theme.gridUnit * 10}px;
border-radius: ${({ theme }) => theme.gridUnit * 5}px;
- box-shadow: ${({ theme }) => theme.gridUnit}px ${({ theme }) => theme.gridUnit}px ${({ theme }) => theme.gridUnit}px ${({ theme }) => theme.colors.primary.light2};
+ box-shadow: ${({ theme }) => theme.gridUnit}px
+ ${({ theme }) => theme.gridUnit}px ${({ theme }) => theme.gridUnit}px
+ ${({ theme }) => theme.colors.primary.light2};
top: auto;
&.open {
flex-direction: row-reverse;
justify-content: center;
}
- /* &::after {
- content: "Filters";
- margin-right: ${({ theme }) => theme.gridUnit}px;
- } */
}
`;