From 7416898bec6a31faae0251fc59ab637f6033d3ba Mon Sep 17 00:00:00 2001 From: Shane Maynard Date: Thu, 30 Jul 2026 07:03:35 -0400 Subject: [PATCH] Elevate planner UX and offline resilience --- public/app.css | 74 ++++++++- public/index.html | 50 ++++-- public/js/main.js | 315 +++++++++++++++++++++++++----------- public/manifest.webmanifest | 2 +- public/sw.js | 18 ++- test/auth.test.js | 8 +- 6 files changed, 347 insertions(+), 120 deletions(-) diff --git a/public/app.css b/public/app.css index af96d85..94fcf5c 100644 --- a/public/app.css +++ b/public/app.css @@ -43,7 +43,9 @@ } html { background: var(--surface); + scroll-padding-top: calc(var(--header-h) + 18px); } +.panel-card { scroll-margin-top: calc(var(--header-h) + 18px); } body { margin: 0; background: var(--surface); @@ -165,6 +167,12 @@ output { background: var(--surface-raised); box-shadow: var(--shadow-pop); } +.account-email { + margin: 4px 10px 7px; + font-size: 11px; + color: var(--ink-3); + overflow-wrap: anywhere; +} .account-menu-popover a, .account-menu-popover button { display: block; @@ -263,8 +271,9 @@ label.filebtn input[type="file"] { background: var(--ink-3); transition: background 0.2s; } +.autosave-chip.failed .dot { background: var(--fail); } .autosave-chip.saving .dot { - background: var(--warn); +background: var(--warn); animation: pulse 1s ease-in-out infinite; } .autosave-chip.saved .dot { @@ -529,6 +538,38 @@ label.filebtn input[type="file"] { align-items: center; gap: 4px; } +.field-help-host { + position: relative; + display: flex; + flex-direction: column; + min-width: 0; +} +.field-help-host > .field { width: 100%; } +.field-help { + position: absolute; + top: -2px; + right: 0; + width: 18px; + height: 18px; + border: 1px solid var(--line-strong); + border-radius: 50%; + background: var(--surface-raised); + color: var(--ember-strong); + font-weight: 800; + cursor: pointer; + z-index: 1; +} +.field-help:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; } +.field-help-text { + margin-top: 2px; + padding: 8px 10px; + border-left: 2px solid var(--ember); + border-radius: 0 var(--radius-sm) var(--radius-sm) 0; + background: var(--ember-soft); + font-size: 11.5px; + line-height: 1.45; + color: var(--ink-2); +} .hint { font-size: 11px; color: var(--ink-3); @@ -1181,6 +1222,31 @@ body.show-fids .field[data-fid]::after { border: 1px solid var(--line); } +.unknown-condition { + margin: 0 22px 4px; + padding: 10px 12px; + border-left: 3px solid var(--ember); + background: var(--ember-soft); + font-size: 12.5px; + color: var(--ink-2); +} +.ledger-warnings { + padding: 10px 12px; + border: 1px solid #e8d49e; + border-radius: var(--radius-md); + background: var(--warn-bg); + color: #705318; + font-size: 12px; +} +.ledger-warnings p { margin: 0; } +.plan-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; } +.plan-list-item { + width: 100%; display: grid; gap: 3px; padding: 12px; text-align: left; border: 1px solid var(--line); + border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font: inherit; cursor: pointer; +} +.plan-list-item:hover, .plan-list-item.active { border-color: var(--ember); background: var(--ember-soft); } +.plan-list-item strong { font-size: 13px; } +.plan-list-item span { font-size: 11px; color: var(--ink-3); } /* ─── PWA and mobile layout ───────────────────────────────────────────── */ .connection-status { position: sticky; @@ -1200,7 +1266,8 @@ body.show-fids .field[data-fid]::after { @media (max-width: 720px) { :root { - --header-h: auto; + /* The mobile header is multi-row; keep anchor offsets valid rather than using auto in calc(). */ + --header-h: 220px; } body { font-size: 16px; @@ -1281,6 +1348,9 @@ body.show-fids .field[data-fid]::after { .panel-body { padding: 14px; } + .unknown-condition { margin: 0 14px 4px; } + .field-help { width: 22px; height: 22px; } + .field-help-text { font-size: 12px; } .field-grid { grid-template-columns: 1fr; gap: 12px; diff --git a/public/index.html b/public/index.html index 0ac9b6c..c4c63f4 100644 --- a/public/index.html +++ b/public/index.html @@ -23,17 +23,15 @@ -