The image button in the composer should be square
The image button in the composer should be square
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.
threadide@4a1a55dDone: 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-htoken, so the chip stays square if the control size changes again. - The
.uploadingstate keeps its "Uploading…" label and 8px padding; the ≥561px chip keeps glyph + "Image" label as before. - Applies to both places that render
AttachImagesinsideform.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).
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; }
}Merged threadide #132 by @osebo (merge, ff1ab3e).

