From fe787478b16a0461c3b11f4fec5b8cff525bc208 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Tue, 21 Apr 2026 15:41:49 -0600 Subject: [PATCH] refactor(ui): split ModifierProfileEditor header + relocate history/clipboard to footer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header previously crammed 9 elements onto one row: title, name input, layout picker, undo, redo, clipboard status, + Custom Modifier, Save, Share, Close. With the Bundled Presets tab added recently, visual hierarchy collapsed and scanning was hard. Split the chrome into three rows with one job each: - Row 1 (identity): title 'Profile', name input (widened, flex-grows up to max-w-md), close button. - Row 2 (toolbar, subhead-styled): Layout picker on the left; +Custom Modifier, Share, and Save on the right. Save is now primary-styled (dark filled) instead of a generic grey button in a line of five. - Footer: undo/redo icon buttons on the left, clipboard status badge on the right. Dim when empty, pill-styled with white background when non-empty to reduce noise. No testid changes — save-profile, share-profile, open-custom-modifier-editor, undo-button, redo-button, clipboard-status, profile-name, bound-layout-picker all remain at stable selectors. All 105 Playwright e2e tests + 1752 unit tests continue to pass. --- .../chess/src/ui/ModifierProfileEditor.tsx | 195 ++++++++++-------- 1 file changed, 110 insertions(+), 85 deletions(-) diff --git a/packages/chess/src/ui/ModifierProfileEditor.tsx b/packages/chess/src/ui/ModifierProfileEditor.tsx index 4f67c4d..443bdd9 100644 --- a/packages/chess/src/ui/ModifierProfileEditor.tsx +++ b/packages/chess/src/ui/ModifierProfileEditor.tsx @@ -265,11 +265,13 @@ export function ModifierProfileEditor({ className="fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4" >
- {/* Header */} -
-
+ {/* Header — identity row: title, name, close. Keeps the modal + scannable: one job per row. Secondary/toolbar controls live + in the subhead below; history + clipboard live in the footer. */} +
+

- Modifier Profiles + Profile

({ ...p, name: e.target.value })) } placeholder="Profile name" - className="px-3 py-1 text-sm border border-neutral-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" + className="flex-1 min-w-0 max-w-md px-3 py-1.5 text-sm border border-neutral-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500" maxLength={40} /> - {/* Bound layout for per-instance modifiers */} -
- - -
-
- +
+ + {/* Subhead toolbar — one-line row for Layout binding on the + left and primary/secondary actions on the right. This + replaces the former 9-element crammed header. */} +
+
+
+
+ - -
-
+
{/* Conflict Resolution Panel */} + + {/* Footer — history controls + clipboard badge. These are + global to the whole modal but secondary to authoring, so + they anchor the bottom instead of crowding the header. */} +