diff --git a/app/components/chart-preview.tsx b/app/components/chart-preview.tsx index 548e3d7ba7..c36cf33c08 100644 --- a/app/components/chart-preview.tsx +++ b/app/components/chart-preview.tsx @@ -46,6 +46,7 @@ import { } from "@/graphql/hooks"; import { DataCubePublicationStatus } from "@/graphql/resolver-types"; import { useLocale } from "@/locales/use-locale"; +import { useTransitionStore } from "@/stores/transition"; import { useTheme } from "@/themes"; import useEvent from "@/utils/use-event"; @@ -80,6 +81,7 @@ const DashboardPreview = (props: DashboardPreviewProps) => { const { dataSource, layoutType } = props; const [state, dispatch] = useConfiguratorState(isLayouting); const theme = useTheme(); + const transition = useTransitionStore(); const [isDragging, setIsDragging] = React.useState(false); const [activeChartKey, setActiveChartKey] = React.useState( null @@ -91,6 +93,7 @@ const DashboardPreview = (props: DashboardPreviewProps) => { { + transition.setEnable(false); setIsDragging(true); setActiveChartKey(`${e.active.id}`); }} @@ -100,6 +103,7 @@ const DashboardPreview = (props: DashboardPreviewProps) => { } }} onDragEnd={(e) => { + transition.setEnable(true); setIsDragging(false); setActiveChartKey(null); setOver(null); @@ -196,7 +200,7 @@ const DndChartPreview = (props: DndChartPreviewProps) => { ref={setRef} {...attributes} style={{ - opacity: isOver && !isDragging ? 0.8 : 1, + opacity: isDragging ? 0 : isOver ? 0.8 : 1, border: `2px solid ${ isOver && !isDragging ? theme.palette.primary.main : "transparent" }`, diff --git a/app/components/debug-panel/index.tsx b/app/components/debug-panel/index.tsx index 944dfbc65b..0279bcc681 100644 --- a/app/components/debug-panel/index.tsx +++ b/app/components/debug-panel/index.tsx @@ -2,14 +2,12 @@ import { CircularProgress } from "@mui/material"; import dynamic from "next/dynamic"; import { Suspense } from "react"; -import { flag } from "@/flags"; - import { DebugPanelProps } from "./DebugPanel"; const LazyDebugPanel = dynamic(() => import("./DebugPanel"), { ssr: false }); const DebugPanel = (props: DebugPanelProps) => { - const shouldShow = flag("debug") || process.env.NODE_ENV === "development"; + const shouldShow = false; // flag("debug") || process.env.NODE_ENV === "development"; if (!shouldShow) { return null;