Skip to content

chore(winui-sync): Onboard SplitButton at WinUI 2.6.5 - #26476

Merged
MartinZikmund merged 5 commits into
masterfrom
dev/mazi/winui-sync-splitbutton
Nov 16, 2026
Merged

MartinZikmund merged 5 commits into
masterfrom
dev/mazi/winui-sync-splitbutton

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #26475

PR Type:

  • 🤖 Project automation (WinUI port sync onboarding, with port fixes)

What changed? 🚀

Onboards SplitButton / ToggleSplitButton to the WinUI Port Sync, recorded at WinUI 2.6.5. This is the first run of the catch-up onboarding from #26474: the port was caught up to the latest stable release, reviewed line by line against it, and its Uno workarounds were audited before the area was added.

Base: #26474 has merged; its commits on this branch are already in master, so only the SplitButton commits from e52e863a756 onwards are new.

Starting point

Headers named WinUI 1.4.2 (7 files), 1.8.4 (2, the automation peers) and 2.5.1 (2, the theme XAML from the Generic.xaml refresh). Per the onboarding rules ("mixed, close together") the catch-up started at 1.4.2.

Upstream changes 1.4.2 → 2.6.5 (5 files, +48/−21)

Change Verdict
SplitButton.cpp: touch no longer switches to SecondaryButtonSpan, only key-down does Already ported (header was stale)
InteractionTests: TouchTest now expects a primary click under touch, then opens the flyout from the secondary part Already ported
SplitButton.xaml: SplitButtonPadding, border split into PrimaryButtonBorder / SecondaryButtonBorder Already ported (2.5.1 refresh)
SplitButton_themeresources.xaml: pressed border brush, SplitButtonPadding, MinHeight on the CommandBar style Already ported
TouchTest [TestProperty("TestPass:MaxOSVer")] Not applicable (Windows OS gating)
SplitButton.vcxitems Perf2026 page entries Not applicable (Windows build plumbing)

Nothing skipped, so no skipped-items issue.

Line-by-line review against 2.6.5

Upstream Uno Result
SplitButton.cpp / .h SplitButton.cs All fields and 21 members match; one comment restored verbatim. Constructor leak hooks → workaround audit
SplitButton.idl, Generated/SplitButton.properties.cpp SplitButton.properties.cs Match. Flyout's LogicalChild registration was an unmarked Uno difference → now marked (see audit)
ToggleSplitButton.cpp / .h, Generated/ToggleSplitButton.properties.cpp ToggleSplitButton.cs, ToggleSplitButton.properties.cs Match. IsCheckedChanged was wrongly marked "Uno specific: not present in the C++ source"; it is upstream API (.idl + generated m_isCheckedChangedEventSource) → markers removed. Upstream .h declares OnApplyTemplate() with no definition → nothing to port
SplitButtonAutomationPeer.cpp, ToggleSplitButtonAutomationPeer.cpp, .idl the two peers Match. One marked #if HAS_UNO member → audit
SplitButtonEventArgs.h SplitButtonEventArgs.cs Match; header added
SplitButtonTestApi.cpp / .idl SplitButtonTestApi.cs Gap fixed: upstream has a static SimulateTouch property, Uno had instance methods
SplitButtonTestHelper.cpp / .h SplitButtonTestHelper.cs Match
SplitButton.xaml, SplitButton_themeresources.xaml FluentTheme copies Identical to 2.6.5 apart from the header
APITests/SplitButtonTests.cs SplitButtonTests_APITests.mux.cs Match (async RunOnUIThread replaces IdleSynchronizer.Wait); header named .cpp → fixed
InteractionTests/SplitButtonTests.cs SplitButtonTests_InteractionTests.mux.cs All 7 tests present; ToggleTest restored (see audit)
TestUI/SplitButtonPage.xaml.cs SplitButtonPage.mux.xaml.cs Match; now calls SplitButtonTestApi like upstream; header added

