From fed8d4c71a90d2a2b991fe733cfdf4be8819d14e Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 7 Feb 2026 00:16:15 -0800 Subject: [PATCH] Fixed maximize button on Panel. --- .gitignore | 1 + .../[websiteId]/(reports)/journeys/Journey.tsx | 2 +- src/components/common/Panel.tsx | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index fcb577bad..dcf657a08 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ pm2.yml .vscode .tool-versions .claude +.agents tmpclaude* nul diff --git a/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx b/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx index 20f184d06..2afa08f3b 100644 --- a/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx +++ b/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx @@ -236,7 +236,7 @@ export function Journey({ websiteId, steps, startStep, endStep, view }: JourneyP
{formatLongNumber(nodeCount)}
- + {`${dropped}% ${formatMessage(labels.dropoff)}`} diff --git a/src/components/common/Panel.tsx b/src/components/common/Panel.tsx index 508ba65f4..0eba55677 100644 --- a/src/components/common/Panel.tsx +++ b/src/components/common/Panel.tsx @@ -5,7 +5,6 @@ import { Heading, Icon, Row, - Text, Tooltip, TooltipTrigger, } from '@umami/react-zen'; @@ -20,15 +19,23 @@ export interface PanelProps extends ColumnProps { const fullscreenStyles = { position: 'fixed', - width: '100%', - height: '100%', + width: '100vw', + height: '100vh', top: 0, left: 0, border: 'none', zIndex: 9999, } as any; -export function Panel({ title, allowFullscreen, style, children, ...props }: PanelProps) { +export function Panel({ + title, + allowFullscreen, + style, + children, + height, + width, + ...props +}: PanelProps) { const { formatMessage, labels } = useMessages(); const [isFullscreen, setIsFullscreen] = useState(false); @@ -46,7 +53,7 @@ export function Panel({ title, allowFullscreen, style, children, ...props }: Pan position="relative" gap {...props} - style={{ ...style, ...(isFullscreen ? fullscreenStyles : {}) }} + style={{ ...style, ...(isFullscreen ? fullscreenStyles : { height, width }) }} > {title && {title}} {allowFullscreen && (