Add onPresentation handler to present methods - #356
Conversation
|
If possible, I'd appreciate a look at this soon, as I'd like to use it in my codebase to replace some custom presentation logic, especially since we already use swift-navigation in other places. Any thoughts on this approach or feature in general? |
|
@jshier Haven't had time to dig in yet but from our Slack convo it sounded reasonable. We have a lot of other items we are working through at the moment so we don't know when we'll get to this, but you should be able to point to your fork in the meantime. |
|
Unfortunately that would require forking every library that depends on swift-navigation, as SPM uses the URL for identity, so my fork won't replace the library dynamically. That may only be TCA, but I can't ship a double forked change for this. If you won't get to this for a while I can ship a poor workaround in the meantime, when I need to. |
|
In the meantime, anything I can do to better prove the change here? Any test scenarios to add to the example app? |
|
@jshier It'd be nice to get some coverage in the |
|
I added a few tests, let me know if there are any additional specific cases you'd like covered. I've also been thinking about my underlying need here, which is an |
This PR adds an
onPresentationclosure to be called when UIKit presentation completes, using the standardcompletionparameter.This is a first pass at a simple integration of this feature, as there are a few unresolved questions.
onDismissdoesn't have any tests, just example calls, so that's what I matched.IDof the presentation? It might be useful for things like TCA, where callers may want to take different actions on presentation and dismissal depending on theCaseScope.presentlevel since that's whereonDimissis implemented, and because that's where UIKit'spresentis called. Is there any desire to move this closure andonDimissdown todestinationin some way?