-
-
Notifications
You must be signed in to change notification settings - Fork 5
Fix for AutoDisconnectHandler not checking modal pages #32
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: develop
Are you sure you want to change the base?
Fix for AutoDisconnectHandler not checking modal pages #32
Conversation
Thanks for the PR @brendonupson , so per what I understand, this PR will fix the broken layout when using the segmented control on modals, am I correct? I'm asking this because I'm facing this issue on a demo mobile app: cc: @thomasgalliker |
I reviewed the PR #31. I think the described scenario with modal pages should already be handled by method PageHelper.GetNavigationTree(...). You cannot just check the Application.Current.MainPage.Navigation.ModalStack for the target page because there could be nested navigation stacks. GetNavigationTree should take care of recursively traversing trough all nested pages. |
@brendonupson or @vhugogarcia can you provide a very small sample app (or show me how I can reproduce the error in the sample app in this repository)? The sample app in this repository has some PushModalAsync navigations. |
I have a sample app linked to the issue. It can be a little challenging to reproduce, but basically if you make some visual elements above the SegmentedControl disappear, when the modal re-appears (page redraw?) you should see the layout break. Sorry, the example screenshots attached to the issue were not super obvious. |
Yes, this looks very much like the issue I was facing. It is now resolved in my production app with this PR (linked to my forked project). |
Thanks @brendonupson for the information, and @thomasgalliker for looking into. I cloned the repository, tested the change on this PR and the issue persisted. So, I went ahead upgraded the project to .NET 9 and the issue is partially fixed. You load a segment and the layout is broken, then load another, then back to the first segment and it looks OK, then again same steps and layout is broken. I am trying to see if I can figure it out the root cause. However, one thing I noticed that is affecting the layout is the labels. Because the buttons, inputs and images are not being impacted. I will see if I can provide a repo repository for a quick test. I am basically using the segmented control on a modal page nothing especially, and using the Test2 sample you provided with MVVM. 😎 |
Added extra checks for modal stack. Now uses fall through logic when checking