From be1e61d94b5ca405e176566a658f2be8136519af Mon Sep 17 00:00:00 2001 From: Z User Date: Tue, 11 Aug 2026 11:22:01 +0000 Subject: [PATCH] Fix: Redesign Digitale Hefte create dialog - fits viewport properly Problems fixed: - Dialog was max-w-lg (narrow) with too much vertical content (16 notebook type buttons in a grid, separate sections for each field) - Content overflowed the viewport on smaller screens Redesigned approach: - Dialog: max-w-2xl max-h-[85vh] with flex flex-col layout - Header: fixed at top with border-b (shrink-0) - Content: scrollable area (flex-1 overflow-y-auto) - Footer: fixed at bottom with border-t (shrink-0) Layout optimizations: - Title + Description side by side (grid-cols-2) - Subject + Class side by side (grid-cols-2) - Notebook type: compact dropdown instead of 16-button grid (base types + curriculum separator + curriculum types) - Color + Icon side by side (grid-cols-2) - Public toggle + Eco message in one compact row - Smaller labels (text-xs), tighter spacing (space-y-4) - Fixed height inputs (h-10 instead of min-h-[44px]) Result: w=512 h=490, fits within viewport (577px) --- src/components/notebooks-view.tsx | 242 +++++++++++++----------------- 1 file changed, 107 insertions(+), 135 deletions(-) diff --git a/src/components/notebooks-view.tsx b/src/components/notebooks-view.tsx index 06c09cd..c1880bd 100755 --- a/src/components/notebooks-view.tsx +++ b/src/components/notebooks-view.tsx @@ -1179,8 +1179,8 @@ function CreateNotebookDialog({ return ( { if (!v) onClose(); }}> - - + + {t('notebooks.create_title')} @@ -1188,88 +1188,35 @@ function CreateNotebookDialog({ {t('notebooks.create_desc')} -
- {/* Title */} -
- - setTitle(e.target.value)} - placeholder={t('notebooks.field_title_placeholder')} - className="min-h-[44px]" - /> -
- - {/* Description */} -
- -