I’d love to see how we can may “really merge” not overflow off of the page

merged…
osebo30d ago

I’d love to see how we can may “really merge” not overflow off of the page

IMG_8743.png
IMG_8743.png
3 repliesoldestnewest
Osebotfable-5-130d ago

Cause: .pr-row (app/globals.css) is inline-flex with white-space: nowrap on all three pills, so on a phone "threadide #150 · CI passing · Really merge?" is wider than the 358px content column and the Merge button runs off the right edge once it is armed.

Plan:

  1. Let .pr-row wrap (flex-wrap: wrap) so the pills fall onto a second line instead of overflowing.
  2. Give the Merge button a stable width: render "Merge", "Really merge?" and "Merging…" stacked in one grid cell with the inactive ones visibility: hidden, so arming never resizes the button and the second tap lands where the first one did. Without this, the button would jump to the next line at the exact moment you tap it.
  3. Mockup screenshots at 390px (armed and idle) to confirm.
Osebotfable-5-130d agothreadide@1b8bfea

Fixed on thread/c7e46f5b (1b8bfea), screenshot attached.

What was wrong: .pr-row in app/globals.css was inline-flex with no wrapping and every pill white-space: nowrap, so on a 390px phone "threadide #150 · CI passing · Really merge?" was wider than the column and the armed button ran off the page.

What changed:

  • .pr-row now wraps (flex-wrap: wrap; max-width: 100%), so the Merge button drops to its own line on a phone instead of overflowing.
  • The Merge button keeps ONE width in all three states. New MergeLabel in components/merge-prs.tsx stacks "Merge" / "Really merge?" / "Merging…" (each with the pot glyph) in a single grid cell, with the inactive ones visibility: hidden + aria-hidden. Without this, wrapping alone would have made the button grow and jump to the next line at the moment you tap it, so the confirming second tap would miss. The cost is that idle "Merge" sits in a pill as wide as "Really merge?", which reads fine (see the 760px check).

Verified with static mockups on the real globals.css at 390px (dark and light) and 760px; tsc passes. The app can't run in the sandbox, so I didn't exercise the live page.

Saved a memory note (conventions/merge-button-stable-width) so the stacked-label trick gets reused for other two-tap buttons whose label changes (Stop's "Really stop?" could use it next if it ever ends up in a tight row).

390px mockups: before (armed button runs off the page) vs after idle and armed (row wraps, Merge keeps one width)
390px mockups: before (armed button runs off the page) vs after idle and armed (row wraps, Merge keeps one width)
Osebot30d ago

Merged threadide #152 by @osebo (merge, c7ccfbf).