Skip to content

[Windows] - Resolved FlyoutBehavior "Locked" State Reset Issue After Navigation #27379

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

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

prakashKannanSf3972
Copy link
Contributor

Root Cause

The visibility of the FlyoutIcon is determined by the DrawerToggleVisible value. In ShellView, the condition for DrawerToggleVisible was solely based on the StackCount and did not account for scenarios where the Shell was in the Flyout state. This caused the DrawerToggleVisible to return true incorrectly, leading to the FlyoutIcon displayed after back navigation.

Description of Change

Updated the DrawerToggleVisible value to account for FlyoutBehavior, ensuring that the FlyoutIcon visibility accurately reflects the Shell's Flyout state. This prevents the FlyoutIcon from being incorrectly displayed after navigation when the Shell is in Disabled and Locked mode.

Issues Fixed

Fixes #27337

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Ouput

Before After
BeforeFix.mp4
AfterFix.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 27, 2025
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 27, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

App.Tap("SecondPageButton");
App.WaitForElement("GoBackButton");
App.Tap("GoBackButton");
VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending snapshots. Already available in the latest build. For example:

image
Could you commit the images?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz, Thank you for highlighting this! In the latest commit, the test case was updated by replacing VerifyScreenShot with WaitForNoElement to ensure the absence of the Flyout icon. This modification eliminates the need to add snapshots for the test.

@prakashKannanSf3972 prakashKannanSf3972 marked this pull request as ready for review January 31, 2025 17:19
@prakashKannanSf3972 prakashKannanSf3972 requested a review from a team as a code owner January 31, 2025 17:19
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Feb 3, 2025

/rebase

@PureWeen
Copy link
Member

PureWeen commented Feb 3, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 9 SR4 milestone Feb 4, 2025
@PureWeen
Copy link
Member

PureWeen commented Feb 5, 2025

  • failing tests unrelated

@PureWeen PureWeen merged commit 0ecb276 into dotnet:main Feb 5, 2025
118 of 124 checks passed
@hwsmo
Copy link

hwsmo commented Feb 14, 2025

Hi! Unfortunately, this change was not a good solution. Reason: In the delegate "getDefaultNavBarIsVisible" the current FlyoutBehavior value of the _shell is no longer accessed, but rather the previously determined value.

image

After navigating to another page in the app and navigating back again, the visibility of the drawer toggle button is no longer updated correctly when the FlyoutBehavior is changed from the state "Locked" to "Flyout"

This is exactly the case I have in my app now.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-flyout Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows 🪟
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Flyout with FlyoutBehavior="Locked" unlocks (reverts to Flyout) after navigation.
5 participants