Repository navigation
Let the composer card animate line growth instead of the field's own spring - #151
Merged
Merged
Conversation
…spring The composer field ran its own spring (ComposerLineGrowth) to grow a line at a time while holding the caret's line in place. The session composer card already animates its size with animateContentSize(alignment = BottomStart), which gives the same bottom-held growth, so the field now takes its new height at once and the card animates it. Removes the spring, the hold and the two ported tests that covered only them. The line cap and the last-line double tap stay: the cap's top inset scrolls away with the text and the caret follow works unfocused, and the double tap handles a second tap that lands just below the field. Verified: vm.sh check passes; on the emulator, dev 3da8e20 vs this branch: typing a long draft (one line's growth settles in about 0.26-0.35 s on both), reaching the max height and scrolling, deleting back down, double-tap word selection on the last line, font scale 1.3.
This was referenced Nov 18, 2026
Closed
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The composer field no longer runs its own spring to grow a line at a time. It takes its new height at once, and the session composer card's existing
animateContentSize(alignment = BottomStart)animates the growth. That removesComposerLineGrowth, the caret-line hold and the two ported tests that covered only them (noted in thedocs/parity/composer.mdrow).The other two hand-built pieces stay:
maxHeightInLineswould leave a fixed band and only follow a focused caret.BasicTextFieldalready handles double taps inside the field. The custom code catches a second tap that lands just below the field (row gap, model chip), which would otherwise hit the chip.Visible difference from
dev(tested): when the caret is on an earlier line and a typed word makes the field grow, the top of line 1 is cut off at the card's edge until the card catches up. Over two runs it lasted 0.08 s and 0.13–0.2 s. At real speed it looks like a brief flicker of the top line. Ondev, the caret-line hold kept line 1 whole; it touches the card's edge but isn't cut. The video shows this at real speed and slowed 4× (both sides slowed the same).No other differences found:
dev.before-after.mp4
Left:
dev3da8e20. Right: this branch. Real speed except the one segment marked as slowed.Verified:
vm.sh checkpasses. On the emulator I tested typing a long draft, reaching the max height and scrolling it, and deleting back down. I also tested the caret-on-line-1 growth and shrink, paste (Ctrl+V), Reduce Motion, double-tap word selection on the last line, and font scale 1.3.Not tested: a physical hardware keyboard (keys were sent as adb key events, including Ctrl+V and Shift+Enter), long-press selection.