Repository navigation
Commit 2c0132a
committed
feat(chat): stack the composer's header, chips and field
The composer layout photos need, without the photos. ChatInput becomes a
custom Layout (ComposerMeasurePolicy) that stacks an optional header row
(reply strip or photo chips) over the text field and lays out the
accessory and send button around it, matching the iOS composer.
- composerStacks() decides when the field goes multi-line; it is pure and
covered by ComposerStackingTest.
- Height changes, the single-line to multi-line switch and the header
arriving or leaving all ease on one spring (dampingRatio 1, ~0.28s, the
iOS replySurface curve), so the field and its text move together.
- Corners stay concentric: the field's corner is the header chip's corner
plus the inset, on one line or stacked.
- The header strip fades only at an edge it has scrolled past.
- Sizes come from the static grid; the one-line field is FieldPadding +
AccessorySize + FieldPadding, the same 50dp as the $ button.1 parent 014c6a8 commit 2c0132a
2 files changed
Lines changed: 583 additions & 114 deletions
File tree
- ui/components/src
- main/kotlin/com/getcode/ui/components/chat
- test/kotlin/com/getcode/ui/components/chat
0 commit comments