fix: speed pill and feedback in same VStack — no more guessing position
All checks were successful
Security Checks / dependency-audit (push) Successful in 13s
Security Checks / secret-scanning (push) Successful in 4s
Security Checks / dockerfile-lint (push) Successful in 4s

Speed pill and feedback button were in separate VStacks with
independent absolute padding, causing misalignment. Now they share
one VStack with .padding(.bottom, 70) at the container level.
The speed pill sits directly above the tab bar area, positioned
relative to the same anchor as all other bottom controls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-04 08:55:30 -05:00
parent a452c0d4f2
commit e37444c62e

View File

@@ -73,23 +73,12 @@ struct MainTabView: View {
.tint(Color.accentWarm)
.tabBarMinimizeBehavior(.onScrollDown)
// Feedback button (not on Reader)
if selectedTab != 2 {
VStack {
Spacer()
HStack {
FeedbackButton()
.padding(.leading, 20)
Spacer()
}
.padding(.bottom, 70)
}
}
// Bottom floating controls
VStack(spacing: 10) {
Spacer()
// Auto-scroll speed controls (overlay when playing on Reader)
if isAutoScrolling && selectedTab == 2 {
VStack {
Spacer()
// Speed pill (only when auto-scrolling on Reader)
if isAutoScrolling && selectedTab == 2 {
HStack(spacing: 12) {
Button {
scrollSpeed = max(0.25, scrollSpeed - 0.25)
@@ -117,11 +106,20 @@ struct MainTabView: View {
.padding(.vertical, 10)
.background(.regularMaterial, in: Capsule())
.shadow(color: .black.opacity(0.15), radius: 12, y: 4)
.padding(.bottom, 50)
.transition(.move(edge: .bottom).combined(with: .opacity))
}
.animation(.spring(duration: 0.3), value: isAutoScrolling)
// Feedback button (not on Reader)
if selectedTab != 2 {
HStack {
FeedbackButton()
.padding(.leading, 20)
Spacer()
}
}
}
.padding(.bottom, 70)
.animation(.spring(duration: 0.3), value: isAutoScrolling)
}
.confettiCannon(
trigger: $confettiTrigger,