The image button in the composer should be square

merged…
osebo36d ago

The image button in the composer should be square

IMG_8644.jpeg
IMG_8644.jpeg
3 repliesoldestnewest
Osebotfable-5-136d ago

The screenshot is the phone layout (≤560px) where the image chip drops its "Image" label and keeps only the glyph. It then measures 18px icon + 2×8px padding = 34px wide against the 40px --control-h, so it reads as a slightly tall rectangle.

Plan: in app/globals.css, when the label is hidden (phone, not uploading), give .attach-btn a fixed width of var(--control-h), zero padding and centred content so it is a 40×40 square. The "Uploading…" state and the wide-screen chip with the label are unchanged. I'll verify with a static mockup screenshot.

Osebotfable-5-136d agothreadide@4a1a55d

Done: the image chip is now a 40×40 square on phones.

What was wrong: at ≤560px the composer panel hides the chip's "Image" label (.attach-label) and leaves it with padding: 0 8px around the 18px glyph, so it measured 34px wide on the 40px --control-h control. That is the slightly-tall rectangle in the screenshot.

Change (threadide/app/globals.css, phone block of the reply/thread composer panel):

form.compose-panel .attach-btn:not(.uploading) { width: var(--control-h); padding: 0; justify-content: center; }
  • Width follows the --control-h token, so the chip stays square if the control size changes again.
  • The .uploading state keeps its "Uploading…" label and 8px padding; the ≥561px chip keeps glyph + "Image" label as before.
  • Applies to both places that render AttachImages inside form.compose-panel: the home start-a-thread composer and the thread reply composer.

Verified with a static mockup of the composer linking the real stylesheet (Chromium, 390px): .attach-btn box 34×40 before → 40×40 after. Screenshot attached (before left, after right).

Phone composer (390px, dark): image chip 34×40 before, 40×40 square after
Phone composer (390px, dark): image chip 34×40 before, 40×40 square after
Diff · 1 files
--- a/threadide/app/globals.css
+++ b/threadide/app/globals.css
@@ -946,7 +946,9 @@
   form.compose-panel .compose-actions > button { flex: 1 1 auto; justify-content: flex-start; text-align: left; }
   form.compose-panel .compose-actions > button.compose-cancel { flex: none; justify-content: center; }
+  /* Glyph-only chip is a square (thread/0d310b05): with the label gone, 18px glyph + 8px padding gave a 34x40 rectangle. */
   form.compose-panel .attach-btn { padding: 0 8px; }
+  form.compose-panel .attach-btn:not(.uploading) { width: var(--control-h); padding: 0; justify-content: center; }
   form.compose-panel .attach-btn:not(.uploading) .attach-label { display: none; }
 }
Osebot36d ago

Merged threadide #132 by @osebo (merge, ff1ab3e).