Skip to content

Feature/lazy loading air quality lists#3759

Merged
Baalmart merged 2 commits into
stagingfrom
feature/lazy-loading-air-quality-lists
Jul 7, 2026
Merged

Feature/lazy loading air quality lists#3759
Baalmart merged 2 commits into
stagingfrom
feature/lazy-loading-air-quality-lists

Conversation

@Mozart299

@Mozart299 Mozart299 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added richer loading placeholders for nearby measurements, improving feedback while location-based results load.
    • Updated map markers to appear larger and centered more accurately on the selected location.
  • Bug Fixes

    • Improved dashboard and map search layouts so content renders more smoothly in scrolling views.
    • Refined search and browse list behavior to keep loading, empty, and results states consistent.

Mozart299 added 2 commits July 7, 2026 11:57
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.
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 151e1e8a-12f9-4ec4-a733-8d8255e257f2

📥 Commits

Reviewing files that changed from the base of the PR and between 2aac7fa and 67f2e07.

📒 Files selected for processing (6)
  • src/mobile/lib/src/app/dashboard/pages/dashboard_page.dart
  • src/mobile/lib/src/app/dashboard/widgets/measurements_list.dart
  • src/mobile/lib/src/app/dashboard/widgets/nearby_measurement_card.dart
  • src/mobile/lib/src/app/dashboard/widgets/nearby_view.dart
  • src/mobile/lib/src/app/map/utils/map_marker_builder.dart
  • src/mobile/lib/src/app/map/widgets/map_search_sheet.dart

📝 Walkthrough

Walkthrough

Dashboard, 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.

Changes

Dashboard and Nearby Measurement Sliver Refactor

Layer / File(s) Summary
Dashboard page sliver wrapping
src/mobile/lib/src/app/dashboard/pages/dashboard_page.dart
CustomScrollView slivers now return content directly, with loading, error, favorites, near you, explore, and fallback branches each wrapped in SliverToBoxAdapter.
MeasurementsList sliver conversion
src/mobile/lib/src/app/dashboard/widgets/measurements_list.dart
build returns SliverList with SliverChildBuilderDelegate instead of ListView.builder, dropping physics, shrinkWrap, and padding.
Nearby measurement loader and view update
src/mobile/lib/src/app/dashboard/widgets/nearby_measurement_card.dart, src/mobile/lib/src/app/dashboard/widgets/nearby_view.dart
Adds NearbyMeasurementCardLoader shimmer skeleton widget and updates NearbyView's loading state to render fixed-count placeholder loader cards via ListView.builder.

Map Search Sheet Sliver Refactor and Marker Sizing

Layer / File(s) Summary
Search sheet sliver branch updates
src/mobile/lib/src/app/map/widgets/map_search_sheet.dart
BlocBuilder branches for empty search, loading, and loaded states adjusted so _BrowseList and _SearchResults fit correctly within the sliver tree.
_BrowseList sliver layout and row rendering
src/mobile/lib/src/app/map/widgets/map_search_sheet.dart
_BrowseList.build refactored into SliverMainAxisGroup/SliverPadding/SliverList; measurement row generation reorganized into _measurementRows/_measurementRow helpers.
Map marker icon size and anchor
src/mobile/lib/src/app/map/utils/map_marker_builder.dart
Marker icon size increased to 44x44 and marker anchor set to Offset(0.5, 0.5) to center on coordinates.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: mobile-app

Suggested reviewers: Baalmart

Poem

A sliver here, a sliver there,
The scroll view now floats light as air.
Shimmer cards where spinners stood,
Markers centered, looking good.
Rabbit hops through code with glee — 🐇
Ship it clean, and let it be!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main theme of the PR: improving air quality list rendering with lazy-loading/loading-state behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/lazy-loading-air-quality-lists

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Baalmart
Baalmart merged commit b7caabf into staging Jul 7, 2026
23 of 25 checks passed
@Baalmart
Baalmart deleted the feature/lazy-loading-air-quality-lists branch July 7, 2026 12:32
@Baalmart Baalmart mentioned this pull request Jul 7, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants