Skip to content

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

brendonupson
Copy link

Added extra checks for modal stack. Now uses fall through logic when checking

@vhugogarcia
Copy link

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:
image

cc: @thomasgalliker

@thomasgalliker
Copy link
Owner

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.

@thomasgalliker
Copy link
Owner

@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.

@brendonupson
Copy link
Author

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.

@brendonupson
Copy link
Author

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: image

cc: @thomasgalliker

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).

@vhugogarcia
Copy link

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. 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants