From e2f66fe622d5f8bebddd49e6a4623ce6d9c37548 Mon Sep 17 00:00:00 2001 From: maaz519 Date: Sat, 25 Jul 2026 17:29:46 +0530 Subject: [PATCH] fix(messaging-ui): composer input back to its original 38px height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0.1.11 left it at 40px with line-height 1.45, so the line (20.3px) overflowed the 20px content box — taller than the it replaced, and liable to show a scrollbar on a single line. Collapsed height is now one token, --miu-composer-h: 38px, shared by the textarea, attach and send so they cannot drift apart again. Padding tightened to 8px (from .miu-input's 9px) with line-height 1.4, so a 14px line is 19.6 + 16 + 2 = 37.6px and fits exactly — matching the original single-line input. Co-Authored-By: Claude Opus 4.8 --- packages/iios-messaging-ui/package.json | 2 +- packages/iios-messaging-ui/src/styles.css | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/iios-messaging-ui/package.json b/packages/iios-messaging-ui/package.json index d250721..4c0fb1d 100644 --- a/packages/iios-messaging-ui/package.json +++ b/packages/iios-messaging-ui/package.json @@ -1,6 +1,6 @@ { "name": "@insignia/iios-messaging-ui", - "version": "0.1.11", + "version": "0.1.12", "type": "module", "main": "dist/index.js", "module": "dist/index.js", diff --git a/packages/iios-messaging-ui/src/styles.css b/packages/iios-messaging-ui/src/styles.css index f6c07cf..5cdd7b3 100644 --- a/packages/iios-messaging-ui/src/styles.css +++ b/packages/iios-messaging-ui/src/styles.css @@ -10,6 +10,8 @@ --miu-accent: #fda913; --miu-accent-text: #1a1206; --miu-radius: 12px; + /* Collapsed composer height — textarea, attach and send all use this so they never diverge. */ + --miu-composer-h: 38px; display: flex; height: 100%; @@ -380,8 +382,8 @@ .miu-attach-btn { flex-shrink: 0; box-sizing: border-box; - width: 40px; - height: 40px; + width: var(--miu-composer-h); + height: var(--miu-composer-h); border-radius: 10px; border: 1px solid var(--miu-border); background: var(--miu-panel); @@ -525,10 +527,14 @@ button.miu-attach-dl:hover { .miu-textarea { box-sizing: border-box; resize: none; - min-height: 40px; + /* Collapsed height must equal the single-line this replaced: 20px of line + 16px + padding + 2px border = 38px. Padding is tightened from .miu-input's 9px so a 14px/1.4 line + fits the content box exactly — at 9px it overflowed and forced a scrollbar. */ + padding: 8px 12px; + line-height: 1.4; + min-height: var(--miu-composer-h); max-height: 160px; overflow-y: auto; - line-height: 1.45; font-family: inherit; } .miu-format-bar { @@ -597,7 +603,7 @@ button.miu-attach-dl:hover { .miu-composer .miu-send { box-sizing: border-box; flex-shrink: 0; - height: 40px; + height: var(--miu-composer-h); } .miu-send:disabled { opacity: 0.5;