From b9d60b3c39606a302719a08b15457aae37a028cf Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sun, 5 Jul 2026 18:56:24 -0700 Subject: [PATCH] FN-7602: fix Record/Clear button overlap in Keyboard Shortcuts rows Fixes overlapping Record and Clear buttons on the Keyboard Shortcuts settings rows by replacing the icon-only button class with a text button class and locking layout with flex-shrink. - Swap ShortcutCaptureInput Record/Clear buttons off the icon-only `btn-icon` class (which forced line-height:0 and a 36px mobile square, clipping labels) onto a text-button class - Add `.shortcut-capture` row CSS with `flex-shrink:0` on controls so the input and buttons never overlap and stack cleanly on mobile - Add regression tests covering the Keyboard Shortcuts section layout - Add changeset documenting the fix Files changed: .changeset/fn-7602-shortcut-row-layout.md | 7 ++ .../dashboard/app/components/SettingsModal.css | 17 ++++ .../settings/sections/ShortcutCaptureInput.tsx | 14 +++- .../__tests__/KeyboardShortcutsSection.test.tsx | 95 ++++++++++++++++++++++ 4 files changed, 131 insertions(+), 2 deletions(-) Fusion-Task-Id: FN-7602 Fusion-Task-Lineage: 50cf6975-f0fb-42dd-87b0-50578977a0f4 Co-authored-by: Fusion (runfusion.ai) --- .changeset/fn-7602-shortcut-row-layout.md | 7 ++ .../app/components/SettingsModal.css | 17 ++++ .../sections/ShortcutCaptureInput.tsx | 14 ++- .../KeyboardShortcutsSection.test.tsx | 95 +++++++++++++++++++ 4 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 .changeset/fn-7602-shortcut-row-layout.md diff --git a/.changeset/fn-7602-shortcut-row-layout.md b/.changeset/fn-7602-shortcut-row-layout.md new file mode 100644 index 0000000000..908fbba219 --- /dev/null +++ b/.changeset/fn-7602-shortcut-row-layout.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Fix overlapping Record and Clear buttons in the Keyboard Shortcuts settings rows on desktop and mobile. +category: fix +dev: The shortcut-capture Record/Clear buttons no longer use the icon-only `btn-icon` class (which set `line-height:0` and a mobile 36px square, clipping/overlapping the text labels); they use a text-button class and the `.shortcut-capture` row locks buttons with `flex-shrink:0` so the input and controls never overlap, stacking cleanly on mobile. diff --git a/packages/dashboard/app/components/SettingsModal.css b/packages/dashboard/app/components/SettingsModal.css index dbc288c1b0..21c5122a70 100644 --- a/packages/dashboard/app/components/SettingsModal.css +++ b/packages/dashboard/app/components/SettingsModal.css @@ -2550,6 +2550,17 @@ FN-7553's dedicated Keyboard Shortcuts section groups every action under a categ border-bottom: 0; } +/* +FNXC:DashboardShortcuts 2026-07-05-00:00: +FN-7602 fixes an overlap bug: Record/Clear previously used the icon-only `btn-icon` class +(line-height:0 + mobile 36px square), which clipped/overlapped their text labels +("Record"/"Recording…"/"Clear") against the input and each other (IMG_1305). The input +keeps `flex: 1 1 auto; min-width: 0;` so it shrinks first, while the buttons get +`flex-shrink: 0; white-space: nowrap;` so their content-sized width (including the longer +"Recording…" label) is never crushed or allowed to overlap a neighbor on desktop. Below +768px the row stacks to a column so the buttons sit on their own row under the full-width +input, still non-overlapping. +*/ .shortcut-capture { display: flex; align-items: center; @@ -2566,6 +2577,12 @@ FN-7553's dedicated Keyboard Shortcuts section groups every action under a categ border-color: var(--color-error); } +.shortcut-capture__record, +.shortcut-capture__clear { + flex-shrink: 0; + white-space: nowrap; +} + .shortcut-capture__record--active { color: var(--color-warning); } diff --git a/packages/dashboard/app/components/settings/sections/ShortcutCaptureInput.tsx b/packages/dashboard/app/components/settings/sections/ShortcutCaptureInput.tsx index 94ea657ee5..1e77ccbb25 100644 --- a/packages/dashboard/app/components/settings/sections/ShortcutCaptureInput.tsx +++ b/packages/dashboard/app/components/settings/sections/ShortcutCaptureInput.tsx @@ -91,9 +91,19 @@ export function ShortcutCaptureInput({ id, value, defaultValue, invalid, describ }} onChange={(event) => onChange(event.target.value)} /> + {/* + FNXC:DashboardShortcuts 2026-07-05-00:00: + Record/Clear are TEXT-labeled buttons ("Record"/"Recording…"/"Clear"), not icon-only + controls. `btn-icon` sets `line-height: 0` and a mobile 36px square meant for SVG-only + buttons — applying it here clipped the label's line box and, at mobile widths, forced + "Recording…" to overflow the fixed square and overlap the Clear button/input + (reported via screenshot IMG_1305). Use `btn-sm` instead so labels render on a normal + line-height with content-sized width; `.shortcut-capture` locks these buttons with + `flex-shrink: 0` so they never collide with the input or each other. + */}