fix(studio): 블록 편집기 손잡이 여백이 935px 이하에서 화면 밖으로 나가지 않는다

본문 블록 편집기(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건 모두 통과.
This commit is contained in:
DongHyeonka
2026-11-12 18:38:30 +09:00
parent 75eea39a0e
commit abe4ec97bc
2 changed files with 24 additions and 4 deletions
@@ -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; }
+3
View File
@@ -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();