Skip to content
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

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

Conversation

prakashKannanSf3972
Copy link
Contributor

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

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #21645

Output

Before After
BeforeFix.mov
AfterFix.mov
Before-Fix.mp4
After-Fix.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Mar 6, 2025
Copy link
Contributor

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.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Mar 6, 2025
@prakashKannanSf3972 prakashKannanSf3972 marked this pull request as ready for review March 6, 2025 07:00
@Copilot Copilot bot review requested due to automatic review settings March 6, 2025 07:00
@prakashKannanSf3972 prakashKannanSf3972 requested a review from a team as a code owner March 6, 2025 07:00
Copy link
Contributor

@Copilot Copilot AI left a 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.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 9 SR5 milestone Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-flyout Flyout area-controls-flyoutpage FlyoutPage area-navigation NavigationPage community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

Android - Navigation Title disappears if Flyout is set to a new window
3 participants