From abe4ec97bc5686b6165c2f46d583f3c008927820 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 17:09:06 +0900 Subject: [PATCH] =?UTF-8?q?fix(studio):=20=EB=B8=94=EB=A1=9D=20=ED=8E=B8?= =?UTF-8?q?=EC=A7=91=EA=B8=B0=20=EC=86=90=EC=9E=A1=EC=9D=B4=20=EC=97=AC?= =?UTF-8?q?=EB=B0=B1=EC=9D=B4=20935px=20=EC=9D=B4=ED=95=98=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=99=94=EB=A9=B4=20=EB=B0=96=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=82=98=EA=B0=80=EC=A7=80=20=EC=95=8A=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 본문 블록 편집기(d72eae2, 09-16)는 드래그 손잡이와 블록 동작 칸을 읽기 단 바깥에 둔다. 그래서 section.studio-block-editor에 margin 0 -38px를 준다. 그런데 편집 화면의 옆 여백은 936px 이상에서만 38px 이상이다. 그 아래로는 24px(single-surface .studio-main이 100% - 48px), 760px 이하에서는 14px다. 그래서 761~935px에서는 14px, 760px 이하에서는 4px만큼 페이지 전체가 가로로 스크롤된다(760px 이하 규칙의 -18px도 14px 여백보다 넓다). e2e의 「Studio editor has no overflow」는 이것을 잡지 못했다. 블록 편집기는 폼의 나머지보다 늦게 그려지는데, 시험은 그 전에 폭을 쟀다. WebKit에서만 가끔 늦게 재서 900·820·768px이 떨어졌다. 손잡이 여백을 그 폭의 옆 여백에 맞춘다. 935px 이하는 24px(손잡이 칸 20px), 760px 이하는 14px(손잡이 칸 14px)이다. 936px 이상은 그대로다. 시험은 블록 편집기가 그려진 뒤에 잰다. 버린 대안: 상위 요소에 overflow-x: clip. 스크롤은 없어지지만 손잡이가 화면 밖에서 잘린 채 남는다. 검증: - 폭별 측정(chromium): 고치기 전 935px 1, 930px 3, 920px 8, 900~761px 14, 760px 이하 4px 넘침. 936px 이상은 0. - 시험만 고친 상태에서 chromium·chromium-compact의 Studio editor 20건 중 14건(935px 이하 일곱 폭 × 2) 실패. 고친 뒤 tech-log-responsive.spec.ts가 chromium·firefox·webkit·chromium-compact에서 88건 모두 통과. --- .../presentation/styles/studio-editor.css | 25 ++++++++++++++++--- tests/e2e/tech-log-responsive.spec.ts | 3 +++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/features/tech-log/presentation/styles/studio-editor.css b/src/features/tech-log/presentation/styles/studio-editor.css index 1ec37de..b7dcec1 100644 --- a/src/features/tech-log/presentation/styles/studio-editor.css +++ b/src/features/tech-log/presentation/styles/studio-editor.css @@ -1867,6 +1867,11 @@ .studio-app .studio-asset-kind-field--compact { display: flex; } +/* The block gutter (drag handle, block actions) sits in the page's side + margin, outside the reading column. It must not be wider than that margin + or the whole page scrolls sideways: the side margin is 38px or more from + 936px up, 24px below that (single-surface .studio-main is 100% - 48px) and + 14px at 760px and below (100% - 28px). See the two media rules below. */ .studio-app .studio-block-editor { position: relative; margin: 0 -38px; @@ -1890,6 +1895,18 @@ border-radius: 5px; } +@media (max-width: 935px) { + .studio-app .studio-block-editor { + margin-inline: -24px; + padding-inline: 24px; + } + + .studio-app .studio-authoring-block { + grid-template-columns: 20px minmax(0, 1fr) auto; + margin-inline: -24px -6px; + } +} + .studio-app .studio-authoring-block:hover, .studio-app .studio-authoring-block[data-active] { background: color-mix(in srgb, var(--canvas) 56%, transparent); @@ -2369,13 +2386,13 @@ .studio-app .studio-inline-asset-actions { justify-content: flex-start; } .studio-app .studio-block-editor { - margin-inline: -18px; - padding-inline: 18px; + margin-inline: -14px; + padding-inline: 14px; } .studio-app .studio-authoring-block { - grid-template-columns: 22px minmax(0, 1fr); - margin-inline: -18px 0; + grid-template-columns: 14px minmax(0, 1fr); + margin-inline: -14px 0; } .studio-app .studio-authoring-block__actions { display: none; } diff --git a/tests/e2e/tech-log-responsive.spec.ts b/tests/e2e/tech-log-responsive.spec.ts index 1e89ff4..3d1612a 100644 --- a/tests/e2e/tech-log-responsive.spec.ts +++ b/tests/e2e/tech-log-responsive.spec.ts @@ -34,6 +34,9 @@ for (const width of [1050, 1024, 980, 900, 820, 768, 767, 420, 390, 375] as cons page, "/studio/documents/11111111-1111-4111-8111-111111111111/edit", ); + // The body's block editor draws after the rest of the form. Measured + // before it, the page never overflowed; its gutter is what overflowed. + await page.locator("section.studio-block-editor").waitFor(); const dimensions = await horizontalOverflow(page); expect(dimensions.scrollWidth).toBeLessThanOrEqual(dimensions.clientWidth); await expect(page.getByRole("heading", { level: 1 })).toBeVisible();