From a2caaab5742c7c61b445d209ffb46c152324dae1 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Wed, 7 Oct 2026 17:53:17 -0400 Subject: [PATCH] fix(chat): merge Send Cash's glass back into the field Typing into an empty draft left the `$` glass where it stood and faded it while the widening field slid over it, so the two edge highlights stacked into a ripple. #1008 joins glass within 8pt, and `$` rests 10pt from the field, so the removed glass had nothing in reach to morph into. The `$` glass now stays mounted. Hidden, it shrinks to 40% and sits in the field's rounded end, so hiding and showing it is a size change the glass container blends rather than an insert and remove. --- .../Conversation/ConversationBottomBar.swift | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Flipcash/Core/Screens/Conversation/ConversationBottomBar.swift b/Flipcash/Core/Screens/Conversation/ConversationBottomBar.swift index c18678671..a131d47f6 100644 --- a/Flipcash/Core/Screens/Conversation/ConversationBottomBar.swift +++ b/Flipcash/Core/Screens/Conversation/ConversationBottomBar.swift @@ -360,10 +360,21 @@ struct ConversationBottomBar: View { Color.clear .frame(maxWidth: .infinity, maxHeight: .infinity) .composerGlass(in: field, id: "field", namespace: composerGlassNamespace) - if leadingControl == .cash, cashIsShown { + if leadingControl == .cash { + // Kept mounted and tucked into the field's trailing end while hidden. Removed, it + // stood past the join distance and dissolved in place under the widening field. + let side = BarMetrics.contentHeight + let tucked = side * 0.4 Color.clear - .frame(width: BarMetrics.contentHeight, height: BarMetrics.contentHeight) - .composerGlass(in: Circle(), id: "cash", namespace: composerGlassNamespace) + .frame(width: cashIsShown ? side : 0, height: side) + .padding(.leading, cashIsShown ? 0 : -Self.leadingSpacing) + .overlay(alignment: .trailing) { + Color.clear + .frame(width: cashIsShown ? side : tucked, height: cashIsShown ? side : tucked) + .composerGlass(in: Circle(), id: "cash", namespace: composerGlassNamespace) + // Centred in the field's rounded end, clear of its edge. + .padding(.trailing, cashIsShown ? 0 : (side - tucked) / 2) + } } } if #available(iOS 26, *) {