-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fixed Navigation Toolbar Visibility Issue on Dynamic Flyout Reset in FlyoutPage. #28209
base: main
Are you sure you want to change the base?
Conversation
Hey there @prakashKannanSf3972! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This pull request addresses a bug where the navigation toolbar unexpectedly disappears on dynamic flyout resets in a FlyoutPage. The changes include adding a new unit test to verify toolbar visibility on flyout reset, and updating the NavigationPageToolbar logic to handle early returns when detecting a FlyoutPage as a parent.
Reviewed Changes
File | Description |
---|---|
src/Controls/tests/Core.UnitTests/FlyoutPageUnitTests.cs | Added a new test method to verify that setting a new flyout page maintains the toolbar’s visibility across different flyout page depths. |
src/Controls/src/Core/NavigationPage/NavigationPageToolbar.cs | Updated the OnPageAppearing method to include an early return if the current page is already part of a FlyoutPage, preventing redundant toolbar updates. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Issue Details
In a FlyoutPage, The Flyout section contains a ContentPage, and the Detail section is a ContentPage wrapped within a NavigationPage. The NavigationPage includes a TitleView. When the Flyout property is dynamically reset (e.g., Flyout = new ContentPage()), the navigation toolbar unexpectedly disappears in the FlyoutPage.
Root Cause
When the refreshed Flyout page is not a child of a NavigationPage, the toolbar visibility is set to false, resulting in its disappearance from the FlyoutPage.
Description Of Change
In a FlyoutPage, the Detail page handles navigation and determines the toolbar's visibility state. The change ensures that when the Flyout Page is CurrentPage, it returns early. When the Detail page is already managing the toolbar visibility, it prevents redundant updates and maintains the intended behavior.
Tested the behaviour in the following platforms
Issues Fixed
Fixes #21645
Output
BeforeFix.mov
AfterFix.mov
Before-Fix.mp4
After-Fix.mp4