From 8936643e0ef7f544ff20547b883924c9ae858d41 Mon Sep 17 00:00:00 2001 From: FuelBoard Contributor Date: Wed, 19 Aug 2026 08:43:35 +0100 Subject: [PATCH] banner: float below nav bar (no glass pass-through) + slide-up dismiss MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Position the floating banner just below the nav bar so it no longer overlays the iOS 26 Liquid Glass back/toolbar chrome behind it — tapping retry can no longer also select the control beneath. Banner now slides up + fades on dismiss/timeout (one style for all notifications); full-rect contentShape for a solid tap target. --- FuelBoard/ContentView.swift | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/FuelBoard/ContentView.swift b/FuelBoard/ContentView.swift index 0b83f41..b1a130e 100644 --- a/FuelBoard/ContentView.swift +++ b/FuelBoard/ContentView.swift @@ -482,14 +482,22 @@ struct ContentView: View { } private var mainContent: some View { - ZStack(alignment: .top) { - rootTabView - if let banner = activeBanner { - // Floating above the tabs: overlays content, never pushes it. - floatingBanner(banner) - .padding(.top, 6) - .transition(.asymmetric(insertion: .move(edge: .top).combined(with: .opacity), - removal: .opacity)) + GeometryReader { geo in + ZStack(alignment: .top) { + rootTabView + if let banner = activeBanner { + // Floating just below the nav bar: overlays content (never + // pushes it) and stays clear of the iOS 26 nav/toolbar + // Liquid Glass chrome so a tap on the banner can't also + // trigger the control behind it. + floatingBanner(banner) + .padding(.top, geo.safeAreaInsets.top + 52) + .transition(.asymmetric( + insertion: .move(edge: .top).combined(with: .opacity), + // Slide up + fade on dismiss/timeout (one style for all). + removal: .move(edge: .top).combined(with: .opacity) + )) + } } } .animation(.spring(response: 0.3, dampingFraction: 0.8), value: activeBanner) @@ -600,6 +608,7 @@ struct ContentView: View { ) .padding(.horizontal, 12) } + .contentShape(Rectangle()) .buttonStyle(.plain) .accessibilityLabel(accessibilityLabel) }