From e4709f5af7df113a1d592d4076c0bf9f0fa7516a Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Mon, 10 Jun 2024 16:42:39 +0200 Subject: [PATCH 1/4] feat: Activate shared filters for "tab" layout in configurator mode --- app/components/chart-panel.tsx | 2 +- app/components/chart-preview.tsx | 6 ++++++ app/configurator/components/layout-configurator.tsx | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/components/chart-panel.tsx b/app/components/chart-panel.tsx index d445fd16cb..f881440085 100644 --- a/app/components/chart-panel.tsx +++ b/app/components/chart-panel.tsx @@ -1,7 +1,7 @@ import { Box, BoxProps, Theme } from "@mui/material"; import { makeStyles } from "@mui/styles"; import clsx from "clsx"; -import React, { forwardRef, HTMLProps } from "react"; +import React, { HTMLProps, forwardRef } from "react"; import ChartPanelLayoutCanvas, { chartPanelLayoutGridClasses, diff --git a/app/components/chart-preview.tsx b/app/components/chart-preview.tsx index 6f3a66a096..e87612625c 100644 --- a/app/components/chart-preview.tsx +++ b/app/components/chart-preview.tsx @@ -36,6 +36,7 @@ import { } from "@/components/chart-table-preview"; import { useChartStyles } from "@/components/chart-utils"; import { ChartWithFilters } from "@/components/chart-with-filters"; +import { DashboardInteractiveFilters } from "@/components/dashboard-interactive-filters"; import DebugPanel from "@/components/debug-panel"; import { DragHandle, DragHandleProps } from "@/components/drag-handle"; import Flex from "@/components/flex"; @@ -85,6 +86,11 @@ export const ChartPreview = (props: ChartPreviewProps) => { // we switch tabs in the configurator, otherwise we end up with the wrong // data in the downstream hooks (useDataCubesMetadataQuery, etc.) + {state.state !== "CONFIGURING_CHART" ? ( + x.key).join(",")} + /> + ) : null} diff --git a/app/configurator/components/layout-configurator.tsx b/app/configurator/components/layout-configurator.tsx index 301b7f9716..c1b9cfd982 100644 --- a/app/configurator/components/layout-configurator.tsx +++ b/app/configurator/components/layout-configurator.tsx @@ -209,6 +209,7 @@ const LayoutSharedFiltersConfigurator = () => { ); switch (layout.type) { + case "tab": case "dashboard": return ( Date: Mon, 10 Jun 2024 16:45:34 +0200 Subject: [PATCH 2/4] feat: Activate dashboard filters for tabs published --- app/components/chart-published.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/chart-published.tsx b/app/components/chart-published.tsx index 1e61f62db7..fbd8da2830 100644 --- a/app/components/chart-published.tsx +++ b/app/components/chart-published.tsx @@ -19,6 +19,7 @@ import { } from "@/components/chart-table-preview"; import { useChartStyles } from "@/components/chart-utils"; import { ChartWithFilters } from "@/components/chart-with-filters"; +import { DashboardInteractiveFilters } from "@/components/dashboard-interactive-filters"; import Flex from "@/components/flex"; import { HintBlue, HintRed, HintYellow } from "@/components/hint"; import { @@ -149,6 +150,7 @@ export const ChartPublished = (props: ChartPublishedProps) => { )} + Date: Tue, 11 Jun 2024 11:35:24 +0200 Subject: [PATCH 3/4] feat: Add tooltip for tab --- app/components/chart-selection-tabs.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/components/chart-selection-tabs.tsx b/app/components/chart-selection-tabs.tsx index fbdf05f0bd..d89631d513 100644 --- a/app/components/chart-selection-tabs.tsx +++ b/app/components/chart-selection-tabs.tsx @@ -936,14 +936,16 @@ const TabContent = (props: TabContentProps) => { {label ? ( - + + + ) : null} {editable && (