UI-07: rebuild Rides History with search, activity filter, and real ride thumbnails
Restyles TripsScreen toward Map HUD's GlassPanel language: a search bar and activity-filter dropdown, four distinct summary stat cards (replacing the mockup's four-identical-cards artifact), and per-ride RideMap thumbnails showing each ride's own recorded path instead of stock photos. RideHistorySummary is a pure function rather than a provider, since folding over an already-fetched trip list is cheap regardless of history length, and it makes the aggregation directly unit-testable. Average speed is distance-weighted across the whole history rather than averaging each ride's own average. Adds a showAttribution flag to RideMap (default true) to suppress the TileAttribution control on tiny list thumbnails, where it was both a UX problem and a test collision with each card's own activity icon. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Xki7YAcc2TiN2PRZJ2tXr
This commit is contained in:
@@ -59,6 +59,7 @@ class RideMap extends StatefulWidget {
|
||||
this.showEmptyLabel = true,
|
||||
this.skeletonMode = false,
|
||||
this.showLocationMarker = false,
|
||||
this.showAttribution = true,
|
||||
});
|
||||
|
||||
final List<TrackPoint> points;
|
||||
@@ -99,6 +100,12 @@ class RideMap extends StatefulWidget {
|
||||
/// static playback, where there is no "current position" to mark.
|
||||
final bool showLocationMarker;
|
||||
|
||||
/// UI-07: false for the tiny (88x88) ride-history thumbnails, where the shared
|
||||
/// attribution control's own icon/text would be unreadable clutter repeated across
|
||||
/// dozens of list rows. The credit obligation is already discharged by every full-size
|
||||
/// map showing the same underlying tiles (Map tab, Route Planner, Trip Detail).
|
||||
final bool showAttribution;
|
||||
|
||||
@override
|
||||
State<RideMap> createState() => _RideMapState();
|
||||
}
|
||||
@@ -280,7 +287,7 @@ class _RideMapState extends State<RideMap> with WidgetsBindingObserver {
|
||||
),
|
||||
],
|
||||
),
|
||||
const TileAttribution(),
|
||||
if (widget.showAttribution) const TileAttribution(),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user