fix(android): split-view marker taps zoom and filter again #1195

Merged
chris merged 2 commits from ux/map-split-zoom into main 2026-10-13 13:26:29 +02:00
Owner

Summary

With the media sidebar open, marker taps only filtered the sidebar — the zoom was gone. Split-view taps now do both actions, non-split taps are byte-for-byte unchanged.

Cluster (count > 1) tap — split view: handleClusterTap(...) (animated +2-level drill-in, cancelled on touch/refit, delayed viewport re-emit) and viewModel.selectCluster(cluster.id) (sidebar filter; re-tap still toggles it off through the unchanged ViewModel).

Single-marker tap — split view: viewModel.selectCluster(cluster.id) (filters the sidebar to that one-item cluster) and viewModel.selectMarker(single.id) (opens the photo card). The sheet is a ModalBottomSheet popup, so it floats above both panes and the filtered sidebar stays visible underneath. selectMarker only writes selectedMarkerId and selectCluster only writes selectedClusterId + sidebarItems, so the two coexist without clobbering each other.

Non-split: unchanged — clusters zoom, singles open their sheet. The split flag now only gates the extra selectCluster call, which is what makes the both-actions semantics fall out of a two-line branch instead of duplicated code paths.

The listener's comment block was rewritten to document the new both-actions semantics.

Why this survives the zoom

MapViewModel.onViewportChanged recomputes sidebarItems from sidebarItemsFor(clusters, selectionSurvives) and drops a selection only when its cluster vanished from the new answer (web clearStaleClusterSelection parity) — so the filter stays applied as the drill-in lands, and clears itself honestly if the zoomed viewport no longer contains that cluster.

Not changed

MapViewModel (no behaviour or API edits — both calls already existed), non-split tap behaviour, no CHANGELOG/version edits.

Validation

  • From apps/android: ./gradlew :app:compileDebugKotlin :app:testDebugUnitTest --no-daemon → BUILD SUCCESSFUL; 422 unit tests, 0 failures / 0 errors, including MapViewModelTest (32 tests, untouched file).
  • Diff is MapScreen.kt only: 12 insertions / 10 deletions.
## Summary With the media sidebar open, marker taps only filtered the sidebar — the zoom was gone. Split-view taps now do **both** actions, non-split taps are byte-for-byte unchanged. **Cluster (count > 1) tap — split view:** `handleClusterTap(...)` (animated +2-level drill-in, cancelled on touch/refit, delayed viewport re-emit) **and** `viewModel.selectCluster(cluster.id)` (sidebar filter; re-tap still toggles it off through the unchanged ViewModel). **Single-marker tap — split view:** `viewModel.selectCluster(cluster.id)` (filters the sidebar to that one-item cluster) **and** `viewModel.selectMarker(single.id)` (opens the photo card). The sheet is a `ModalBottomSheet` popup, so it floats above both panes and the filtered sidebar stays visible underneath. `selectMarker` only writes `selectedMarkerId` and `selectCluster` only writes `selectedClusterId` + `sidebarItems`, so the two coexist without clobbering each other. **Non-split:** unchanged — clusters zoom, singles open their sheet. The split flag now only gates the *extra* `selectCluster` call, which is what makes the both-actions semantics fall out of a two-line branch instead of duplicated code paths. The listener's comment block was rewritten to document the new both-actions semantics. ### Why this survives the zoom `MapViewModel.onViewportChanged` recomputes `sidebarItems` from `sidebarItemsFor(clusters, selectionSurvives)` and drops a selection only when its cluster vanished from the new answer (web `clearStaleClusterSelection` parity) — so the filter stays applied as the drill-in lands, and clears itself honestly if the zoomed viewport no longer contains that cluster. ## Not changed `MapViewModel` (no behaviour or API edits — both calls already existed), non-split tap behaviour, no CHANGELOG/version edits. ## Validation * From `apps/android`: `./gradlew :app:compileDebugKotlin :app:testDebugUnitTest --no-daemon` → **BUILD SUCCESSFUL**; **422 unit tests, 0 failures / 0 errors**, including `MapViewModelTest` (32 tests, untouched file). * Diff is `MapScreen.kt` only: 12 insertions / 10 deletions.
fix(android): split-view marker taps zoom and filter again
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 5s
Build and Deploy / Android unit tests and debug APK (push) Successful in 3m14s
17f5030f37
Cluster taps in split view now run handleClusterTap (animated +2 zoom, delayed viewport emit) AND selectCluster; single-marker taps keep selectCluster and also selectMarker so the photo card opens beside the filtered sidebar. Non-split behaviour is unchanged (zoom for clusters, sheet for singles) because the split flag only gates the extra selectCluster call. Listener comment updated to document the both-actions semantics.
docs(android): selectCluster no longer replaces the zoom
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 7s
Build and Deploy / Android unit tests and debug APK (push) Successful in 8m56s
e4234b301b
chris merged commit 2fb40120b6 into main 2026-10-13 13:26:29 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1195
No description provided.