[Bottom Sheet] Merge duplicate detents + other fixes#2254
Closed
[Bottom Sheet] Merge duplicate detents + other fixes#2254
Conversation
…panded Dynamic height resolvers can produce a partial height effectively equal to collapsed or expanded. This caused invisible state cycling on handle taps, incorrect pan snapping, and meaningless delegate notifications. Add supportsCollapsedState and supportsPartialState computed properties that gate detent availability. Partial is skipped when its height is within a merge threshold of collapsed or expanded. Collapsed is skipped when the sheet is height-restricted. Layout changes that invalidate the current detent reposition the sheet to expanded with delegate notification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
joannaquu
approved these changes
Mar 19, 2026
Sources/FluentUI_iOS/Components/BottomSheet/BottomSheetController.swift
Outdated
Show resolved
Hide resolved
Sources/FluentUI_iOS/Components/BottomSheet/BottomSheetController.swift
Outdated
Show resolved
Hide resolved
joannaquu
approved these changes
Mar 19, 2026
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.
We saw a bug where the partial detent height wasn't accounting for bottom safe area.
While fixing that, I noticed we have a lot of bugs around detent availability in restricted height scenarios. Dynamic height resolvers can produce a partial height effectively equal to collapsed or expanded. This caused invisible state cycling on handle taps, incorrect pan snapping, and meaningless delegate notifications.
Add supportsCollapsedState and supportsPartialState computed properties that gate detent availability. Partial is skipped when its height is within a merge threshold of collapsed or expanded. Collapsed is skipped when the sheet is height-restricted. Layout changes that invalidate the current detent reposition the sheet to expanded with delegate notification.
Platforms Impacted
Description of changes
(a summary of the changes made, often organized by file)
Binary change
(how is our binary size impacted -- see https://github.com/microsoft/fluentui-apple/wiki/Size-Comparison)
Verification
(how the change was tested, including both manual and automated tests)
Visual Verification
Pull request checklist
This PR has considered:
Microsoft Reviewers: Open in CodeFlow