Esri / arcgis-maps-sdk-swift-toolkit

Mapping components that will simplify your Swift app development with the ArcGIS Maps SDK for Swift.
https://developers.arcgis.com/swift
Apache License 2.0
29 stars 7 forks source link

`FloatingPanel` - Conditionally respect device bottom safe area #518

Open des12437 opened 9 months ago

des12437 commented 9 months ago

Found on iPhone 15 Pro on iOS 17, where additional bottom spacing is needed for the Trace button. This issue could be in the floating panel component.

dfeinzimer commented 9 months ago

Ref #209, #210

mhdostal commented 9 months ago

@dfeinzimer is this a regression or an iOS 17 thing?

dfeinzimer commented 9 months ago

is this a regression or an iOS 17 thing?

Regression. We had actually found this last year in #209, fixed it with padding in #210 and then have since regressed it at some point during this release to support forms.

I've found something I've missed in the past. A native sheet will conditionally respect the device's bottom safe area depending on its content. If the content is unmovable (e.g. a button) safe areas are respected. If the content is moveable (e.g. a list) safe areas are ignored and the content flows all the way to the edge of the screen.

Button (Safe Area Respected) List (Safe Area Ignored)
sheet-button sheet-list

I've been researching how to do this but I'm not sure we have the API available to do it.

In the meantime some resolution options would be:

dfeinzimer commented 9 months ago

Present support for reflection/inspection of SwiftUI Views via the Mirror API seems rudimentary but if expanded in the future it may be useful for this and possibly #551 as well.