Repository navigation
chore(winui-sync): Track TitleBar - #26600
Conversation
|
This pull request is merged. |
|
Claude finished @MartinZikmund's task in 20s —— View job Review summaryVerdict: ship. I found no blocking issues, so I posted no inline comments.
I read the diff and the new test file. I did not build or run anything, so the test results in the PR description are unverified by me. What I checked
Nits (take or leave)
The workaround audit looks sound. The PR describes experiments that remove the 🤖 Generated with Claude Code |
9b09532 to
e0e37d6
Compare
|
Claude finished @MartinZikmund's task in 13s —— View job Review summaryVerdict: ship. No blocking issues, so I posted no inline comments.
I re-read the
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 248282 found UI Test snapshots differences: Details
|
e0e37d6 to
66304d9
Compare
|
Claude finished @MartinZikmund's task in 10s —— View job Review summaryVerdict: ship. No blocking issues, so I posted no inline comments.
I read the diff for
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
The port already carried the 2.7.0 behaviour (custom drag regions, AutoRefreshDragRegions, IsDragRegion, title reset); 2.7.0 only adds WinAppSDK servicing containment around it, which does not apply to Uno. The line-by-line review found two header gaps: the missing s_layoutRootPartName constant, and Uno-only revoker fields that were mixed in with the upstream ones without a marker. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNtzDYsFtkCZh1wz4Lkf
Port the eight upstream TitleBar interaction tests (AutoRefreshDragRegions, RecomputeDragRegions, IsDragRegion) as runtime tests. Upstream drives a TestUI page through UI Automation; here the page's TitleBar is built in code and the APIs are called directly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNtzDYsFtkCZh1wz4Lkf
Record TitleBar at winui3/release/2.7.0 (1b5b1a0ccc0). The port matches upstream there: the review compared every member of TitleBar.cpp/.h/.idl, the automation peer and the template settings, and the theme XAML is byte-for-byte upstream, so it is mapped as mirrors. Header versions are dropped now that the manifest records the baseline. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNtzDYsFtkCZh1wz4Lkf
Upstream TitleBar.h declares s_layoutRootPartName without using it; keep it for port fidelity and silence the analyzer that fails the CI build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNtzaC5dx4oo2ZVG5BHB
66304d9 to
92daa82
Compare
|
Claude finished @MartinZikmund's task in 13s —— View job Review summaryVerdict: ship. I found no blocking issues, so I posted no inline comments.
I read the
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 248336 found UI Test snapshots differences: Details
|
GitHub Issue: closes unoplatform/uno-private#2641
Part of unoplatform/uno-private#2616.
PR Type:
🤖 Project automation
What changed? 🚀
This adds TitleBar (
titlebar) to the WinUI port sync (build/winui-sync/areas/titlebar.json) atwinui3/release/2.7.0(1b5b1a0ccc0). Before recording it, I caught the port up, reviewed it line by line against 2.7.0, and audited its Uno workarounds.Mapping
controls/dev/TitleBarsrc/Uno.UI/UI/Xaml/Controls/TitleBarcontrols/dev/TitleBar/InteractionTestssrc/Uno.UI.RuntimeTests/Microsoft/UI/Xaml/Controls/TitleBar(new)controls/dev/TitleBar/Stringssrc/Uno.UI/UI/Xaml/Controls/TitleBar/StringsTitleBar.xaml,TitleBar_themeresources.xamlUno.UI.FluentTheme/Resources/PriorityDefault/(same names)The two theme XAML files are byte-for-byte upstream apart from their header, so they are mapped as mirrors (same as InfoBadge, DropDownButton and ScrollView).
Given_TitleBar.csis Uno-written and stays out of the mapping.Starting point
The headers named
5f9e85113(6 files: automation peer, template settings,TitleBar.cs),fc2f82117(3 files:TitleBar.mux.cs,.mux.h.cs,.Properties.cs) andwinui3/release/2.5.1(the 2 theme XAML files).5f9e85113is an ancestor offc2f82117, so I took the oldest one,5f9e85113, as the starting point.Release tags are "Syncing content" squash commits, so neither main-line commit is an ancestor of the 2.7.0 tag. I compared trees instead of history. Detection reported +1103/−47 from
5f9e85113. Nearly all of that is code the port already had fromfc2f82117, plus tests, TestUI and the perf2026 XAML. The TitleBar folder is identical between 2.5.1 and 2.7.0.Upstream changes (
5f9e85113→ 2.7.0)Ported
TitleBar.cpp/.h/.idl: custom drag regions (AutoRefreshDragRegions,RecomputeDragRegions(), theIsDragRegionattached property,FindInteractableElements,OnContentLayoutUpdated, skipping unchanged passthrough rects), title reset (HandleTitleChange,ResetTitle, default-title capture) and the cachedAppWindow. These were already in the port fromfc2f82117. The review checked each of them against 2.7.0.InteractionTests/TitleBarTests.cs→TitleBarInteractionTests.mux.cs: all 8 tests ported as runtime tests. Upstream drives a TestUI page through UI Automation; here the page's TitleBar is built in code and the APIs are called directly, followingDropDownButtonInteractionTests.mux.cs.Not applicable
WinAppSdk::Containment::IsChangeEnabled<WINAPPSDK_CHANGEID_61831627>()gates and the "old code path" branches inOnPropertyChanged,UpdateInteractableElementsListand friends. This is WinAppSDK servicing containment, a kill switch for a shipped change. Uno takes the enabled path, which is what WinUI runs by default.[MUX_PREVIEW]→[MUX_PUBLIC_V11]on the new API: IDL contract metadata. The API is already public in Uno.TitleBar_themeresources_perf2026.xamland itsvcxitemsentries: Uno has no perf2026 resource variants.TestUI/*(TitleBarPage, TitleBarPageWindow): Uno has no sample ported from them. The interaction tests above build the page in code.TitleBarTrace.h: tracing. The trace calls stay commented out, as in the rest of the port.Skipped: none, so there is no skipped-items issue.
Review table (line by line against 2.7.0)
TitleBar.cppTitleBar.mux.csOnApplyTemplate,HandleTitleChange,OnPropertyChanged,GoToState, all event handlers,OnIsDragRegionPropertyChanged, everyUpdate*,GetBounds,RecomputeDragRegions,Load*Button,GetAppWindowId,GetInputNonClientPointerSource,TryGetAppWindow,FindInteractableElementsAttachInsetsChangedListener;UpdateRegionsAfterLayout(allUno specific)TitleBar.hTitleBar.mux.h.css_layoutRootPartName; moved the Uno-onlym_insetsChangedRevoker/m_paddingLayoutUpdatedRevokerout from among the upstream fields, under anUno specificmarkerTitleBar.idl(+ generated properties)TitleBar.Properties.cs,TitleBar.csAutoRefreshDragRegionsand attachedIsDragRegion(types, defaults, callbacks),GetIsDragRegion/SetIsDragRegion, 2 events,[ContentProperty]TitleBarAutomationPeer.cpp/.hTitleBarAutomationPeer.mux.cs,.csGetAutomationControlTypeCore,GetClassNameCore,GetNameCoreTitleBarTemplateSettings.cpp/.h/idlTitleBarTemplateSettings*.csIconElementDPTitleBar.xaml,TitleBar_themeresources.xamlStrings/*(86 locales)Strings/*Sync-AreaStringsWorkaround audit
TitleBar.mux.csctor /OnLoaded/OnUnloaded/AttachInputActivationListenerInputActivationListeneron Loaded and drops it on Unloaded, instead of inOnApplyTemplate~TitleBar. C# has no deterministic destructor, and the listener is window-scoped, so subscribing inOnApplyTemplatewould root every TitleBar for the window's lifetime.TitleBar.mux.cscommented~TitleBarHandleTitleChange.TitleBar.mux.csAttachInsetsChangedListenerTODO 50724421(rebind padding onAppWindowTitleBar.InsetsChanged)Given_TitleBar.When_Extended_Into_TitleBar_RightHeader_Avoids_Caption_Buttonsfails (caption-button insets are only known after the XAML chrome is laid out).TitleBar.mux.csUpdateRegionsAfterLayoutWhen_FlowDirection_Changes_Passthrough_Regions_FollowandWhen_Insets_Change_Passthrough_Regions_Followfail.There are no
#ifblocks in the area and no disabled tests.Tests
Run on Skia Desktop (Win32):
Given_TitleBar: 6 passed, 1 skipped (macOS-only).TitleBarInteractionTests: 8 passed.Workaround experiments: two extra runs with the workarounds removed, with the failures listed above.
Builds:
Uno.UIandUno.UI.RuntimeTests.Genericbuilt in Release withoutUnoFastDevBuild, with analyzers on. CI's build then failed onIDE0051fors_layoutRootPartName, which upstreamTitleBar.hdeclares but never uses; it is kept for port fidelity with a scoped suppression (rebuilt clean after rebasing onto master). Detection reportstitlebarup to date. The tooling testsbuild/winui-sync/tests/run.ps1pass (134/0).No project or MSBuild files changed.
PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNtzDYsFtkCZh1wz4Lkf