Skip to content

update map bottom inset with controls minimization#143

Merged
chizberg merged 1 commit into
mainfrom
bottomInsets
Jul 5, 2026
Merged

update map bottom inset with controls minimization#143
chizberg merged 1 commit into
mainfrom
bottomInsets

Conversation

@chizberg

@chizberg chizberg commented Jul 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

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 updates map layout behavior so the MKMapView’s bottom inset tracks the MapControls panel height and its minimization state, keeping map controls/attribution from being obscured. It also refines zoom calculation heuristics and refactors RootView ↔︎ MapViewModel wiring to use a dedicated view store.

Changes:

  • Update MKMapView bottom layout margins based on MapControls size + minimization state (with animation).
  • Adjust zoom level calculations to use the larger span/size dimension and update interpolation points accordingly.
  • Refactor RootView to use a scoped RootView.Map.Store for map-related view state/actions and propagate controls size changes into the map model.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Rewind/Screens/Map/Zoom.swift Updates zoom heuristics to use max span/size dimension and refreshes adjustment breakpoints.
Rewind/Screens/Map/RewindMap.swift Adds bottom inset updating and disables safe-area-driven layout margin insets on the map view.
Rewind/Screens/Map/MapModel.swift Extends controls state/actions to track controls view size and store it in state.
Rewind/Screens/Map/Controls/MapControls.swift Centralizes controls animation, makes glimpse height configurable, and exposes minimized offset constant.
Rewind/Screens/Map/Controls/FloatingMenu.swift Aligns FloatingMenu animation timing with MapControls animation.
Rewind/App/RootView.swift Introduces a scoped RootView.Map store and reports controls size changes to the map model.
Rewind/App/RewindApp.swift Updates RootView construction to pass the new scoped map store.
Rewind/App/AppGraph.swift Wires controls minimization + size to map bottom inset updates; introduces a debug assert around map lazy-loading timing.
Rewind.xcodeproj/project.pbxproj Bumps build and marketing versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 8 to 10
import MapKit
import SwiftUI
import VGSL
Comment on lines +81 to +86
func updateBottomInset(_ inset: CGFloat) {
UIView.animate(mapControlsAnimation) {
map.layoutMargins.bottom = inset
map.layoutIfNeeded()
}
}
@chizberg chizberg linked an issue Jul 5, 2026 that may be closed by this pull request
@chizberg chizberg merged commit 30b769b into main Jul 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjust map visibility area accordingly to MapControls visibility

2 participants