Skip to content

fix: keep bottom card clear of a trailing safe-area inset - #31

Merged
nighthawk merged 1 commit into
mainfrom
fix/card-trailing-safe-area
Sep 19, 2026
Merged

nighthawk merged 1 commit into
mainfrom
fix/card-trailing-safe-area

Conversation

@nighthawk

@nighthawk nighthawk commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Why

On iPhone Duo, the system puts the status bar and an app's navigation bar items in a vertical bar down the side of the screen. The app sees that bar as an ordinary safe-area inset of about 84 pt on whichever side it's on.

In compact width with regular height (the bottom-card layout), the card's leading edge followed the safe area but its trailing edge ran to the view's edge. With the app in the left half of the unfolded Duo, the bar is on the leading side and the card cleared it. In the right half the bar is on the trailing side, and the card, its header and its title-view buttons ran underneath it. No earlier iPhone had side insets in portrait, and in landscape or regular width the card moves to the side, where this constraint isn't used. That's why it never showed up before.

What

A one-line xib change: the card's trailing constraint (DGx-yq-huX) now pins to the safe area instead of the content view, the same as the leading one. The header and the card-attached floating toolbar are pinned to the card, so they follow. Nothing changes where there are no side insets (other iPhones, iPad, Mac Catalyst's sidebar mode).

Not covered here: mapEdgePadding still never pads on the trailing side, so a map manager that fits content with edgePadding could place it under the bar.

Testing

Needs a manual check on the iPhone Duo simulator (Xcode 27.1):

  • App in the right half of the unfolded inner display: the card stops at the vertical bar (the bug).
  • App in the left half: unchanged, the card still stops at the bar on the leading side.
  • Folded, portrait (bar on the right): the card stops at the bar and doesn't run under the outer camera.
  • Folded landscape both ways and unfolded full screen: the card sits at the side as before.
  • In the above, drag the card between collapsed, peeking and extended, push and pop a card, and show a card with a header.
  • Regression: iPhone portrait and landscape, iPad split screen at compact width.

🤖 Generated with Claude Code

In compact width, the card's leading edge followed the safe area but its
trailing edge ran to the view's edge. On iPhone Duo the vertical bar arrives
as a side safe-area inset, so with the app in the right half of the inner
display (or folded, in portrait) the card ran under the bar. Pin the
trailing edge to the safe area as well, mirroring the leading edge. No
change where there's no side inset.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nighthawk
nighthawk merged commit aafaec3 into main Sep 19, 2026
2 of 3 checks passed
@nighthawk
nighthawk deleted the fix/card-trailing-safe-area branch September 19, 2026 09:35
@nighthawk nighthawk added the bug Something isn't working label Sep 19, 2026
@nighthawk nighthawk self-assigned this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant