From 311f7e223794acc97af7b230248ef91fe0645b40 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 19:05:24 -0700 Subject: [PATCH] Tab Bar Load Animation Nucleic-Session: EEC60FAE-8368-49CA-9202-7026C12E7F8C Co-authored-by: Nucleic --- .../NucleicRemote/Views/AdaptiveRootView.swift | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift b/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift index a4c68b3..a2240d4 100644 --- a/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift +++ b/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift @@ -120,12 +120,27 @@ struct CompactRootView: View { } /// A preference carrying the floating bar's measured height up to `CompactRootView`, which feeds it -/// back into the bottom safe-area inset so content sits exactly above the bar. +/// back into each tab's bottom inset so content sits exactly above the bar. private struct BarHeightKey: PreferenceKey { static var defaultValue: CGFloat = 72 static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { value = nextValue() } } +/// Per-tab chrome for the compact shell: suppress the system tab bar (we draw our own) and reserve +/// `height` at the bottom of this tab's content so its scroll view lays out above the floating bar. +/// Applied to each tab rather than the `TabView`, whose container-level inset doesn't reach the tab +/// pages' scroll content. +private struct TabBarInset: ViewModifier { + let height: CGFloat + func body(content: Content) -> some View { + content + .toolbar(.hidden, for: .tabBar) + .safeAreaInset(edge: .bottom, spacing: 0) { + Color.clear.frame(height: height) + } + } +} + /// Our own bottom tab bar for the compact shell — a floating Liquid Glass capsule of four items /// (Home, Sessions, Projects, Settings), standing in for the system tab bar so `CompactRootView` /// can animate its visibility itself (see that view for why) while keeping the iOS 26 floating-glass