-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Route Composer does not find a ViewController inside a tab bar when it is being pushed #33
Comments
Hi @0rtm and thank you. Ill have a look later today and will try to come with some answer asap. |
@0rtm I just built a case to reproduce you issue, and i could not. Push worked fine for me to find the enclosed |
Here is my tabbar factory code
This is how I handle url
The bug happens when context is different and Route Composer needs to rebuild the entire stack |
@0rtm
But i assume in your case you expect that the RedViewController will be found without rebuilding the whole view controller stack (it is obviously not necessary). And just it context will be updated. |
|
And you can see in your log
Your stack is being rebuild every time. |
Please tell me if i understand correctly your business needs, then we can proceed. |
@0rtm If you actually need to rebuild the whole stack in this case (i am not sure why, but lets say it is so). You need to put a break point in to
|
@ekazaev I my case it needs to rebuild the entire stack. User selects account first and then goes to the appropriate tabbar |
@0rtm Ok, let assume it is so. Then it seems that there is something with the isTarget/Equatable implementation. Basically you need to try to do what i asked:
|
@ekazaev I just tried it, Red VC isTarget is called only once Implementation is very simple
|
Here is
|
I think the problem has something to do with push animation. |
@0rtm can you send me your test project if it is possible? |
@0rtm so i wont build the stack myself. It can be a bug, or it can be the issue I mentioned before with the action. Unfortunately I deleted the code as I thought it’s not the case |
@ekazaev Here is the example project https://github.com/0rtm/RouteComposerBug.
|
@0rtm I see the issue. It is not exactly the RouteComposer issue, but there is a way to avoid such UIKit behaviour for sure. |
@0rtm https://www.dropbox.com/s/vwpl3so5kqykhit/BugFix.mov?dl=0 the behaviour after the fix |
@0rtm New 2.1.4 version of RouteComposer is released and the issue you are facing is fixed there. It is also covered by the UI test so it wont appear in future. Thank you for help. If you'll have any other issues or questions, please do not hesitate to open another issue. |
@0rtm As a suggestion:
|
@ekazaev thanks! You are doing a great work |
@0rtm I was actually in rush and did not notice that i was testing your code with my modifications :( Youll still have to update to even newer version 2.1.5 and use a tweak static var accountHome: DestinationStep <TabbarViewController, NavigationContext?> {
return StepAssembly(
finder: ClassWithContextFinder<TabbarViewController, NavigationContext?>(),
factory: TabBarFactory())
.using(CATransaction.wrap(UINavigationController.push()))
.from(accountSelector.expectingContainer())
.assemble()
} When the push and then pop happens one after another |
I really like your framework. It works great. However I found a small bug.
I have the following setup:
Each
ViewController
hasNavigationContext
object that isEquatable
. This context is set on theTabBar
too.When tabbar is pushed, first
NavigationController
(Nav1) is being hidden.When tabbar is popped, first
NavigationController
(Nav1) is shown againHere is routes configuration:
The bug happens when
RedViewController
is selected and app tries to deeplink toRedViewController
but with a different context.Here is full console output when this happens:
The text was updated successfully, but these errors were encountered: