Fix detail issues in the stacked mobile bottom drawers #142

Merged
raucao merged 1 commits from bugfix/stacked_drawer_details into master 2026-12-01 06:56:27 +00:00
Owner

Follow-up polish for the swipeable, stacked mobile bottom drawers (#141).

Place-details header gap: the place details drawer uses a compact header, but its title started only 8px below the header top while the standard 56px drawer headers put the title about 16px down. The top padding now matches, so the place name is no longer crammed against the drag handle.

Marker jitter while dragging: updateSelectedPin read mapUi.sheetInsetPx through its centering helpers, so it re-ran on every drag frame, restarting the pin's drop-in animation and re-targeting the map each frame. The inset is now read untracked, so the pin only updates when the selection or the settled layout changes.

Re-center after resizing: when a drawer settles at a new detent, the selected place is re-centered in the visible area above the sheet. A settle that keeps the same detent instead pans the marker only if it ended up hidden, which also restores the auto-pan for the first drawer open after selecting a place.

Entrance direction: the entrance used to commit translateY(0) as the transition's start (the layout flush in measure() ran while the offset was still unset), so sheets appeared to shrink down from the top. The hidden position is now committed with the transform transition disabled first, so sheets slide up from the bottom.

Testing: new acceptance tests cover the header gap, the per-frame pin recompute, and the settle recenter/pan behaviour. The two bottom-sheet tests were verified to fail against the unfixed code. pnpm lint passes and pnpm test is 582/582.

Follow-up polish for the swipeable, stacked mobile bottom drawers (#141). Place-details header gap: the place details drawer uses a compact header, but its title started only 8px below the header top while the standard 56px drawer headers put the title about 16px down. The top padding now matches, so the place name is no longer crammed against the drag handle. Marker jitter while dragging: `updateSelectedPin` read `mapUi.sheetInsetPx` through its centering helpers, so it re-ran on every drag frame, restarting the pin's drop-in animation and re-targeting the map each frame. The inset is now read untracked, so the pin only updates when the selection or the settled layout changes. Re-center after resizing: when a drawer settles at a new detent, the selected place is re-centered in the visible area above the sheet. A settle that keeps the same detent instead pans the marker only if it ended up hidden, which also restores the auto-pan for the first drawer open after selecting a place. Entrance direction: the entrance used to commit `translateY(0)` as the transition's start (the layout flush in `measure()` ran while the offset was still unset), so sheets appeared to shrink down from the top. The hidden position is now committed with the transform transition disabled first, so sheets slide up from the bottom. Testing: new acceptance tests cover the header gap, the per-frame pin recompute, and the settle recenter/pan behaviour. The two bottom-sheet tests were verified to fail against the unfixed code. `pnpm lint` passes and `pnpm test` is 582/582.
raucao added 1 commit 2026-12-01 06:46:01 +00:00
Fix detail issues in the stacked mobile bottom drawers
CI / Lint (pull_request) Successful in 1m42s
CI / Test (pull_request) Successful in 2m5s
Release Drafter / Update release notes draft (pull_request) Successful in 48s
76067e011d
- Place details header now keeps the same top gap as the standard 56px
  drawer header, so the place name is not crammed against the drag handle.
- Read the sheet inset untracked in the map's pin/center helpers so
  updateSelectedPin no longer re-runs on every drag frame. This stops the
  selected marker from jittering while a drawer is dragged.
- Re-center the selected place in the resized visible area when a drawer
  settles at a new detent, and pan it clear of the sheet on a same-size
  settle (restores the auto-pan that untracking removed).
- Commit the sheet's hidden position with the transform transition
  disabled so the entrance animates from fully hidden and slides up,
  instead of shrinking down from the top.
- Add acceptance tests for the header gap, the per-frame pin recompute,
  and the settle recenter/pan behaviour.
raucao added the bugenhancementui/ux labels 2026-12-01 06:56:19 +00:00
raucao merged commit 6c7abec4ec into master 2026-12-01 06:56:27 +00:00
raucao deleted branch bugfix/stacked_drawer_details 2026-12-01 06:56:29 +00:00
Sign in to join this conversation.