-
Notifications
You must be signed in to change notification settings - Fork 10
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
Floating Panel dismiss button #923
Comments
The example does not allow closing the trace, but I can see the benefit in having a "Cancel" button, maybe alongside the "Trace" and "Clear All Results" buttons. The "Clear All Results" button gets cut off in your second screen shot; the "Trace" button, prior to running a trace, does not; there must be a slight difference in how those two are handled. |
It's not necessarily "cancel". But more like "Done" or "Close". And I don't know that it belongs in the trace component. I think it's the app developer to decide when and how to close it on devices like a phone where it's covering a lot of the real estate. I think this is more of a floating panel issue potentially. Or something odd in the way the floating panel and the trace component work together. |
Coincidentally I received a question this morning from Kotlin about support for programatic trace starting points which got me thinking about a potential workaround for this in interim lieu of custom header support or a close button on the Floating Panel. Replace UtilityNetworkTraceExampleView.swift.zip Untitled.mov |
I like that idea. In practice, this doesn't work that well. Maybe it's just a bug in the example code and could be fixed. Also, tapping "Add New" raises questions about what it should do in that case. |
Agreed, opened issue #925 |
I can't get the UNTrace component to work well in a floating panel when trying to add content (ie Title and Dismiss button) above it. These things just aren't quite playing nicely together. Is there a way to limit the floating panel detent to full and half? That could work for my scenario. |
Not directly currently. I'd think monitoring (and programmatically setting when desired) the bound |
I wonder if it would be good to have a built-in way to dismiss the floating panel. Since the drag bar is on the panel, maybe there should be some sort of option for a dismiss/close button. Also the panel has a binding to the isPresented, so it could easily set that to false. |
I think this definitely makes sense to add. |
I'm not quite sure where the problem is here. If I add a close button to the floating panel with a utility network trace component, I get this which looks good some of the time:
But in some cases when the floating panel is collapsed, the close button is hidden:
Is there a better way to support the workflow where you want to dismiss the floating panel and cancel the trace?
The text was updated successfully, but these errors were encountered: