fix(desktop): give the Add Trigger button the same inset as the trigger rows

Merged
SA
3mo ago
+1-1

Summary

The trigger editor surface (rounded-[12px] bg-foreground/[0.04] p-1) had visibly more room above its first row than below the "Add Trigger" button. Measured over CDP in the running app before touching anything:

beforeafter
surface top edge → first row's content (surface p-1 4px + row py-1.5 6px)10px10px
"Add Trigger" button bottom edge → surface bottom edge4px10px

The rows carry 6px of their own vertical padding; the button carried none, so the surface's uniform p-1 came out uneven at the bottom.

Change

One class: mb-1.5 on the Add Trigger button. It goes on the button rather than as extra surface padding because it's the button that lacks what every row has, and the separator right above it already carries the same mb-1.5 to match the row padding — the 6px unit is now consistent throughout the surface. Row padding, the separator, and the button's h-10 are untouched.

Note: with no triggers (only the button in the surface) the button sits 4px from the top and 10px from the bottom; kept unconditional to keep this a one-class change.

Verification

  • CDP against this workspace's renderer (dark theme, 2× DPR), automation detail page: numbers above re-measured after the change (getBoundingClientRect on the surface, first row, and button); before/after screenshots confirm the only thing that moved is the surface's bottom edge, 6px lower.
  • bun run typecheck → exit 0, bun run lint → exit 0 (repo root).

Summary by cubic

Balances vertical spacing in the Triggers Editor surface by adding mb-1.5 to the Add Trigger button. Previously the bottom spacing was 4px; now top and bottom spacing are both 10px, matching row padding and improving visual consistency.

  • Only change: add mb-1.5 to the Add Trigger button in apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/TriggersEditor/TriggersEditor.tsx; rows and separator remain unchanged.
  • No functional behavior changes; layout spacing only. Button height (h-10) and hover styles are unchanged.
  • With no triggers, the button remains 4px from the top and 10px from the bottom; this is intentional to keep the change minimal.

Summary by CodeRabbit

  • Style
    • Improved spacing around the Add Trigger button for a cleaner layout in the automation trigger editor.