Skip to content

Conversation

@veronicasalas
Copy link
Contributor

@veronicasalas veronicasalas commented Dec 18, 2025

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

In iOS 26, the bottom sheet’s content is designed to align concentrically with the sheet’s rounded corners. However, the presence of the resizingHandleView introduces a visible gap between the content and the corner, breaking this concentric alignment.

To address this, the resizingHandleView needs to overlap the bottom sheet’s content, so I’m introducing the new property, shouldResizingViewOverlayContent, which enables this behavior when set to true (the default is false).

When this option is enabled, the layout applies resizingHandleContentOverlapConstraints which shifts the headerContentView or expandedContentView up and also ensures that the resizingHandleView is brought to the front of the view hierarchy so it appears above the content as intended.

Binary change

(how is our binary size impacted -- see https://github.com/microsoft/fluentui-apple/wiki/Size-Comparison)

Verification

Visual Verification

Before
https://github.com/user-attachments/assets/6ac7b1fc-4a90-45ec-a95d-35f942ba2ee5

After
https://github.com/user-attachments/assets/450286ad-deab-4fe9-8dea-056e7a726304

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@veronicasalas veronicasalas marked this pull request as ready for review December 18, 2025 20:06
@veronicasalas veronicasalas requested a review from a team as a code owner December 18, 2025 20:06
])

if let headerContentView {
resizingHandleContentOverlapConstraints = headerContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor, constant: -currentResizingHandleHeight)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just constrain to top anchor instead of constraining to bottom anchor and then applying negative offset?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the resizing view should just be added as a subview of the bottomSheetContentView. It shouldn't matter what's in the content, just that we overlay on top. And then depending on the bool value, we either shift the content stack down by the resizing handle height, or not. No constraint activating / deactivating needed.

} else {
resizingHandleContentOverlapConstraints = expandedContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor, constant: -currentResizingHandleHeight)
}
stackView.bringSubviewToFront(resizingHandleView)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe uikit works in order so if you add resizing handle last, you won't have to call bring subview to front

private func updateResizingHandleConstraints() {
if let resizingHandleContentOverlapConstraints {
if shouldResizingViewOverlayContent {
NSLayoutConstraint.activate([resizingHandleContentOverlapConstraints])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will there not be conflicting constraints now?

stackView.bottomAnchor.constraint(equalTo: bottomSheetContentView.bottomAnchor)
])

if let headerContentView {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine with the if let on line 706

@joannaquu
Copy link
Contributor

nit: update view hierarchy on line 470

if let headerContentView {
resizingHandleContentOverlapConstraints = headerContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor, constant: -currentResizingHandleHeight)
} else {
resizingHandleContentOverlapConstraints = expandedContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor, constant: -currentResizingHandleHeight)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll need to account for new height in expandedSheetHeight/collapsedSheetHeight

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.

4 participants