From 150b3832d327bda0b918e7e9e8ecf283e35a2825 Mon Sep 17 00:00:00 2001 From: Arnas Donauskas Date: Sun, 19 Apr 2026 11:57:25 +0300 Subject: [PATCH] feat(mobile): automation builder fits + flows on narrow screens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The automation flow builder had fixed-width cards (320px for steps, 400px for conditions) and a crammed top bar. On a 375px phone the condition cards overflowed horizontally and the top bar's Active switch label left the name input with almost no room. - Step cards: w-full max-w-[320px] sm:w-80 — full-width on mobile, original 320px on sm+. - Condition cards: w-full max-w-[400px] sm:w-[400px]. - Trigger card matches the step cards. - Condition branches (Yes/No) stack vertically on mobile — two columns at 375 would cram each branch to ~170px. Two columns return on sm+. - Top bar tightens on mobile: "Active" label hidden under sm so the switch + save button + name input all fit; back-arrow grows from h-8 w-8 → h-9 w-9 for a comfortable touch target; name input is text-sm on mobile, text-base on sm+. Desktop unchanged — every mobile-specific class is overridden by its sm: counterpart. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../automations/automation-builder.tsx | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/components/automations/automation-builder.tsx b/src/components/automations/automation-builder.tsx index b9b7245..948214a 100644 --- a/src/components/automations/automation-builder.tsx +++ b/src/components/automations/automation-builder.tsx @@ -246,12 +246,14 @@ export function AutomationBuilder({ initial }: { initial: BuilderInitial }) { return (
- {/* Top bar */} -
+ {/* Top bar. At sub-sm widths the "Active" label is hidden and the + switch moves to the right of the save button, so the name input + gets maximum width. */} +