fix: multiple bug fixes and improvements

- Fix suggested trips showing wrong sports for cross-country trips
- Remove quick start sections from home variants (Classic, Spotify)
- Remove dead quickActions code from HomeView
- Fix pace capsule animation in TripCreationView
- Add text wrapping to achievement descriptions
- Improve poll parsing with better error handling
- Various sharing system improvements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-14 09:35:18 -06:00
parent fe36f99bca
commit d034ee8612
22 changed files with 422 additions and 242 deletions

View File

@@ -28,10 +28,6 @@ struct HomeContent_Classic: View {
.padding(.horizontal, Theme.Spacing.md)
.padding(.top, Theme.Spacing.sm)
// Quick Actions
quickActions
.padding(.horizontal, Theme.Spacing.md)
// Suggested Trips
suggestedTripsSection
.padding(.horizontal, Theme.Spacing.md)
@@ -97,28 +93,6 @@ struct HomeContent_Classic: View {
.shadow(color: Theme.cardShadow(colorScheme), radius: 15, y: 8)
}
// MARK: - Quick Actions
private var quickActions: some View {
VStack(alignment: .leading, spacing: Theme.Spacing.sm) {
Text("Quick Start")
.font(.title2)
.foregroundStyle(Theme.textPrimary(colorScheme))
SportSelectorGrid { _ in
showNewTrip = true
}
.padding(.horizontal, Theme.Spacing.md)
.padding(.vertical, Theme.Spacing.md)
.background(Theme.cardBackground(colorScheme))
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.large))
.overlay {
RoundedRectangle(cornerRadius: Theme.CornerRadius.large)
.stroke(Theme.surfaceGlow(colorScheme), lineWidth: 1)
}
}
}
// MARK: - Suggested Trips
@ViewBuilder

View File

@@ -36,10 +36,6 @@ struct HomeContent_Spotify: View {
.padding(.horizontal, 16)
.padding(.top, 12)
// Quick actions
quickActions
.padding(.horizontal, 16)
// Your trips
if !savedTrips.isEmpty {
yourTripsSection
@@ -91,62 +87,6 @@ struct HomeContent_Spotify: View {
}
}
// MARK: - Quick Actions
private var quickActions: some View {
LazyVGrid(columns: [GridItem(.flexible()), GridItem(.flexible())], spacing: 10) {
// New trip button
quickActionButton(title: "Plan Trip", icon: "plus.circle.fill", isPrimary: true) {
showNewTrip = true
}
// Saved trips button
if !savedTrips.isEmpty {
quickActionButton(title: "Your Trips", icon: "folder.fill", isPrimary: false) {
selectedTab = 2
}
}
// First saved trip quick access
if let firstTrip = savedTrips.first?.trip {
quickActionButton(title: firstTrip.name, icon: "play.circle.fill", isPrimary: false) {
// Could navigate to trip
}
}
// Refresh suggestions
quickActionButton(title: "Refresh", icon: "arrow.clockwise", isPrimary: false) {
Task {
await suggestedTripsGenerator.refreshTrips()
}
}
}
}
private func quickActionButton(title: String, icon: String, isPrimary: Bool, action: @escaping () -> Void) -> some View {
Button(action: action) {
HStack(spacing: 10) {
Image(systemName: icon)
.font(.system(size: 22))
.foregroundStyle(isPrimary ? spotifyGreen : textPrimary)
Text(title)
.font(.system(size: 13, weight: .semibold))
.foregroundStyle(textPrimary)
.lineLimit(1)
Spacer()
}
.padding(.horizontal, 12)
.padding(.vertical, 10)
.background(
RoundedRectangle(cornerRadius: 6)
.fill(cardBg)
)
}
.buttonStyle(.plain)
}
// MARK: - Your Trips Section
private var yourTripsSection: some View {