From 05aa67ff321d671de8bde8f63cb6bd2514dbac3a Mon Sep 17 00:00:00 2001 From: "n.siegfried" Date: Sat, 15 Aug 2026 17:26:45 -0500 Subject: [PATCH] T2.2 (part 2) - B1/S4/F2: delete the flat strip, unify the brand Completes T2.2. The flat strip was #wp-usermenu, built in auth-guard.js and appended to every bar: "Root . Admin . Users . Language & time . Password . Sign out". It duplicated Admin, Users and Sign out from the drawer, and being one unbreakable 412px run it was also the thing that clipped the bar at 390px. Deleting it is what resolves F2 for real, exactly as the wave predicted. Its two unique items moved into the drawer rather than being lost with it: Language & time and Password now sit under an Account section. They open dialogs rather than navigating, so they render as
|
diff --git a/html/wp-creation-styles.css b/html/wp-creation-styles.css index 6378e67..a53bb0d 100644 --- a/html/wp-creation-styles.css +++ b/html/wp-creation-styles.css @@ -54,14 +54,17 @@ z-index: 100; box-shadow: var(--shadow); } - .header-logo { - font-family: var(--mono); - font-size: 11px; - font-weight: 600; - letter-spacing: .15em; - color: var(--accent); - text-transform: uppercase; + /* The brand is the shared logo chip now, the same as every other page (T2.2). + .header-logo was this page's own mono wordmark - the one thing in the suite + that spelled "Prime Controls" out in monospace instead of showing the mark. + .wp-logo-chip comes from theme-light.css, which this page already loads. */ + .header-logo-chip { + display: inline-flex; + align-items: center; + text-decoration: none; + flex-shrink: 0; } + .header-logo-chip:hover { opacity: .92; } .header-sep { color: var(--border-strong); } .header-title { font-size: 13px; font-weight: 500; color: var(--text-muted); } @@ -553,7 +556,6 @@ .cstatus button { padding:6px 8px; } } @media (max-width: 480px) { - .header-logo { font-size:14px; } .workstep-row textarea { font-size:16px; } /* avoid iOS zoom */ input, select, textarea { font-size:16px; } /* avoid iOS zoom on focus */ } diff --git a/html/wp-sidenav.js b/html/wp-sidenav.js index 051bea8..db707c2 100644 --- a/html/wp-sidenav.js +++ b/html/wp-sidenav.js @@ -44,6 +44,14 @@ { href: 'admin.html', match: /(^|\/)admin\.html$/, icon: '⚡', label: 'Admin Console', sub: 'Settings & diagnostics', show: function () { return typeof window.wpIsAdmin === 'function' && window.wpIsAdmin(); } }, + // Account actions, inherited from the flat user menu that used to sit in the app + // bar (T2.2). Everything else that menu offered — Admin, Users, Sign out — the + // drawer already had; these two were its only unique contents, so they moved here + // rather than being lost with it. `action` items render as buttons, not links. + { section: 'Account' }, + { action: 'wpPreferences', icon: '⌚', label: 'Language & time', + sub: 'Dates, numbers and time zone' }, + { action: 'wpChangePassword', icon: '⚿', label: 'Password', sub: 'Change your password' }, ]; function esc(v) { @@ -110,11 +118,21 @@ LINKS.forEach(function (item) { if (item.section) { rows += '
' + esc(item.section) + '
'; return; } if (item.show && !item.show()) return; - rows += '' + + var inner = '' + '' + esc(item.label) + - (item.sub ? '' + esc(item.sub) + '' : '') + ''; + (item.sub ? '' + esc(item.sub) + '' : '') + ''; + // An action opens a dialog on the current page rather than going anywhere, so + // it is a button. Never a
with a click handler — CLAUDE.md, and the + // drawer is keyboard-navigable precisely because everything in it is focusable. + if (item.action) { + rows += ''; + return; + } + rows += '' + + inner + ''; }); var who = user ? (user.full_name || user.username || '') : ''; @@ -136,6 +154,17 @@ drawer.querySelector('#wp-sidenav-signout').addEventListener('click', function () { if (typeof window.wpLogout === 'function') window.wpLogout(); }); + // Close first, then act: these open a dialog, and leaving the drawer over it + // would put a scrim between the user and the thing they just asked for. The + // handler is looked up at click time because wp-format.js may still be parsing + // when the drawer is built — the flat menu had the same note. + Array.prototype.forEach.call(drawer.querySelectorAll('[data-action]'), function (el) { + el.addEventListener('click', function () { + var fn = window[el.getAttribute('data-action')]; + close(); + if (typeof fn === 'function') fn(); + }); + }); document.body.appendChild(scrim); document.body.appendChild(drawer); }