fix: resolve 4 UI/planning bugs from issue tracker

- Lock all maps to North America (no pan/zoom) in ProgressMapView and TripDetailView
- Sort saved trips by most cities (stops count)
- Filter cross-country trips to top 2 by stops on home screen
- Use LocationSearchSheet for Follow Team home location (consistent with must-stop)
- Initialize DateRangePicker to show selected dates on appear

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-11 18:46:40 -06:00
parent c2f52aaccc
commit 81095a8170
9 changed files with 418 additions and 88 deletions

View File

@@ -436,6 +436,11 @@ struct SavedTripsListView: View {
let trips: [SavedTrip]
@Environment(\.colorScheme) private var colorScheme
/// Trips sorted by most cities (stops) first
private var sortedTrips: [SavedTrip] {
trips.sorted { ($0.trip?.stops.count ?? 0) > ($1.trip?.stops.count ?? 0) }
}
var body: some View {
ScrollView {
if trips.isEmpty {
@@ -460,7 +465,7 @@ struct SavedTripsListView: View {
.frame(maxWidth: .infinity)
} else {
LazyVStack(spacing: Theme.Spacing.md) {
ForEach(Array(trips.enumerated()), id: \.element.id) { index, savedTrip in
ForEach(Array(sortedTrips.enumerated()), id: \.element.id) { index, savedTrip in
if let trip = savedTrip.trip {
NavigationLink {
TripDetailView(trip: trip, games: savedTrip.games)
@@ -476,6 +481,7 @@ struct SavedTripsListView: View {
}
}
.themedBackground()
.navigationTitle("My Trips")
}
}