Skip to content

fix: Keep the NavigationView compact pane after minimize on Win32 - #26694

Open
ajpinedam wants to merge 4 commits into
unoplatform:masterfrom
ajpinedam:dev/anpi/splitview-pane-length-clip
Open

ajpinedam wants to merge 4 commits into
unoplatform:masterfrom
ajpinedam:dev/anpi/splitview-pane-length-clip

Conversation

@ajpinedam

@ajpinedam ajpinedam commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #26672

PR Type:

🐞 Bugfix

What changed? 🚀

On the Win32 desktop host, a LeftCompact NavigationView whose AdaptiveTrigger switches it to LeftMinimal showed an empty compact pane after the window was minimized and restored. The SplitView PaneClipRectangle kept a stale TranslateX (48 instead of −272). Two gaps from WinUI combine to cause it.

Changes

  • fix(win32): a minimized window keeps its Bounds. Its client area is 0×0, so Uno laid the content out at 0×0 and the adaptive triggers flipped. WinUI keeps the bounds and raises no SizeChanged while minimized.
  • fix(vsm): GoToState to the current state without transitions now re-applies the state's setters and completes its storyboards, stopping ones that never end. This matches WinUI's SnapToEnd + ReevaluateAppliedPropertySetters. SplitView relies on it to refresh the pane lengths bound in its states.
    • A running transition is completed, which starts the state's storyboard.
    • Setters are applied before the storyboards complete, as when a state is entered, so an animation keeps precedence over a setter on the same property. Nothing runs after a Completed handler that changes state.
    • Completing a storyboard resolves ObjectAnimationUsingKeyFrames key-frame theme resources for their target, as Begin already does.
  • fix(animation): Storyboard.SkipToFill on a running ObjectAnimationUsingKeyFrames now ends it the way its frames running out would. It fills or releases its value per FillBehavior and raises Completed. Before, the storyboard never completed. AppBar, AppBarButton, AppBarToggleButton and ContentDialog, which call Begin(); SkipToFill();, now see the same end.

Testing

  • New runtime tests:
    • Given_VisualStateManager: bound setter, bound animation, setter/animation precedence, running transition, a handler that changes state, never-ending storyboard.
    • Given_SplitView: 8 rows.
    • Given_AppWindow: bounds while minimized.
    • Given_Storyboard: SkipToFill with both fill behaviors.
  • The new tests fail without the change and pass with it on Skia desktop. They also pass on the WinAppSDK head.
  • Full Skia desktop runtime suite: no new failures compared with a run without the change.
  • The NavigationView repro keeps its compact pane after minimize/restore on Win32.

Not covered

PR Checklist ✅

@mergify

mergify Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 248832 found UI Test snapshots differences: skia-linux-screenshots: 243, skia-windows-screenshots: 270

Details
  • skia-linux-screenshots: 243 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppWindowTitleBar Properties.png
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • Accessibility_Showcase.png-dark
    • AnimatedVisualsTestbedPage.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Accessibility_Showcase.png
    • AppWindowTitleBar Properties.png-dark
    • Basics.png-dark
    • Basics.png
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
  • skia-windows-screenshots: 270 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Buttons.png-dark
    • AutomationProperties_AutomationId.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AppWindowTitleBar Properties.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • CornerRadiusControls.png-dark
    • CornerRadiusControls.png
    • Accessibility_Showcase.png-dark

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 248920 found UI Test snapshots differences: skia-linux-screenshots: 246, skia-windows-screenshots: 268

Details
  • skia-linux-screenshots: 246 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_Showcase.png-dark
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • AnimatedBackVisualSourceSamplePage.png
    • Accessibility_Showcase.png
    • AnimatedVisualsTestbedPage.png
    • Basics.png-dark
  • skia-windows-screenshots: 268 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_Showcase.png-dark
    • AnimatedBackVisualSourceSamplePage.png
    • AnimatedVisualsTestbedPage.png
    • AutomationProperties_StructureAndProps.png-dark
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • Buttons.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • AutomationProperties_AutomationId.png
    • BasicAcrylicBrushTest.png-dark
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • CornerRadiusControls.png-dark
    • CornerRadiusControls.png
    • AnimatedBackVisualSourceSamplePage.png-dark

@ajpinedam
ajpinedam force-pushed the dev/anpi/splitview-pane-length-clip branch from 7bc1af5 to 4d496cc Compare November 25, 2026 20:41
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 249137 found UI Test snapshots differences: skia-linux-screenshots: 221, skia-windows-screenshots: 243

Details
  • skia-linux-screenshots: 221 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • Accessibility_Showcase.png-dark
    • AppWindowTitleBar Properties.png-dark
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • Basics.png-dark
    • Basics.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
  • skia-windows-screenshots: 243 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedVisualsTestbedPage.png-dark
    • AutomationProperties_AutomationId.png-dark
    • AnimatedBackVisualSourceSamplePage.png
    • Basics.png-dark
    • Basics.png
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • AnimatedVisualsTestbedPage.png
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • ClipboardTests.png-dark
    • Accessibility_Showcase.png-dark
    • BenchmarkDotNet.png-dark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Win32] NavigationView compact pane stays empty after the window is minimized and restored

3 participants