Merge button / CI button are different sizes

merged…
osebo48d ago

See image for reference

image.png
image.png
3 repliesoldestnewest
Osebotfable-5-148d ago

The screenshot shows the three pills in the Pull requests panel (components/merge-prs.tsx) at three different heights: the PR link (13px text, 2px padding), the state badge (generic .badge, 11px, 1px padding) and the Merge button (12px bold, 3px padding) each derive their height from their own font/padding.

Plan: in app/globals.css give all three .pr-row children one shared box — inline-flex, align-items:center, fixed height: 24px, same horizontal padding and 2px radius — so they line up regardless of font size/weight. Colours and labels unchanged. I'll verify with a static mockup screenshot (light + dark).

Osebotfable-5-148d agothreadide@1308dd9

Fixed on thread/ba2df07f (1308dd9) — CSS only.

Cause: the three pills in the Pull requests row each got their height from their own font + padding: PR link (13px, 2px 8px), state badge (generic .badge, 11px, 1px 6px), Merge button (12px bold, 3px 10px). Hence the staircase in your screenshot.

Fix (app/globals.css, Pull requests panel block): one shared rule for .pr-row > a, .pr-row .badge.pr-state and .pr-row button.merge-pr — inline-flex, align-items:center, fixed height: 24px, padding: 0 8px, 2px radius, line-height: 1. Text is centred by the flex box, so the differing font sizes/weights no longer matter. Colours, labels, hover and the purple "Really merge?" armed state are unchanged; the rule is scoped to .pr-row, so status badges elsewhere are untouched.

Screenshot attached: before (main) vs after, light theme — the dashed red outlines in the mockup mark each pill's box. Dark theme checked too (same result). Verified with static mockups against the real stylesheet since the app can't run in the sandbox.

Pull requests panel before (main) vs after — link, state badge and Merge now share one 24px box (dashed outlines mark each pill's box)
Pull requests panel before (main) vs after — link, state badge and Merge now share one 24px box (dashed outlines mark each pill's box)
Diff · 1 files
--- a/threadide/app/globals.css
+++ b/threadide/app/globals.css
@@ .pr-row
 .pr-row { display: inline-flex; align-items: center; gap: 8px; }
-.pr-row > a { border: 1px solid var(--border-strong); border-radius: 2px; padding: 2px 8px; text-decoration: none; white-space: nowrap; }
-.badge.pr-state { vertical-align: middle; }
-button.merge-pr { white-space: nowrap; background: none; color: var(--text); border: 1px solid var(--text); padding: 3px 10px; border-radius: 2px; font-size: 12px; }
+/* All three pills in a row (link, state badge, Merge) share one 24px box so differing font sizes/weights
+   don't produce three different heights; text is centred by the flex box, not by line-height. */
+.pr-row > a, .pr-row .badge.pr-state, .pr-row button.merge-pr {
+  display: inline-flex; align-items: center; box-sizing: border-box; height: 24px; padding: 0 8px; border-radius: 2px;
+  line-height: 1; white-space: nowrap;
+}
+.pr-row > a { border: 1px solid var(--border-strong); text-decoration: none; }
+button.merge-pr { background: none; color: var(--text); border: 1px solid var(--text); font-size: 12px; }
 button.merge-pr:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); opacity: 1; }
Osebot48d ago

Merged threadide #74 by @osebo (merge, ba2611c).