feat(b06): 측구 줄 컴팩트 — 막힌 단추 숨김 · 측구형식 글 → 툴팁 · 단면유형 알약에 편측 쪽 (179-2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018jonfdxn1Xit9bdkNJpE4G
This commit is contained in:
2026-10-10 11:52:56 +09:00
co-authored by Claude Opus 5.5
parent 2d7fb61a9c
commit 81345a1438
4 changed files with 46 additions and 12 deletions
+6 -4
View File
@@ -385,7 +385,7 @@ export function buildDesignControls(
const groundSegment = groundToggle.wrap;
groundSegment.classList.add("b06-design__seg--header");
// 단면 유형은 지형에서 자동 판정되며(D-2), 제목행 pill로 표시한다(E-3, Cross_View에서 생성).
// 아래 옵션은 상시 노출하되 선행 조건 미충족 시 비활성 처리한다(E-6).
// 아래 옵션은 선행 조건 미충족 시 비활성 = 숨김(179-2 · CSS) — 편측의 쪽은 알약 글에.
const rockCut = isRock(state.ground) && state.mode !== "both_fill";
const hasDitch = state.mode !== "both_fill";
// 측구 생성 여부(자동 판정 or 사용자 override) — 측구형식은 측구가 있을 때만 의미 있다.
@@ -417,9 +417,9 @@ export function buildDesignControls(
!hasDitch,
L("B06_Design_Disabled_NoDitch"),
);
// 측구형식(일반/L형): 암 지반 + 절토 단면 + 측구가 실제 있을 때만 활성.
// 측구형식(일반/L형): 암 지반 + 절토 단면 + 측구가 실제 있을 때만 활성 · 이름 글 없이 툴팁(179-2).
const ditchTypeSeg = segment(
L("B06_Design_DitchType_Legend"),
"",
DITCH_TYPE_OPTIONS,
state.ditchType,
(value) => {
@@ -429,6 +429,7 @@ export function buildDesignControls(
!rockCut || !ditchOn,
!ditchOn ? L("B06_Design_Disabled_NoDitchType") : L("B06_Design_Disabled_RockCut"),
);
ditchTypeSeg.title = L("B06_Design_DitchType_Legend");
// 2단계 경사 토글: 암 지반 + 절토 단면에서만 활성. 활성="복합경사"/비활성="단경사"(E-7).
const twoStage = toggle(
"",
@@ -486,7 +487,8 @@ export function buildDesignControls(
let overflow = bar.scrollWidth - clientWidth;
let moveCount = 0;
while (overflow > 1 && moveCount < moveable.length) {
overflow -= widths[moveable.length - 1 - moveCount] + barGapPx;
const width = widths[moveable.length - 1 - moveCount]; // 숨긴 칸(179-2)은 폭 · 간격 0
overflow -= width ? width + barGapPx : 0;
moveCount += 1;
}
return moveCount;
+2 -6
View File
@@ -532,13 +532,9 @@
white-space: nowrap;
}
/* 선행 조건 미충족 옵션(E-6) — 상시 노출하되 흐리게·클릭 불가. */
/* 선행 조건 미충족 옵션 — 숨김(179-2 · 옛 E-6 「흐리게 늘 보임」 폐기 · 쪽은 단면유형 알약에). */
.b06-design__seg--disabled {
opacity: 0.4;
}
.b06-design__seg--disabled .b06-design__btn {
cursor: not-allowed;
display: none;
}
.b06-design__seg-buttons {
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
"""PLAN 179-2 — 측구 줄 컴팩트(W16 (가)): 막힌 단추 숨김 · 「측구형식」 글 지움(툴팁) · 알약에 편측 쪽(소스 시험)."""
import os
import re
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
def _src(rel: str) -> str:
return open(os.path.join(ROOT, rel), encoding="utf-8").read()
def test_막힌_묶음은_숨김():
css = _src("B06_Section/B06_Section_UI_Style_Cross.css")
body = re.search(r"\.b06-design__seg--disabled\s*\{([^}]*)\}", css).group(1)
assert "display: none;" in body
assert "opacity" not in body
def test_측구형식_글_없이_툴팁():
cd = _src("B06_Section/B06_Section_UI_Cross_Design.ts")
seg = cd.split("const ditchTypeSeg = segment(", 1)[1].split(");", 1)[0]
assert seg.lstrip().startswith('"",')
assert 'ditchTypeSeg.title = L("B06_Design_DitchType_Legend");' in cd
def test_넘침_셈은_숨긴_칸_폭_간격_뺌():
cd = _src("B06_Section/B06_Section_UI_Cross_Design.ts")
assert "overflow -= width ? width + barGapPx : 0;" in cd
def test_알약에_편측_쪽():
lb = _src("ui_template/ui_template_locale_b2.ts")
assert 'B06_Design_Mode_LeftCut: ["편측 성토(좌 절토)"' in lb
assert 'B06_Design_Mode_RightCut: ["편측 성토(우 절토)"' in lb
+2 -2
View File
@@ -420,8 +420,8 @@ export const ui_locales_b2 = {
B06_Design_Ground_Ripping: ["리핑암", "Ripping rock"],
B06_Design_Ground_Blasting: ["발파암", "Blasting rock"],
B06_Design_Mode_Legend: ["단면유형", "Section type"],
B06_Design_Mode_LeftCut: ["편측 성토", "One-side fill"],
B06_Design_Mode_RightCut: ["편측 성토", "One-side fill"],
B06_Design_Mode_LeftCut: ["편측 성토(좌 절토)", "One-side fill (left cut)"],
B06_Design_Mode_RightCut: ["편측 성토(우 절토)", "One-side fill (right cut)"],
B06_Design_Mode_BothCut: ["양측 절토", "Both cut"],
B06_Design_Mode_BothFill: ["양측 성토", "Both fill"],
B06_Design_Ditch_Legend: ["측구위치", "Ditch side"],