From 1ebe16b93d29a4c0b983d6d0de4ebdf23f2ad458 Mon Sep 17 00:00:00 2001 From: Nicholas Charriere Date: Mon, 21 Oct 2024 21:45:18 -0700 Subject: [PATCH 1/2] Fix drawer height with large files --- packages/web/src/components/apps/bottom-drawer.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/web/src/components/apps/bottom-drawer.tsx b/packages/web/src/components/apps/bottom-drawer.tsx index 539edade..268c9c47 100644 --- a/packages/web/src/components/apps/bottom-drawer.tsx +++ b/packages/web/src/components/apps/bottom-drawer.tsx @@ -6,7 +6,7 @@ import { cn } from '@/lib/utils.ts'; import { useLogs } from './use-logs'; import { useEffect, useRef } from 'react'; -const maxHeightInPx = 320; +const DRAWER_HEIGHT = 320; export default function BottomDrawer() { const { logs, clearLogs, open, togglePane, closePane } = useLogs(); @@ -60,7 +60,10 @@ export default function BottomDrawer() { 'flex flex-col w-full overflow-hidden transition-all duration-200 ease-in-out', open ? 'flex-grow' : 'flex-shrink-0 h-8', )} - style={{ maxHeight: open ? `${maxHeightInPx}px` : '2rem' }} + style={{ + maxHeight: open ? `${DRAWER_HEIGHT}px` : '2rem', + minHeight: open ? `${DRAWER_HEIGHT}px` : '2rem', + }} >