Feature/lazy loading air quality lists#3759
Conversation
Show per-card shimmer placeholders while the Near You tab loads, and convert the map search sheet's browse list and the dashboard Country/All tabs from eagerly-built lists to real SliverList-based lazy loading, so large lists build on demand as the user scrolls.
Air quality marker icons were rasterized at 10x10 logical pixels (vs. the helper's own 24x24 default), making them look like tiny dots. Bump to 44x44 and center-anchor the circular badge icons on their coordinate instead of the default bottom-anchor meant for teardrop pins.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughDashboard, measurements list, nearby view, and nearby measurement card widgets are refactored to use sliver-compatible layouts (SliverToBoxAdapter, SliverList). A new shimmer loader widget is added for nearby cards. Map search sheet's browse list and row rendering are restructured into slivers, and map marker sizing/anchoring is updated. ChangesDashboard and Nearby Measurement Sliver Refactor
Map Search Sheet Sliver Refactor and Marker Sizing
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR refactors several mobile UI list surfaces to integrate better with CustomScrollView slivers (enabling smoother “lazy”/in-scroll rendering) and improves loading and map marker presentation for air-quality locations.
Changes:
- Refactored map search/browse sheet content to use sliver-based layouts (
SliverMainAxisGroup,SliverList) for more consistent scroll behavior. - Replaced blocking “getting location” spinner with per-item shimmer skeleton loaders for nearby measurements.
- Increased and re-anchored Google Map markers so circular badge icons render at a usable size and are centered on coordinates.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/mobile/lib/src/app/map/widgets/map_search_sheet.dart | Converts browse/search list rendering to sliver-based composition and factors out measurement row building for reuse. |
| src/mobile/lib/src/app/map/utils/map_marker_builder.dart | Enlarges marker rasterization size and centers circular badge markers via anchor. |
| src/mobile/lib/src/app/dashboard/widgets/nearby_view.dart | Shows a list of shimmer loaders (non-scrollable, shrink-wrapped) during initial nearby loading instead of a single blocking spinner. |
| src/mobile/lib/src/app/dashboard/widgets/nearby_measurement_card.dart | Adds NearbyMeasurementCardLoader shimmer skeleton matching the measurement card layout. |
| src/mobile/lib/src/app/dashboard/widgets/measurements_list.dart | Refactors analytics measurements from a nested ListView to a SliverList for proper CustomScrollView integration. |
| src/mobile/lib/src/app/dashboard/pages/dashboard_page.dart | Updates dashboard content rendering to return slivers directly (wrapping non-sliver views in SliverToBoxAdapter). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit
New Features
Bug Fixes