fix: keep bottom card clear of a trailing safe-area inset - #31
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
mapEdgePaddingstill never pads on the trailing side, so a map manager that fits content withedgePaddingcould place it under the bar.Testing
Needs a manual check on the iPhone Duo simulator (Xcode 27.1):
🤖 Generated with Claude Code