Repository navigation
fix(chat): match the composer's Send Cash morph to iOS - #1704
Merged
Merged
Conversation
#1702 put the send button inside the field's clip at the field's current edge, so typing showed it left of the $ and then slid it right as the field widened. It now appears at the $'s centre and overhangs the field's edge until the field catches up; the clip takes the overhang into account. Clearing still lets it ride the field's edge in. Timing follows code-payments/code-ios-app#1008: the $ shrinks to 0.4 toward the field's trailing edge, waits 0.1s before coming back, and fades on its own 0.12s ease-in and 0.1s ease-out. The send button waits 0.16s for the $ to merge, except while editing. The field spring keeps iOS's damping ratio (0.88) but uses stiffness 520 instead of 224. On iOS the glass merge makes the edge read as settled by about 200ms; Android has no glass merge, so at 224 the field visibly took the full ~300ms.
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.
Follow-up to #1702, whose $ button animation still differed from iOS.
Typing. #1702 laid the send button out inside the field's clip at the field's current edge, so it appeared to the left of the $ and then slid right as the field widened. It now appears at the $'s centre and overhangs the field's edge until the field catches up. The field's clip is the field's shape joined with the send button's, so the overhang isn't cut off. Clearing is unchanged: the send button rides the field's edge in, as on iOS.
Timing follows code-payments/code-ios-app#1008 (still open):
cashGlyphTravel.cashBudDelay) before the field gives it room, and its glyph fades in over 0.12s ease-in. It fades out over 0.1s ease-out with no delay.cashJoinDelay), except while editing. Android hides the $ while editing, so the condition is the $ being present.Field spring. iOS uses
spring(duration: 0.42, bounce: 0.12), which is damping ratio 0.88, stiffness 224. Android keeps the damping ratio but uses stiffness 520. On iOS the field's glass flows into the $'s within about 70ms, so the edge reads as settled by about 200ms. Android has no glass merge, so the edge is the only motion and took the full ~300ms at 224. Measured from screen recordings, iOS #1008 runs 268ms typing and 387ms clearing on the simulator; this branch runs 249ms and 353ms on a Seeker.Not ported from #1008: dropping the composer rim on iOS 26 (Android draws its own rim, and iOS drops it because its glass draws an edge) and the glass join distance (Android doesn't merge shapes).