Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloatingPanel - Conditionally respect device bottom safe area #518

Open
des12437 opened this issue Nov 29, 2023 · 4 comments
Open

FloatingPanel - Conditionally respect device bottom safe area #518

des12437 opened this issue Nov 29, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@des12437
Copy link
Contributor

des12437 commented Nov 29, 2023

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.

@des12437 des12437 added the bug Something isn't working label Nov 29, 2023
@dfeinzimer dfeinzimer self-assigned this Nov 29, 2023
@dfeinzimer
Copy link
Collaborator

Ref #209, #210

@mhdostal
Copy link
Member

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

@dfeinzimer
Copy link
Collaborator

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:

  • A. Apply padding at the example level for compact environments.
  • B. Use a native sheet with background interaction enabled for compact environments (16.4+ only).
  • C. Add a parameter to the floating panel to respect/ignore the safe area.
  • D. Always respect safe areas in the floating panel (lists won't look great).
  • E. Leave as is as known issue.

@dfeinzimer dfeinzimer changed the title Utility Network Trace Trace button needs spacing FloatingPanel - Conditionally respect device bottom safe area Dec 1, 2023
dfeinzimer added a commit that referenced this issue Dec 4, 2023
@dfeinzimer
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants