fix(b08): 구조물 집계표 탭에도 보조 탭 줄 자리 — 탭 바꿀 때 카드 안 튐(170-4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
Reference in New Issue
Block a user