2
0
Fork 0

feat: use a one-line textarea for the swipe-type field #44

Merged
aleksei merged 1 commit from feat/compose-textarea into main 2026-11-29 16:09:42 +00:00
Owner

Summary

  • The swipe-type composer is now a Chakra Textarea instead of an Input. Mobile keyboards autocorrect and swipe-type more reliably in a textarea, which is the point of the field.
  • It stays exactly one row tall: rows={1}, resize="none", minH="0", overflow="hidden" and wrap="off". The text never wraps and a long line scrolls inside the field, so the key bar keeps its height.
  • Enter still sends the text plus \r and clears the field; the keydown handler is unchanged. The ref type becomes HTMLTextAreaElement.
  • Update the README and adr/ui.md.

Test plan

  • npm run typecheck
  • npm run build
  • MUX_PORTAL_UI_SKIP_BUILD=1 cargo test --workspace (57 + 9 + 4 + 1 tests pass)
  • Mobile Playwright with a temporary cat session as the target:
    • the composer renders one textarea with rows=1, wrap="off", resize: none, 38px tall (one 20px line plus 8px padding and 1px borders), versus the 36px input before;
    • typing hello-compose and pressing Enter cleared the field and tmux capture-pane showed hello-compose in the pane, so the send path and Enter handling still work;
    • a 65-character line left the height at 38px with scrollWidth 537 against clientWidth 342 — no growth, no wrapping;
    • the temporary session was killed afterwards.
## Summary - The swipe-type composer is now a Chakra `Textarea` instead of an `Input`. Mobile keyboards autocorrect and swipe-type more reliably in a textarea, which is the point of the field. - It stays exactly one row tall: `rows={1}`, `resize="none"`, `minH="0"`, `overflow="hidden"` and `wrap="off"`. The text never wraps and a long line scrolls inside the field, so the key bar keeps its height. - `Enter` still sends the text plus `\r` and clears the field; the keydown handler is unchanged. The ref type becomes `HTMLTextAreaElement`. - Update the README and `adr/ui.md`. ## Test plan - `npm run typecheck` - `npm run build` - `MUX_PORTAL_UI_SKIP_BUILD=1 cargo test --workspace` (57 + 9 + 4 + 1 tests pass) - Mobile Playwright with a temporary `cat` session as the target: - the composer renders one textarea with `rows=1`, `wrap="off"`, `resize: none`, 38px tall (one 20px line plus 8px padding and 1px borders), versus the 36px input before; - typing `hello-compose` and pressing Enter cleared the field and `tmux capture-pane` showed `hello-compose` in the pane, so the send path and Enter handling still work; - a 65-character line left the height at 38px with `scrollWidth` 537 against `clientWidth` 342 — no growth, no wrapping; - the temporary session was killed afterwards.
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.
aleksei deleted branch feat/compose-textarea 2026-11-29 16:09:42 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zoo/mux-portal!44
No description provided.