feat: use a one-line textarea for the swipe-type field #44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/compose-textarea"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Textareainstead of anInput. Mobile keyboards autocorrect and swipe-type more reliably in a textarea, which is the point of the field.rows={1},resize="none",minH="0",overflow="hidden"andwrap="off". The text never wraps and a long line scrolls inside the field, so the key bar keeps its height.Enterstill sends the text plus\rand clears the field; the keydown handler is unchanged. The ref type becomesHTMLTextAreaElement.adr/ui.md.Test plan
npm run typechecknpm run buildMUX_PORTAL_UI_SKIP_BUILD=1 cargo test --workspace(57 + 9 + 4 + 1 tests pass)catsession as the target:rows=1,wrap="off",resize: none, 38px tall (one 20px line plus 8px padding and 1px borders), versus the 36px input before;hello-composeand pressing Enter cleared the field andtmux capture-paneshowedhello-composein the pane, so the send path and Enter handling still work;scrollWidth537 againstclientWidth342 — no growth, no wrapping;The composer is a textarea with rows={1}, wrap=off and no resize, so mobile keyboards autocorrect and swipe-type better while the bar keeps a single line. Enter still sends, long lines scroll inside the field.