[Windows] FlyoutPage: Fix CollapsedPaneWidth mapping and updates - #33786
Conversation
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR fixes the FlyoutPage CollapsedPaneWidth property on Windows by implementing proper mapping from the MAUI property to the native NavigationView.CompactPaneLength property. The fix enables both initial and dynamic configuration of the collapsed pane width when using CollapseStyle.Partial.
Changes:
- Added property change callback to trigger handler updates when CollapsedPaneWidth changes
- Registered mapper for CollapsedPaneWidth property in FlyoutPage handler
- Implemented mapper to apply CollapsedPaneWidth to native NavigationView.CompactPaneLength
- Added UI test to verify CollapsedPaneWidth works both initially and when changed dynamically
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Controls/src/Core/PlatformConfiguration/WindowsSpecific/FlyoutPage.cs | Added property changed callback (OnCollapsedPaneWidthChanged) to trigger handler updates when CollapsedPaneWidth property changes |
| src/Controls/src/Core/FlyoutPage/FlyoutPage.Mapper.cs | Registered mapper for CollapsedPaneWidthProperty and implemented MapCollapsedPaneWidth to apply the value to NavigationView.CompactPaneLength |
| src/Controls/tests/TestCases.HostApp/Issues/Issue33785.cs | Created UI test page that demonstrates CollapsedPaneWidth functionality with initial value (50) and dynamic change (100) |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33785.cs | Implemented automated UI test that verifies CollapsedPaneWidth changes are applied correctly using screenshot verification |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 33786Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 33786" |
|
/azp run maui-pr-uitests |
|
Could you please add the Windows snapshot? :) |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kubaflo
left a comment
There was a problem hiding this comment.
Could you please add a snapshot?
|
Azure Pipelines successfully started running 3 pipeline(s). |
kubaflo
left a comment
There was a problem hiding this comment.
Could you please check the ai's suggestions?
|
/review -b feature/enhanced-reviewer -p windows |
|
@kubaflo , Based on AI suggestion, I have added the windows snapshot. |
|
/review -b feature/enhanced-reviewer -p windows |
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@devanathan-vaithiyanathan — new AI review results are available based on this last commit:
24007f5. To request a fresh review after new comments or commits, comment/review rerun.
Review Sessions — click to expand
Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: WINDOWS · Base: main · Merge base: bb4e7040
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue33785 Issue33785 |
✅ FAIL — 587s | ✅ PASS — 532s |
🔴 Without fix — 🖥️ Issue33785: FAIL ✅ · 587s
Determining projects to restore...
Restored D:\a\1\s\src\Controls\src\Core\Controls.Core.csproj (in 44.13 sec).
Restored D:\a\1\s\src\Controls\Maps\src\Controls.Maps.csproj (in 43.94 sec).
Restored D:\a\1\s\src\Controls\Foldable\src\Controls.Foldable.csproj (in 447 ms).
Restored D:\a\1\s\src\BlazorWebView\src\Maui\Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 3.43 sec).
Restored D:\a\1\s\src\Graphics\src\Graphics.Win2D\Graphics.Win2D.csproj (in 35 ms).
Restored D:\a\1\s\src\Essentials\src\Essentials.csproj (in 20 ms).
Restored D:\a\1\s\src\Graphics\src\Graphics\Graphics.csproj (in 3.08 sec).
Restored D:\a\1\s\src\Core\maps\src\Maps.csproj (in 22 ms).
Restored D:\a\1\s\src\Core\src\Core.csproj (in 547 ms).
Restored D:\a\1\s\src\Controls\src\Xaml\Controls.Xaml.csproj (in 20 ms).
Restored D:\a\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj (in 981 ms).
3 of 14 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Graphics.Win2D -> D:\a\1\s\artifacts\bin\Graphics.Win2D\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Maps -> D:\a\1\s\artifacts\bin\Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Maps.dll
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Microsoft.AspNetCore.Components.WebView.Maui -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Components.WebView.Maui\Debug\net10.0-windows10.0.19041.0\Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Xaml -> D:\a\1\s\artifacts\bin\Controls.Xaml\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Xaml.dll
Controls.Foldable -> D:\a\1\s\artifacts\bin\Controls.Foldable\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Controls.Maps -> D:\a\1\s\artifacts\bin\Controls.Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> D:\a\1\s\artifacts\bin\Controls.TestCases.HostApp\Debug\net10.0-windows10.0.19041.0\win-x64\Controls.TestCases.HostApp.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:06:13.57
Determining projects to restore...
Restored D:\a\1\s\src\Controls\tests\CustomAttributes\Controls.CustomAttributes.csproj (in 1.01 sec).
Restored D:\a\1\s\src\TestUtils\src\VisualTestUtils\VisualTestUtils.csproj (in 4 ms).
Restored D:\a\1\s\src\TestUtils\src\VisualTestUtils.MagickNet\VisualTestUtils.MagickNet.csproj (in 4.82 sec).
Restored D:\a\1\s\src\TestUtils\src\UITest.NUnit\UITest.NUnit.csproj (in 1.98 sec).
Restored D:\a\1\s\src\TestUtils\src\UITest.Core\UITest.Core.csproj (in 2 ms).
Restored D:\a\1\s\src\TestUtils\src\UITest.Appium\UITest.Appium.csproj (in 51 ms).
Restored D:\a\1\s\src\Controls\tests\TestCases.WinUI.Tests\Controls.TestCases.WinUI.Tests.csproj (in 8.79 sec).
Restored D:\a\1\s\src\TestUtils\src\UITest.Analyzers\UITest.Analyzers.csproj (in 4.38 sec).
7 of 15 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0\Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0\Microsoft.Maui.Essentials.dll
Controls.CustomAttributes -> D:\a\1\s\artifacts\bin\Controls.CustomAttributes\Debug\net10.0\Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0\Microsoft.Maui.dll
Controls.Core.Design -> D:\a\1\s\artifacts\bin\Controls.Core.Design\Debug\net472\Microsoft.Maui.Controls.DesignTools.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0\Microsoft.Maui.Controls.dll
UITest.Core -> D:\a\1\s\artifacts\bin\UITest.Core\Debug\net10.0\UITest.Core.dll
VisualTestUtils -> D:\a\1\s\artifacts\bin\VisualTestUtils\Debug\netstandard2.0\VisualTestUtils.dll
VisualTestUtils.MagickNet -> D:\a\1\s\artifacts\bin\VisualTestUtils.MagickNet\Debug\netstandard2.0\VisualTestUtils.MagickNet.dll
UITest.NUnit -> D:\a\1\s\artifacts\bin\UITest.NUnit\Debug\net10.0\UITest.NUnit.dll
UITest.Appium -> D:\a\1\s\artifacts\bin\UITest.Appium\Debug\net10.0\UITest.Appium.dll
UITest.Analyzers -> D:\a\1\s\artifacts\bin\UITest.Analyzers\Debug\netstandard2.0\UITest.Analyzers.dll
Controls.TestCases.WinUI.Tests -> D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
Test run for D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 6/15/2026 11:47:09 AM FixtureSetup for Issue33785(Windows)
>>>>> 6/15/2026 11:47:17 AM VerifyFlyoutPageCollapsedPaneWidth Start
>>>>> 6/15/2026 11:47:22 AM VerifyFlyoutPageCollapsedPaneWidth Stop
>>>>> 6/15/2026 11:47:22 AM Log types:
Failed VerifyFlyoutPageCollapsedPaneWidth [5 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyFlyoutPageCollapsedPaneWidth.png (13.16% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue33785.VerifyFlyoutPageCollapsedPaneWidth() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33785.cs:line 20
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.11] Discovering: Controls.TestCases.WinUI.Tests
[xUnit.net 00:00:00.33] Discovered: Controls.TestCases.WinUI.Tests
Results File: D:\a\1\s\CustomAgentLogsTmp\UITests\TestResults\Issue33785.trx
Total tests: 1
Failed: 1
Test Run Failed.
Total time: 35.1453 Seconds
>>> TRX_RESULT_FILE: D:\a\1\s\CustomAgentLogsTmp\UITests\TestResults\Issue33785.trx
🟢 With fix — 🖥️ Issue33785: PASS ✅ · 532s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Essentials.dll
Graphics.Win2D -> D:\a\1\s\artifacts\bin\Graphics.Win2D\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Maps -> D:\a\1\s\artifacts\bin\Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Maps.dll
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Controls.Xaml -> D:\a\1\s\artifacts\bin\Controls.Xaml\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Xaml.dll
Controls.Maps -> D:\a\1\s\artifacts\bin\Controls.Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> D:\a\1\s\artifacts\bin\Controls.Foldable\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Components.WebView.Maui\Debug\net10.0-windows10.0.19041.0\Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.TestCases.HostApp -> D:\a\1\s\artifacts\bin\Controls.TestCases.HostApp\Debug\net10.0-windows10.0.19041.0\win-x64\Controls.TestCases.HostApp.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:06:38.49
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0\Microsoft.Maui.Graphics.dll
Controls.CustomAttributes -> D:\a\1\s\artifacts\bin\Controls.CustomAttributes\Debug\net10.0\Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0\Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0\Microsoft.Maui.dll
Controls.Core.Design -> D:\a\1\s\artifacts\bin\Controls.Core.Design\Debug\net472\Microsoft.Maui.Controls.DesignTools.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14376903
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0\Microsoft.Maui.Controls.dll
UITest.Core -> D:\a\1\s\artifacts\bin\UITest.Core\Debug\net10.0\UITest.Core.dll
UITest.Appium -> D:\a\1\s\artifacts\bin\UITest.Appium\Debug\net10.0\UITest.Appium.dll
UITest.NUnit -> D:\a\1\s\artifacts\bin\UITest.NUnit\Debug\net10.0\UITest.NUnit.dll
VisualTestUtils -> D:\a\1\s\artifacts\bin\VisualTestUtils\Debug\netstandard2.0\VisualTestUtils.dll
VisualTestUtils.MagickNet -> D:\a\1\s\artifacts\bin\VisualTestUtils.MagickNet\Debug\netstandard2.0\VisualTestUtils.MagickNet.dll
UITest.Analyzers -> D:\a\1\s\artifacts\bin\UITest.Analyzers\Debug\netstandard2.0\UITest.Analyzers.dll
Controls.TestCases.WinUI.Tests -> D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
Test run for D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 6/15/2026 11:56:04 AM FixtureSetup for Issue33785(Windows)
>>>>> 6/15/2026 11:56:12 AM VerifyFlyoutPageCollapsedPaneWidth Start
>>>>> 6/15/2026 11:56:15 AM VerifyFlyoutPageCollapsedPaneWidth Stop
Passed VerifyFlyoutPageCollapsedPaneWidth [3 s]
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.13] Discovering: Controls.TestCases.WinUI.Tests
[xUnit.net 00:00:00.34] Discovered: Controls.TestCases.WinUI.Tests
Results File: D:\a\1\s\CustomAgentLogsTmp\UITests\TestResults\Issue33785.trx
Test Run Successful.
Total tests: 1
Passed: 1
Total time: 26.1996 Seconds
>>> TRX_RESULT_FILE: D:\a\1\s\CustomAgentLogsTmp\UITests\TestResults\Issue33785.trx
📁 Fix files reverted (3 files)
eng/pipelines/ci-copilot.ymlsrc/Controls/src/Core/FlyoutPage/FlyoutPage.Mapper.cssrc/Controls/src/Core/PlatformConfiguration/WindowsSpecific/FlyoutPage.cs
UI Tests — FlyoutPage
Detected UI test categories: FlyoutPage
❌ Deep UI tests — 46 passed, 1 failed across 1 category on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
FlyoutPage |
46/47 (1 ❌) | — |
❌ FlyoutPage — 1 failed test
Bugzilla32902Test
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
at Microsoft.Maui.TestCases.Tests.Issues.Bugzilla32902.Bugzilla32902Test() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Bugzilla/Bugzilla32902.cs:line 18
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.
...
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
Pre-Flight — Context & Validation
Issue: #33785 - [Windows] FlyoutPage CollapsedPaneWidth Not Working
PR: #33786 - Windows FlyoutPage CollapsedPaneWidth fix
Platforms Affected: windows
Files Changed: 12 implementation/infrastructure, 4 test/snapshot
Key Findings
- GitHub PR metadata and comments could not be fetched because
ghis unauthenticated; local branchpr-review-33786is the squashed PR andorigin/main...HEADwas used for context. - Product fix files are
src/Controls/src/Core/FlyoutPage/FlyoutPage.Mapper.csandsrc/Controls/src/Core/PlatformConfiguration/WindowsSpecific/FlyoutPage.cs. - Regression coverage is a Windows FlyoutPage UI test:
VerifyFlyoutPageCollapsedPaneWidth. - Supplied gate result: Gate PASSED — tests fail without fix and pass with the PR fix. Gate was not re-run and
gate/content.mdwas not touched.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: low
Errors: 1 | Warnings: 0 | Suggestions: 0
Key code review findings:
- ❌
.github/scripts/Review-PR.ps1token telemetry parser accepts an optional compact-number suffix but calls.ToUpperInvariant()on the suffix without a null guard.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33786 | Register a dedicated CollapsedPaneWidthProperty mapper and call Handler.UpdateValue(nameof(CollapsedPaneWidthProperty)) from the attached-property changed callback. |
✅ PASSED (Gate) | FlyoutPage.Mapper.cs, WindowsSpecific/FlyoutPage.cs |
Original PR |
Code Review — Deep Analysis
Code Review — PR #33786
Independent Assessment
What this changes: Windows FlyoutPage.CollapsedPaneWidth is mapped to RootNavigationView.CompactPaneLength and refreshed on property changes; the local squashed PR branch also contains Copilot review pipeline/token-usage changes.
Inferred motivation: Fix Windows FlyoutPage.CollapsedPaneWidth not applying initially or after runtime changes, and improve PR-review telemetry.
Reconciliation with PR Narrative
Author claims: GitHub PR metadata could not be fetched because gh is unauthenticated in this environment. The local diff and gate result identify the gate-verified product issue as [Windows] FlyoutPage CollapsedPaneWidth Not Working.
Agreement/disagreement: The local product-code changes match that issue. The broader local diff also contains CI pipeline script changes.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
| No prior review data available | GitHub API unavailable | N/A | gh reported authentication required. |
Blast Radius Assessment
- Runs for all instances: Windows
FlyoutPagemapper path; only nativeRootNavigationViewcompact pane length is updated. - Startup impact: no app startup impact beyond normal handler mapper initialization.
- Static/shared state: no product static/shared state introduced.
CI Status
- Required-check result: undetermined;
gh pr checksunavailable due missing authentication. - Classification: undetermined.
- Action taken: confidence capped low for CI visibility; gate result supplied by caller is trusted for the product regression.
Findings
❌ Error — Accepted context footer format can crash Copilot telemetry parsing
.github/scripts/Review-PR.ps1 accepts compact context lines without a suffix, but the conversion logic calls .ToUpperInvariant() on the optional suffix. This is outside the FlyoutPage gate target but is in the local PR diff and should be addressed before merge.
⚠️ Warning — None
💡 Suggestion — None
Failure-Mode Probing
- Property set before handler exists: the PR mapper reads the attached property after handler creation.
- Runtime property change: the PR property callback calls
Handler.UpdateValue(...)to re-run the mapper. - Null/disconnected handler: the property callback and mapper guard null handler/platform-view states.
- Non-Windows platforms: changes are compiled under Windows-specific code paths or platform-specific APIs.
Verdict: NEEDS_CHANGES
Confidence: low
Summary: The Windows FlyoutPage fix appears sound for the gate scenario, but required CI could not be queried and a separate CI telemetry parsing issue exists in the local diff.
Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix-1 | Reuse CollapseStyleProperty mapper; set CompactPaneLength during partial-collapse mapping and update CollapseStyleProperty when CollapsedPaneWidth changes. |
✅ PASS | 2 files | Smallest alternative, but width changes are routed through an indirectly related mapper key. |
| 2 | try-fix-2 | Add Windows-guarded ApplyCollapsedPaneWidth helper and call it from initial collapse-style mapping plus runtime property changes. |
✅ PASS | 2 files | Functional, but expert self-review found a moderate layering concern. |
| PR | PR #33786 | Register a dedicated CollapsedPaneWidthProperty mapper and call Handler.UpdateValue(nameof(CollapsedPaneWidthProperty)) from the property callback. |
✅ PASSED (Gate) | 2 files | Most explicit and best aligned with handler mapper/property patterns. |
Cross-Pollination
| Model/Reviewer | Round | New Ideas? | Details |
|---|---|---|---|
| code-review + maui-expert-reviewer guidance | 1 | Yes | Candidate 1: collapse-style-dependent compact width. |
| code-review + maui-expert-reviewer guidance | 2 | Yes | Candidate 2: direct Windows helper for native apply. |
| code-review + maui-expert-reviewer guidance | 3 | No | Remaining options were trivial variations: remapping FlyoutLayoutBehavior instead of CollapseStyle, or duplicating PR's dedicated mapper with cosmetic changes. |
Exhausted: Yes
Selected Fix: PR #33786 — It passes the supplied gate and is preferable to both passing alternatives because it keeps CollapsedPaneWidth as an explicit mapper-owned property update. Candidate 1 is more indirect; Candidate 2 crosses the configuration/handler abstraction boundary.
Candidate Details
try-fix-1/content.mdcontains approach, diff, test result, and analysis.try-fix-2/content.mdcontains approach, diff, test result, and analysis.- Full test logs and self-review artifacts are under
try-fix/try-fix-1/andtry-fix/try-fix-2/.
Report — Final Recommendation
Comparative Report — PR #33786
Candidates compared
| Rank | Candidate | Regression result | Assessment |
|---|---|---|---|
| 1 | pr-plus-reviewer |
✅ Passes supplied gate | Best candidate. Keeps the PR's explicit mapper-based CollapsedPaneWidthProperty fix and adds the expert reviewer's null-safe compact-number parser correction in .github/scripts/Review-PR.ps1. |
| 2 | pr |
✅ Passes supplied gate | The Windows FlyoutPage fix is the best product-code approach: a dedicated mapper key plus property-changed UpdateValue is clear and consistent with handler mapper patterns. Ranked below pr-plus-reviewer only because it leaves the expert reviewer's major parser issue unresolved. |
| 3 | try-fix-1 |
✅ Pass | Functionally fixes the FlyoutPage bug by setting CompactPaneLength from MapCollapseStyle and remapping CollapseStyleProperty when width changes. It is smaller, but less direct because a width change is routed through an indirectly related mapper key. |
| 4 | try-fix-2 |
✅ Pass | Functionally fixes the FlyoutPage bug, but crosses abstraction layers by adding a Windows-native apply helper to the platform-configuration API type. This is less aligned with MAUI handler mapper conventions than the PR. |
No candidate from STEP 5a failed regression tests, so the ranking is based on correctness, maintainability, and reviewer findings. If any candidate had failed regression tests, it would be ranked below all passing candidates.
Why pr-plus-reviewer wins
The core PR fix is the most maintainable FlyoutPage solution because CollapsedPaneWidth becomes an explicit mapper-owned value rather than a side effect of collapse-style mapping or a direct platform-configuration native mutation. The expert reviewer found a separate major issue in the PR's Copilot telemetry parser: the compact-number suffix is optional, but .ToUpperInvariant() is called on $Matches['suffix'] without a null-safe cast. Applying that feedback produces pr-plus-reviewer, which retains the passing product fix and removes a review-step failure mode.
Winning candidate
pr-plus-reviewer
Future Action — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The CollapsedPaneWidth value was not being properly applied to the native NavigationView. ### Description of Change <!-- Enter description of the fix in this section --> On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength. This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created. A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change. Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927 ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33785 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <video src="https://github.com/user-attachments/assets/081cad18-ac39-460b-a64f-acfa9a849b10" width="600" height="300"> | **Windows**<br> <video src="https://github.com/user-attachments/assets/627f17c9-e970-4eb7-935a-2874cd041ba8" width="600" height="300"> |
Issue Details
The CollapsedPaneWidth value was not being properly applied to the native NavigationView.
Description of Change
On Windows, FlyoutPage.CollapsedPaneWidth was not being propagated to the native RootNavigationView, so changing the attached property had no effect on CompactPaneLength.
This PR wires PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidthProperty into the FlyoutPage mapper and applies the value to RootNavigationView.CompactPaneLength. It also adds a property-changed callback so runtime changes call Handler.UpdateValue(...) and update the native control after the handler is created.
A Windows UI test was added to cover both the initial partial-collapse setup and a runtime width change.
Note : FlyoutPage CollapsableStyle issue was resolved in PR #29927
Issues Fixed
Fixes #33785
Tested the behavior in the following platforms.
Before.mp4
After.mp4