[Windows] Fix IsPresented property not updating correctly in FlyoutPage#28471
[Windows] Fix IsPresented property not updating correctly in FlyoutPage#28471rmarinho merged 9 commits intodotnet:mainfrom
Conversation
|
Hey there @devanathan-vaithiyanathan! 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.
Pull Request Overview
This PR fixes an issue where the FlyoutPage's IsPresented property was not updating correctly on Windows by wiring the PaneClosed event.
- Added PaneClosed event handling in the FlyoutViewHandler for Windows.
- Created a new test case in TestCases.HostApp and an automated UI test in TestCases.Shared.Tests to validate the fix.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Controls/tests/TestCases.HostApp/Issues/Issue28440.cs | Added new UI for manually testing the flyout state behavior. |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28440.cs | Introduced an automated UI test ensuring IsPresented state transitions work correctly. |
| src/Core/src/Handlers/FlyoutView/FlyoutViewHandler.Windows.cs | Wired the PaneClosed event to correctly update IsPresented when the flyout closes. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
left a comment
There was a problem hiding this comment.
The test FlyoutContentTests is failing on Windows.
at UITest.Appium.HelperExtensions.Click(IUIElement element) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 287
at UITest.Appium.HelperExtensions.Tap(IApp app, String element) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 25
at Microsoft.Maui.TestCases.Tests.Issues.ShellFlyoutContent.FlyoutContentTests() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/ShellFlyoutContent.cs:line 32
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Could you verify if is related with the changes?
@jsuarezruiz , We couldn't reproduce the failure locally, but I've added a null check to further improve the fix. Let me know if any changes needed |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Issue Details
The IsPresented property does not update correctly after closing the flyout. Once the flyout is closed, attempting to set IsPresented = true does not reopen it.
Description of Change
Wired the PaneClosed event to ensure the IsPresented property is updated properly. This ensures that the flyout opens and closes as expected when toggled via button click.
Issues Fixed
Fixes #28440
Tested the behavior in the following platforms.
Output Screenshot
Before-Fix.mp4
After-Fix.mp4