Skip to content

fix(ios): keep the locate button above the sheet when a platform is picked - #70

Merged
i11v merged 2 commits into
mainfrom
fix/ios-locate-button-hidden
Nov 18, 2026
Merged

i11v merged 2 commits into
mainfrom
fix/ios-locate-button-hidden

Conversation

@i11v

@i11v i11v commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Requested by Ilnur · project thread

Before: picking a platform (tapping its pin on the map, sometimes its tab) with the sheet below 460pt raised the sheet, but the locate button vanished. It came back once the sheet was dragged.

After: the button stays 12pt above the sheet.

How:

  • selectPlatform set activePlatform (a plain change) and then called setSheet(460) (animated) in the same turn. When those meet in one SwiftUI update, one of the two views that read sheetHeight, the locate button overlay in StopCanvas or StopSheet, misses the animated change and stays at the old height until the next sheet change. Usually that's the button, left behind the sheet; sometimes the sheet stays put instead.
  • The sheet is now sized first in selectPlatform and in switchStop (which cleared searchOpen/query before resizing). setSheet documents the rule.

Checked in the iPhone 17 simulator (iOS 26.5) with frame logging and an in-app loop that lowers the sheet and selects a platform 60 times:

  • old order: button stuck 60/60; new order: 0/60
  • no animation, sheet change alone, or both changes in one withAnimation: 0/60. Turning off the map side effects (setSelected, focusPlatform, layoutMargins) didn't help, so MapKit isn't involved.
  • a real map-pin tap: button at y=360, 12pt above the sheet; a 180-step random stress run (tabs, stop picks, journeys, recenter, drags): no stuck layouts
  • unit tests pass

Not tried on a phone yet.

Also in this PR: the iOS workflow's "Pick an iPhone simulator" step failed on the current macOS runner image, because one iOS runtime key now ends in a device suffix (-iPhone19) and jq's tonumber choked on it. The step now parses only the leading version.

https://claude.ai/code/session_01S7UaeeDEqNxUmz8Y2r7bRL


Generated by Claude Code

…icked

Picking a platform changed `activePlatform` and then animated the sheet up
to 460 in the same turn. When a plain state change and an animated
`sheetHeight` change land in one SwiftUI update, one of the two views that
read `sheetHeight` (the locate button overlay or the sheet) can miss the
animated change and stay at the old height until the next sheet change. The
button then sat behind the sheet until the sheet was dragged.

Size the sheet first in `selectPlatform` and `switchStop`, and note the
rule on `setSheet`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S7UaeeDEqNxUmz8Y2r7bRL
@i11v i11v self-assigned this Nov 18, 2026
The macOS runner image now has an iOS runtime whose key ends in a device
suffix ("-iPhone19"), so `tonumber` failed and no simulator was picked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S7UaeeDEqNxUmz8Y2r7bRL
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed: https://preview-70.tablo.run
fallback: https://tablo-pr-70.i11v.workers.dev

@i11v
i11v marked this pull request as ready for review November 18, 2026 10:14
@i11v
i11v merged commit 488297e into main Nov 18, 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.

2 participants