From 9458ed34c5153f76e551d274a11b5893b8f1e17c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=ED=98=84?= Date: Thu, 22 Oct 2026 21:11:05 +0900 Subject: [PATCH] docs(storybook): drop the 1440px maximum of the SW Viewer Header screens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Viewer Header Story screens (기본형, 최소화 · 닫기) fill the Story column instead of an inline 1440px max-width; the other viewer frames keep their 1440px default. Verified in Storybook: frame and header 1536px at 1920, 2048px at 2560, no overflow. --- src/sw/sw-viewer.stories.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sw/sw-viewer.stories.tsx b/src/sw/sw-viewer.stories.tsx index 07f377a..bcd9a1e 100644 --- a/src/sw/sw-viewer.stories.tsx +++ b/src/sw/sw-viewer.stories.tsx @@ -30,11 +30,11 @@ function Log({ lines }: { lines: string[] }) { } /** A viewer screen: header on top, the drawing area below it (panels are placed inside this frame). */ -function ViewerFrame({ width = 1440, height = 620, children, header }: { width?: number; height?: number; header: ReactNode; children?: ReactNode }) { +function ViewerFrame({ width = 1440, height = 620, children, header }: { width?: number | null; height?: number; header: ReactNode; children?: ReactNode }) { return (
- {/* Fills the Story column up to `width`, so panels placed at the right edge stay visible. */} -
+ {/* Fills the Story column up to `width` (null: the whole column), so panels placed at the right edge stay visible. */} +
{header}
{children}
@@ -58,7 +58,8 @@ function AboutPanel({ demo }: { demo: ViewerDemo }) { ) } -function ViewerScreen({ width = 1440, initialDocument = SAMPLES[1].name as string | null, open = [] as ("layers" | "options" | "properties")[], windowControls = false }) { +// 2026-10-22 (user request): the Viewer Header screens have no 1440px maximum; they fill the Story column. +function ViewerScreen({ width = null as number | null, initialDocument = SAMPLES[1].name as string | null, open = [] as ("layers" | "options" | "properties")[], windowControls = false }) { const demo = useViewerDemo({ initialDocument, initialPanels: open }) // 2026-10-21 new viewer version: SWHeader's own minimize / close (SWHeaderWindowControls, same icons, size, hover) // at the right end after the existing trailing items (the `trailing` slot, no new API). The program owns the real