Every reviewed file's header was first brought to winui3/release/2.6.5 (the seed then derived 2.6.5 from the headers themselves), and once the entry was written, the versions were dropped: tracked areas' headers name only the upstream file, since areas.json records the version (#26474).

Workaround audit

Location What it did Verdict Evidence
SplitButton ctor Re-ran OnApplyTemplate on Loaded, unregistered all events on Unloaded ("prevent leaks") Removed Given_FrameworkElement_And_Leak.When_Add_Remove(SplitButton, 15) passes without it; all SplitButton tests pass
ToggleSplitButton.cs Duplicate using + #pragma warning disable 105 "for the WinUI replace pass" Removed The replace pass no longer exists anywhere in the build; strict build passes
SplitButton.Flyout FrameworkPropertyMetadataOptions.LogicalChild Kept, now marked Uno's automatic SetParent, giving the flyout the owner's DataContext and resources, the same as Button.Flyout
RegisterFlyoutEvents Local flyout capture Kept C# equivalent of a WinRT revoker holding its source
SplitButtonAutomationPeer.GetChildrenCore (#if HAS_UNO) Adds the open flyout's peer as a child Kept Uno only wires popup → anchor (GetPopupAssociatedAutomationPeer); nothing exposes anchor → popup generally
ToggleTest Toggled through the peer and skipped the ToggleStateOnClick check ("Uno TODO: no reason for it") Removed Upstream clicks the primary button, which raises Click and toggles; the restored test passes
AccessibilityTest "No accessible children" check commented out Kept, reason corrected Upstream counts UIA control-view children; peer.GetChildren() includes the raw template buttons on WinUI too, so it is not a faithful substitute
BasicInteractionTest Flyout.IsOpen instead of finding TestFlyout via UIA Kept No UIA name search in the Uno test harness
#if !HAS_INPUT_INJECTOR [Ignore] (5 tests), KeyboardTest #if !__SKIA__ Skip on the WinAppSDK head Kept HAS_INPUT_INJECTOR is undefined for WinAppSDK (only Skia/WASM/UWP define it)
TouchTest StartBringIntoView() Brings the button into view before injecting touch Unclear, kept Not tried without it

Tests

  • Runtime (Skia desktop, local): 10/10 passed — SplitButtonTests API (2) + interaction (7) and When_Add_Remove(SplitButton, 15).
  • Compile: Uno.UI.RuntimeTests.Generic with analyzers on (no UnoFastDevBuild), 0 errors.
  • Tooling: seed-area.ps1 with -Baseline <2.6.5> added the theme XAML on its own; detect.ps1 -AreaFilter splitbutton reports up to date; 118 Pester tests pass.
  • Not run: WinAppSDK head, and the other SplitButton runtime tests outside the mapped folder.

Other

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw

Copilot AI balanced review requested due to automatic review settings November 14, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation labels Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 19s —— View job


Review summary

Verdict: ship, with minor nits. I reviewed by reading the diff only. I did not build or run any tests, so the runtime results in the PR description are unverified by me.

Issues: 0 high, 0 medium, 2 low (one inline comment each).

  • A PowerShell formatting nit in seed-area.ps1.
  • AccessibilityTest still has a disabled check.

Cross-cutting notes

  • The removal of the SplitButton Loaded/Unloaded workaround is a behavior change. It is backed by the leak test, and it matches upstream, which doesn't re-run OnApplyTemplate on reload. A runtime test that unloads and reloads a SplitButton and then checks that the template parts still work would be a cheap safeguard.
  • The #if !HAS_INPUT_INJECTOR [Ignore] tests are existing skips. The PR explains why they are kept, so I'm not blocking on them.
  • The Find-AreaThemeXaml and Get-MuxReferences changes in WinUISync.psm1 have Pester coverage (Seed.Tests.ps1). I did not run them.
  • Conventional Commits and [Uno specific] marker usage look fine.

@mergify

mergify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

Comment thread build/winui-sync/seed-area.ps1 Resolved
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/winui-sync-splitbutton branch from 172881b to f847d4e Compare November 14, 2026 10:34
Copilot AI balanced review requested due to automatic review settings November 14, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 14s —— View job


Review summary

Verdict: ship. I read the diff only. I did not build or run any tests, so the runtime results in the PR description are unverified by me.

Issues: 0 high, 0 medium, 1 low. I posted no new inline comments.

Cross-cutting notes

  • seed-area.ps1 nit: the earlier "missing space in $scan =@(" comment doesn't match the current head. The line reads $scan = @(...), so there is nothing to fix.
  • AccessibilityTest (low): the "no accessible children" check is still commented out, now with a corrected reason. This is an open skipped assertion. Either add a control-view filter over peer.GetChildren(), or open a public follow-up issue and link it from the comment.
  • Removed Loaded/Unloaded workaround: this matches upstream, which does not re-run OnApplyTemplate on reload, and the leak test covers it. A small unload/reload runtime test would be a cheap safeguard, but I'm not blocking on it.
  • ToggleTest: it now clicks the primary button and restores the ToggleStateOnClick assertion, which is closer to upstream.
  • Conventions: the Conventional Commits and the [Uno specific] markers look fine.

@MartinZikmund
MartinZikmund force-pushed the dev/mazi/winui-sync-splitbutton branch from f847d4e to 98076eb Compare November 14, 2026 10:43
Copilot AI balanced review requested due to automatic review settings November 14, 2026 10:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 15s —— View job


Review summary

Verdict: ship, with one low-severity open item. I read the diff only (git diff origin/master...HEAD on the SplitButton sources and runtime tests). I did not build or run anything, so the runtime results in the PR description are unverified by me.

Issues: 0 high, 0 medium, 1 low. I posted no new inline comments because the earlier review already covers the one inline finding.

Open item (low)

  • AccessibilityTest still has the "no accessible children" assertion commented out (SplitButtonTests_InteractionTests.mux.cs, around line 194). The repo rules say to flag disabled checks. Either add a control-view filter over peer.GetChildren(), or open a public follow-up issue and link it from the comment.

Cross-cutting notes

  • Stale PR description: the description says every reviewed header names winui3/release/2.6.5. The current head (98076eb8 chore(splitbutton): Drop header versions) uses version-less // MUX Reference <file> headers. Please update the description so it matches the code.
  • Removed Loaded/Unloaded workaround: this is a behavior change. It matches upstream and is backed by the leak test. A small unload/reload runtime test would be a cheap safeguard, and I'm not blocking on it.
  • SplitButtonTestApi.SimulateTouch: the change from instance methods to a static property matches upstream. The only callers I found are in SplitButtonPage.mux.xaml.cs, which this PR updates.
  • ToggleTest: it now clicks the primary button and restores the ToggleStateOnClick assertion. This is closer to upstream.
  • Conventions: Conventional Commits, [Uno specific] marker usage, and the use of EventHandler-style events all look fine.

@unodevops

Copy link
Copy Markdown
Contributor

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

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 246535 found UI Test snapshots differences: skia-linux-screenshots: 225, skia-windows-screenshots: 319

Details
  • skia-linux-screenshots: 225 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedBackVisualSourceSamplePage.png
    • AppWindowTitleBar Properties.png-dark
    • Basics.png-dark
    • Basics.png
    • BitmapIcon_Foreground.png-dark
    • BasicAcrylicBrushTest.png-dark
    • BitmapIcon_Foreground.png
    • BasicAcrylicBrushTest.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • AutomationProperties_AutomationId.png
    • AnimatedVisualsTestbedPage.png
    • AppWindowTitleBar Properties.png
    • AutomationProperties_AutomationId.png-dark
    • BenchmarkDotNet.png-dark
  • skia-windows-screenshots: 319 changed over 2496

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

MartinZikmund and others added 5 commits November 16, 2026 11:27
Reviewed against WinUI 2.6.5 line by line. The 1.4.2 to 2.6.5 upstream changes (no span on touch, split border template, pressed border brush, padding resource) were already in the port, so this aligns the rest:

- SplitButtonTestApi.SimulateTouch is a static property, as in upstream
- IsCheckedChanged was wrongly marked Uno-only; it is upstream API
- Flyout's LogicalChild registration now says why it is there
- headers name 2.6.5, the version the port was reviewed against

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
- SplitButton no longer re-applies its template on Loaded and unregisters on Unloaded. The leak test (Given_FrameworkElement_And_Leak, SplitButton row) collects the control without it, and the SplitButton tests pass.
- ToggleSplitButton drops a duplicate using and its pragma, left over from the removed WinUI replace pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
ToggleTest clicks the primary button again and checks the click handler's state, as upstream does; the earlier note that Uno has no reason to raise Click was wrong. The test page uses SplitButtonTestApi like upstream, and the headers name the upstream .cs files at 2.6.5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Recorded at WinUI 2.6.5 (c29edd64ae), the release the port was caught up to and reviewed against in this branch. The theme XAML was added by the seed's detection. Detection reports the area up to date.

Closes #26475

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Now that the area is tracked at 2.6.5, its MUX Reference headers name only the upstream file. 14 files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/winui-sync-splitbutton branch from 98076eb to c6d4181 Compare November 16, 2026 10:29
Copilot AI balanced review requested due to automatic review settings November 16, 2026 10:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 18s —— View job


Review summary

Verdict: ship, with one low-severity open item. I read the diff only (HEAD~5..HEAD; origin/master...HEAD has no merge base in this checkout). I did not build or run tests, so the runtime results in the PR description are unverified by me.

Issues: 0 high, 0 medium, 1 low. I posted no new inline comments because the earlier review already covers it.

Open item (low)

  • AccessibilityTest still has the "no accessible children" assertion commented out (SplitButtonTests_InteractionTests.mux.cs, around line 194). Either add a control-view filter over peer.GetChildren(), or open a public follow-up issue and link it from the comment.

Reply to @morning4coffe-dev's question on removed comments

  • The ToggleSplitButton.IsCheckedChanged "Uno Specific: not present in the C++ source" markers were inaccurate. The event is upstream API (.idl, plus the generated m_isCheckedChangedEventSource), so removing them is correct. A marker that is wrong would mislead the sync tool.
  • The sync tool should still keep and emit Uno specific markers for real divergences. This PR does that for SplitButton.Flyout's LogicalChild registration and for the #if HAS_UNO code in SplitButtonAutomationPeer.
  • I don't see a TabViewAutomationPeer.cs change in this PR's 15 changed files. That comment may be on a different PR or an older commit.

Cross-cutting notes

  • Removed Loaded/Unloaded workaround: this is a behavior change. It matches upstream, and the leak test backs it. A small unload/reload runtime test would be a cheap safeguard, but I'm not blocking on it.
  • Stale PR description: it says the headers name winui3/release/2.6.5. The head commit (c6d41810) uses version-less // MUX Reference <file> headers, so please update the description.
  • Conventions: Conventional Commits, [Uno specific] markers, and EventHandler-style events look fine.

@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 246729 found UI Test snapshots differences: skia-linux-screenshots: 213, skia-windows-screenshots: 323

Details
  • skia-linux-screenshots: 213 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AutomationProperties_AutomationId.png
    • Basics.png-dark
    • Basics.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CornerRadiusControls.png-dark
    • CornerRadiusControls.png
    • Accessibility_Showcase.png
  • skia-windows-screenshots: 323 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • AppWindowTitleBar Properties.png-dark
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • AppWindowTitleBar Properties.png
    • AutomationProperties_AutomationId.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • AnimatedVisualsTestbedPage.png
    • AutomationProperties_AutomationId.png-dark
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • Accessibility_Showcase.png-dark
    • Basics.png-dark

@MartinZikmund
MartinZikmund merged commit 861735a into master Nov 16, 2026
51 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/winui-sync-splitbutton branch November 16, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WinUI Port Sync: track SplitButton

5 participants