Repository navigation
Show the iOS sheet grabber only on a sheet that can be resized - #200
Merged
Merged
Conversation
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>
Member
|
I concur. Thanks for this |
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.
The iOS bottom sheet forces
.presentationDragIndicator(.visible), so every sheet has a grabber. That includes a sheet with a single detent, likelargeorfit, 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
.automaticleaves the grabber to the system. On an iPhone 17 Pro simulator (iOS 26.3):detentsmedium,large(the default)largefitSwipe-down to dismiss works the same either way. Android doesn't change.
Testing
tests/BottomSheetRendererTest.phppins.automatic, and it fails without the change.composer test(486 passed) andcomposer lint:testpass.#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