Skip to content

Show the iOS sheet grabber only on a sheet that can be resized - #200

Merged
simonhamp merged 1 commit into
NativePHP:mainfrom
Hesesses:fix/sheet-grabber
Nov 5, 2026
Merged

simonhamp merged 1 commit into
NativePHP:mainfrom
Hesesses:fix/sheet-grabber

Conversation

@Hesesses

@Hesesses Hesesses commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

The iOS bottom sheet forces .presentationDragIndicator(.visible), so every sheet has a grabber. That includes a sheet with a single detent, like large or fit, which can't be dragged to another height.

Apple's HIG (Sheets) says to include a grabber in a resizable sheet. It shows people that they can drag the sheet to resize it, and it lets VoiceOver users resize it. On a sheet that can't resize, it promises something that isn't there.

The fix

.automatic leaves the grabber to the system. On an iPhone 17 Pro simulator (iOS 26.3):

detents grabber
medium,large (the default) shown
large hidden
fit hidden

Swipe-down to dismiss works the same either way. Android doesn't change.

Testing

  • One test in tests/BottomSheetRendererTest.php pins .automatic, and it fails without the change. composer test (486 passed) and composer lint:test pass.
  • I ran the sheet's modifiers in a small SwiftUI app on the simulator for the three rows above.
  • Our app has run this as a patch on 0.9.0.

#199 (the sheet title) and #196 edit the same renderer and test file. All of them merge cleanly in either order.

🤖 Generated with Claude Code

The bottom sheet forced `.presentationDragIndicator(.visible)`, so every
sheet had a grabber, also one with a single detent that can't be dragged
to another height. Apple's HIG (Sheets) puts a grabber in a resizable
sheet: it shows the sheet can be dragged to resize and lets VoiceOver
resize it. On a sheet that can't resize it promises something that
isn't there.

`.automatic` leaves it to the system, which shows the grabber on the
default "medium,large" sheet and hides it on a single detent ("large",
"fit"). Swipe-down to dismiss works the same either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp

simonhamp commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

I concur. Thanks for this

@simonhamp
simonhamp merged commit ce62733 into NativePHP:main Nov 5, 2026
4 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