-
Notifications
You must be signed in to change notification settings - Fork 11
Add FloatingPanelDetent.Preference
#1163
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
base: v.next
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good and is a nice way to override the detentions when a component needs to.
A reservation I have with this approach is that supporting the same behavior for sheets seems problematic. Sheets (surprisingly) don't animate nicely when nested views with the Should we forego this magic approach and instead have developers manage their detents by adding more cases to |
Will this alleviate the problems with sheets? |
It doesn't seem to. There's some discussion about this issue here, but I haven't yet been able to make the suggestions work correctly with our views. Regardless, it might be best overall to take the sheet/panel agnostic approach and just report what the user is doing via the new cases suggested above on |
Ok. Let's try and make it the default/predominant use case work with little or not extra code. |
In certain situations, a view presented in a floating panel needs the map view to be revealed for user interaction:
Typically, this would require the presented view to have a binding to the floating panel's detent; however, the view might not be presented in a floating panel. By providing this internal preference, Toolkit components can communicate a preferred detent to the Floating Panel without developers needing to write any code. Example usage.
UtilityNetworkTrace.floatingPanelDetent(_:)
be deprecated?