fix(ui): 51-5 단위 고르기 단추 = 공용 기본 크기([저장]과 같은 높이 · 글자)

- 공용 UnitPick 한 곳 — 작은 크기 지정 제거
- 시험: ui_checks/51-5_단위단추_크기.js

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPJGtfXo6GMbcpiboQC4uK
This commit is contained in:
2026-10-05 19:33:10 +09:00
co-authored by Claude Sonnet 5.5
parent a82275b38e
commit 4a4cdc8aa9
2 changed files with 35 additions and 1 deletions
@@ -106,7 +106,6 @@ export function createUnitPick(opts: UnitPickOptions): HTMLElement {
const open = createButton({
label: opts.value || NO_UNIT,
variant: "ghost",
size: "sm",
disabled: opts.readOnly,
onClick: () => toggle(),
});
@@ -0,0 +1,35 @@
/* 51-5 — 단위 고르기 단추(공용 M02_DF_UnitPick) 높이 · 글자 = [저장] 단추와 같음
* 시작 화면: M02 마스터 템플릿 · 마스터 층(#/m02-master-template?open=구조물조합&root=master) · 시스템 관리자
* 부르는 법: orca eval --expression "$(tr '\n' ' ' < 이 파일)" (async 식 · JSON 글을 돌려줌)
* 하는 일: item1 → 일위대가 [수정] 상세 → 단위 단추 · [저장] 단추 높이 · 글자 크기 잼
* 기대: ok = true (|unit.h − save.h| ≤ 1 · 글자 같음)
*/
(async () => {
const w = (ms) => new Promise((r) => setTimeout(r, ms));
document.querySelector('[data-node="i|item1"]')?.click();
await w(2500);
const card = [...document.querySelectorAll(".m02-struct__card")].find((c) =>
c.querySelector("table.m02-labrow tbody tr[data-labor-logic]"),
);
if (!card) return JSON.stringify({ error: "일위대가 카드 없음" });
[...card.querySelectorAll(".m02-struct__card-tools button")]
.find((b) => b.innerText.trim() === "수정")
?.click();
await w(3000);
const read = (b) =>
b && {
h: Math.round(b.getBoundingClientRect().height * 10) / 10,
font: getComputedStyle(b).fontSize,
};
const unit = read(document.querySelector('[data-labor-field="단위"] .ui-btn'));
const save = read(
[...document.querySelectorAll("button")].find(
(b) => b.innerText.trim() === "저장" && b.offsetParent,
),
);
return JSON.stringify({
unit,
save,
ok: !!unit && !!save && Math.abs(unit.h - save.h) <= 1 && unit.font === save.font,
});
})();