ux(map): tablet split layout — photos beside the map, stable MapView across mode switches #1189

Merged
chris merged 1 commit from ux/map-tablet-split-layout into main 2026-10-13 09:50:59 +02:00
Owner

Summary\n- Root cause of the tablet 'map jumps/covers things when showing photos': the Fotos toggle moved MapPane between different composition slots, disposing and recreating the osmdroid MapView (gray flash, world zoom, camera refit) on every switch.\n- New single MapSplitBody layout: MapPane always composed in one stable slot; mode switch is pure relayout. >= 600dp windows show photos side-by-side (map ~61.8% width, sidebar ~38.2% — same golden ratio as the web map); < 600dp keeps the stacked split. Chip row is a fixed-height Column sibling and can never be covered.\n- SidebarGrid now sizes its thumbnail cells by actual pane width instead of screen width (memory + sharpness on side-by-side tablets).\n- No ViewModel changes, no string changes; phone behavior unchanged.\n\n## Testing\n- rtk ./gradlew :app:compileDebugKotlin green\n- rtk ./gradlew :app:testDebugUnitTest green (MapViewModelTest 31/31, MapCameraFitTest 10/10, MarkerThumbnailsTest 21/21)

## Summary\n- Root cause of the tablet 'map jumps/covers things when showing photos': the Fotos toggle moved MapPane between different composition slots, disposing and recreating the osmdroid MapView (gray flash, world zoom, camera refit) on every switch.\n- New single MapSplitBody layout: MapPane always composed in one stable slot; mode switch is pure relayout. >= 600dp windows show photos side-by-side (map ~61.8% width, sidebar ~38.2% — same golden ratio as the web map); < 600dp keeps the stacked split. Chip row is a fixed-height Column sibling and can never be covered.\n- SidebarGrid now sizes its thumbnail cells by actual pane width instead of screen width (memory + sharpness on side-by-side tablets).\n- No ViewModel changes, no string changes; phone behavior unchanged.\n\n## Testing\n- `rtk ./gradlew :app:compileDebugKotlin` green\n- `rtk ./gradlew :app:testDebugUnitTest` green (MapViewModelTest 31/31, MapCameraFitTest 10/10, MarkerThumbnailsTest 21/21)
fix(android): map split view keeps one MapView; sidebar decodes at pane size
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 2s
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 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 4s
Build and Deploy / Android unit tests and debug APK (push) Successful in 3m6s
2b32009ece
Tablet report: toggling the photo sidebar made the map jump/flash as if it
covered the chrome. Root cause: the if/else between MapPane and the
Row/Column split containers moved the AndroidView between composition
slots, so every toggle (and every 600dp-threshold crossing) disposed and
rebuilt the osmdroid MapView — world zoom, tile refetch, camera re-fit.

- MapSplitBody: hand-rolled Layout; the map pane is always child 0 at a
  stable composition slot, so stacked (<600dp, map top ~38.2%) vs
  side-by-side (map left ~61.8%, web golden-ratio parity) is pure
  relayout. The MapView, its camera, overlays and warm tile cache
  survive; the chips row stays the Column's first child, never covered.
- SidebarGrid: cell decode size from the pane's real width instead of
  screen width (side-by-side panes are a fraction of the window).
- No behaviour, VM or string changes; phone stacked layout unchanged.
chris merged commit 20410d9ca4 into main 2026-10-13 09:50:59 +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!1189
No description provided.