From ccafc6e332aeaf963b1d85d5a389b95432795648 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 19:11:19 +0900 Subject: [PATCH] docs(storybook): fit SW Responsive More rows to the screen SW Header Responsive More: MenuFrame gains a fluid option. The row width caps the scroller that paints the black grid and the frame fills it, so grid and header share one width and shrink together (no grid left beside the header). SW Viewer Responsive More: each row width is a maximum instead of a fixed width. The 1920 row is 1536px at a 1920px screen (80vw inner); integrated-visual baselines differ by this intended layout change and are not updated. --- src/sw/sw-header.stories.tsx | 14 +++++++++----- src/sw/sw-viewer.stories.tsx | 3 ++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/sw/sw-header.stories.tsx b/src/sw/sw-header.stories.tsx index b40d69b..cb4169b 100644 --- a/src/sw/sw-header.stories.tsx +++ b/src/sw/sw-header.stories.tsx @@ -495,11 +495,15 @@ const documentCallbacks = { onDocumentOpen: () => console.info("[SWHeader] documentOpen"), } -/** Frame with room below the header so the overlay dropdown is not clipped by the story scroller. */ -function MenuFrame({ width, children, fixedDimension = false }: { width: number; children: ReactNode; fixedDimension?: boolean }) { +/** + * Frame with room below the header so the overlay dropdown is not clipped by the story scroller. + * `fluid` (2026-10-22): `width` is a maximum for the scroller that paints the black grid, and the frame fills it, so the + * grid and the header share one width and shrink together on a narrower screen (no grid left beside the header). + */ +function MenuFrame({ width, children, fixedDimension = false, fluid = false }: { width: number; children: ReactNode; fixedDimension?: boolean; fluid?: boolean }) { return ( -
-
{children}
+
+
{children}
) } @@ -787,7 +791,7 @@ export const ResponsiveMore: Story = { {MORE_WIDTHS.map(width => ( - + ))} diff --git a/src/sw/sw-viewer.stories.tsx b/src/sw/sw-viewer.stories.tsx index a493055..2a5a3b7 100644 --- a/src/sw/sw-viewer.stories.tsx +++ b/src/sw/sw-viewer.stories.tsx @@ -338,7 +338,8 @@ export const Responsive: Story = {
{[1920, 1440, 1280, 950, 860, 760, 520].map(width => ( -
+ {/* The row width is a maximum (2026-10-22): on a narrower screen the header shrinks with it instead of scrolling. */} +
))}