Repository navigation
fix(desktop): give the Add Trigger button the same inset as the trigger rows - #6569
Conversation
The trigger surface is padded p-1 all round, but the rows inside it carry py-1.5 of their own while the Add Trigger button carries none. Measured in the app: 10px from the surface's top edge to the first row's content (4 + 6), but only 4px from the button's bottom edge to the surface's bottom edge, so the surface looked cramped at the bottom. The 6px goes on the button as mb-1.5 rather than as extra surface padding: it is the button that lacks what every row has, and the separator above it already carries the same mb-1.5 to match the row padding. Rows, separator, and button height are untouched; the button now sits 10px above the surface's bottom edge, matching the top.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe Add Trigger button in ChangesTrigger button spacing
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This is a narrowly scoped spacing adjustment with no actionable merge-blocking risk remaining after normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
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:p-14px + rowpy-1.56px)The rows carry 6px of their own vertical padding; the button carried none, so the surface's uniform
p-1came out uneven at the bottom.Change
One class:
mb-1.5on 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 samemb-1.5to match the row padding — the 6px unit is now consistent throughout the surface. Row padding, the separator, and the button'sh-10are 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
getBoundingClientRecton 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.5to 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.mb-1.5to the Add Trigger button inapps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/TriggersEditor/TriggersEditor.tsx; rows and separator remain unchanged.h-10) and hover styles are unchanged.Written for commit 5e3d6eb. Summary will update on new commits.
Summary by CodeRabbit