From eadb171dc2c82edfe798ea168e0508cc926a776c Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 10 Oct 2026 08:31:52 +0900 Subject: [PATCH] =?UTF-8?q?fix(b08):=20=EA=B5=AC=EC=A1=B0=EB=AC=BC=20?= =?UTF-8?q?=EC=A7=91=EA=B3=84=ED=91=9C=20=ED=83=AD=EC=97=90=EB=8F=84=20?= =?UTF-8?q?=EB=B3=B4=EC=A1=B0=20=ED=83=AD=20=EC=A4=84=20=EC=9E=90=EB=A6=AC?= =?UTF-8?q?=20=E2=80=94=20=ED=83=AD=20=EB=B0=94=EA=BF=80=20=EB=95=8C=20?= =?UTF-8?q?=EC=B9=B4=EB=93=9C=20=EC=95=88=20=ED=8A=90(170-4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz --- B08_Quantity/B08_Quantity_UI_Page.css | 5 ++++ B08_Quantity/B08_Quantity_UI_Page.ts | 13 ++++++++++- resources/tester/test_170_b08_modal_head.py | 26 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 resources/tester/test_170_b08_modal_head.py diff --git a/B08_Quantity/B08_Quantity_UI_Page.css b/B08_Quantity/B08_Quantity_UI_Page.css index 46eb16e07..b419ee0de 100644 --- a/B08_Quantity/B08_Quantity_UI_Page.css +++ b/B08_Quantity/B08_Quantity_UI_Page.css @@ -19,6 +19,11 @@ border-bottom: 1px solid var(--color-border); } +/* 구조물 집계표 보조 탭 줄 자리(170-4) — 단추는 높이만 채움 */ +.b08-quantity__tabs--blank > .ui-btn { + visibility: hidden; +} + /* 자재 집계표 셋(121) — 안내 글 · [저장] 한 줄 */ .b08-material__toolbar { display: flex; diff --git a/B08_Quantity/B08_Quantity_UI_Page.ts b/B08_Quantity/B08_Quantity_UI_Page.ts index ab156c57c..78f27502f 100644 --- a/B08_Quantity/B08_Quantity_UI_Page.ts +++ b/B08_Quantity/B08_Quantity_UI_Page.ts @@ -87,7 +87,18 @@ function renderTab(host: HTMLElement, tab: TabId, projectId: string | null): voi const view = document.createElement("div"); host.replaceChildren(view); if (tab === "material") return renderMaterials(view, projectId); - if (tab === "summary" && projectId) return void renderStructureSummary(view, projectId); + if (tab === "summary" && projectId) { + // 보조 탭 줄 자리(170-4) — 보이지 않는 sm 단추 한 줄 · 자재 탭과 같은 높이라 탭 바꿀 때 안 튐 + const blank = document.createElement("div"); + blank.className = "b08-quantity__tabs b08-quantity__tabs--blank"; + blank.setAttribute("aria-hidden", "true"); + const ghost = createButton({ label: L(SHEETS[0].label), variant: "ghost", size: "sm" }); + ghost.tabIndex = -1; + blank.append(ghost); + const body = document.createElement("div"); + view.append(blank, body); + return void renderStructureSummary(body, projectId); + } if (tab === "hydrology" && projectId) return void renderHydro(view, projectId); if (tab === "earthwork" && projectId) return void renderEarthwork(view, projectId); view.append(pendingNote()); diff --git a/resources/tester/test_170_b08_modal_head.py b/resources/tester/test_170_b08_modal_head.py new file mode 100644 index 000000000..8892a24df --- /dev/null +++ b/resources/tester/test_170_b08_modal_head.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +"""170 B08 구조물도 모달 — 머리 단추(170-2) · 칩 테두리 상태 색(170-3) · 집계표 보조 탭 줄 자리(170-4). + +화면 글 판정 — 공용 모달(ui_template_modal)은 안 고침. +""" + +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +PAGE = (ROOT / "B08_Quantity/B08_Quantity_UI_Page.ts").read_text(encoding="utf-8") +PAGE_CSS = (ROOT / "B08_Quantity/B08_Quantity_UI_Page.css").read_text(encoding="utf-8") + + +def test_170_4_집계표_보조_탭_줄_자리(): + branch = PAGE.split('if (tab === "summary" && projectId) {', 1)[1].split("\n }", 1)[0] + # 자재 탭 보조 탭 줄과 같은 클래스 · sm 단추 하나(보이지 않음 · 초점 안 감) + assert '"b08-quantity__tabs b08-quantity__tabs--blank"' in branch + assert 'size: "sm"' in branch and "ghost.tabIndex = -1" in branch + assert 'setAttribute("aria-hidden", "true")' in branch + # 집계표는 줄 아래 몸통에 그림(replaceChildren 이 빈 줄을 지우지 않게) + assert ( + "view.append(blank, body)" in branch and "renderStructureSummary(body, projectId)" in branch + ) + assert ".b08-quantity__tabs--blank > .ui-btn {\n visibility: hidden;" in PAGE_CSS.replace( + "\r\n", "\n" + )