You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kg...@apache.org on 2023/03/02 06:29:33 UTC
[superset] branch master updated: fix(dashboard): Missing filter card styles (#23256)
This is an automated email from the ASF dual-hosted git repository.
kgabryje pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 9d0eea9600 fix(dashboard): Missing filter card styles (#23256)
9d0eea9600 is described below
commit 9d0eea9600fb198865ecdc679e60a8e5d353bd66
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Thu Mar 2 07:29:23 2023 +0100
fix(dashboard): Missing filter card styles (#23256)
---
.../src/dashboard/containers/DashboardPage.tsx | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
index 6ece49537b..7323f120c9 100644
--- a/superset-frontend/src/dashboard/containers/DashboardPage.tsx
+++ b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
@@ -17,6 +17,7 @@
* under the License.
*/
import React, { FC, useEffect, useMemo, useRef } from 'react';
+import { Global } from '@emotion/react';
import { useHistory } from 'react-router-dom';
import {
CategoricalColorNamespace,
@@ -25,6 +26,7 @@ import {
isFeatureEnabled,
SharedLabelColorSource,
t,
+ useTheme,
} from '@superset-ui/core';
import pick from 'lodash/pick';
import { useDispatch, useSelector } from 'react-redux';
@@ -57,6 +59,7 @@ import { DashboardContextForExplore } from 'src/types/DashboardContextForExplore
import shortid from 'shortid';
import { RootState } from '../types';
import { getActiveFilters } from '../util/activeDashboardFilters';
+import { filterCardPopoverStyle, headerStyles } from '../styles';
export const DashboardPageIdContext = React.createContext('');
@@ -140,6 +143,7 @@ const useSyncDashboardStateWithLocalStorage = () => {
};
export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
+ const theme = useTheme();
const dispatch = useDispatch();
const history = useHistory();
const dashboardPageId = useSyncDashboardStateWithLocalStorage();
@@ -274,9 +278,12 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
if (!readyToRender) return <Loading />;
return (
- <DashboardPageIdContext.Provider value={dashboardPageId}>
- <DashboardContainer />
- </DashboardPageIdContext.Provider>
+ <>
+ <Global styles={[filterCardPopoverStyle(theme), headerStyles(theme)]} />
+ <DashboardPageIdContext.Provider value={dashboardPageId}>
+ <DashboardContainer />
+ </DashboardPageIdContext.Provider>
+ </>
);
};