From c96d3f5d2fa3a7db9a51b6a94bee9632d9fd48b3 Mon Sep 17 00:00:00 2001 From: archeious Date: Fri, 17 Apr 2026 18:59:04 -0600 Subject: [PATCH] fix(ui): restore target card layout, tighten edit-mode UX (#21) --- src/quartermaster/routes.py | 1 + src/quartermaster/static/app.css | 25 +++++++++++++++++++ .../templates/partials/section.html | 1 + 3 files changed, 27 insertions(+) diff --git a/src/quartermaster/routes.py b/src/quartermaster/routes.py index 041a03e..54da710 100644 --- a/src/quartermaster/routes.py +++ b/src/quartermaster/routes.py @@ -102,6 +102,7 @@ def index(request: Request, db: Session = Depends(get_session)) -> HTMLResponse: "all_months": month_service.list_months(db), "zero": zero, "tone": service.zero_tone(zero), + "editing_id": None, }, ) diff --git a/src/quartermaster/static/app.css b/src/quartermaster/static/app.css index a1f2067..e00bc7b 100644 --- a/src/quartermaster/static/app.css +++ b/src/quartermaster/static/app.css @@ -580,6 +580,31 @@ details.add-entry > .month-add-form { .tag-edited { color: var(--ochre); } .tag-new { color: var(--indigo); } +/* Target card keeps the table-based layout from before Task 2 rewrite. */ +.target-section table.entries { width: 100%; border-collapse: collapse; font-family: var(--sans); } +.target-section table.entries thead { display: none; } +.target-section table.entries tbody tr.entry { + display: grid; + grid-template-columns: minmax(0, 1fr) 5.5rem 5.5rem 1.2rem; + gap: 0.6rem; + align-items: baseline; + padding: 0.26rem 0.25rem 0.28rem; + position: relative; + border-bottom: 1px dotted var(--rule); +} +.target-section table.entries tbody tr.entry td { + padding: 0; + border: none; + vertical-align: baseline; + min-width: 0; +} +.target-section table.entries tr.add-row td { + padding: 0.4rem 0.25rem 0.2rem !important; + border-bottom: none !important; + grid-column: 1 / -1; + display: block; +} + /* =============== PRIMARY DEBT TARGET =============== */ .section.target-section { diff --git a/src/quartermaster/templates/partials/section.html b/src/quartermaster/templates/partials/section.html index 116db33..deab8d3 100644 --- a/src/quartermaster/templates/partials/section.html +++ b/src/quartermaster/templates/partials/section.html @@ -20,6 +20,7 @@ name="name" value="{{ entry.name }}" required + autofocus aria-label="Name" >