Repository navigation
chore(winui-sync): Onboard InfoBadge at WinUI 2.6.5 - #26493
Conversation
Catch up from 1.4.2: build the icon element with SharedHelpers.MakeIconElementFrom, as upstream does. The line-by-line review against 2.6.5 also found a mis-port in OnSizeChanged: a locally set CornerRadius was replaced by a zero radius instead of being used, so such badges rendered square. The Value range exception now passes a parameter name instead of the message. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu2UutP6MJa47mVagdR
Add CornerRadius tests for TemplateSettings.InfoBadgeCornerRadius, mark the exact-type exception check in the ported API test, and align the sample with upstream's TestUI page (header, x:Name, plain Spacing instead of the UWP contract-conditional namespace). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu2UutP6MJa47mVagdR
Records InfoBadge at winui3/release/2.6.5 (c29edd64ae). The port was caught up from 1.4.2 and reviewed against 2.6.5 in the preceding commits. The theme XAML is a verbatim copy of upstream, so it is mirrored rather than ported, and the sample ported from upstream's TestUI page is mapped with the tests. Headers now name only their upstream files; the manifest holds the version. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu2UutP6MJa47mVagdR
There was a problem hiding this comment.
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.
|
Claude finished @MartinZikmund's task in 16s —— View job Review of #26493: onboard InfoBadge to WinUI sync (2.6.5)Verdict: ship. I found no blocking issues, so I posted no inline comments (0 critical, 0 major, 0 minor). What I checked in the diff:
Not verified:
|
|
This pull request is merged. |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 246589 found UI Test snapshots differences: Details
|
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Checked the InfoBadge.cs changes against InfoBadge.cpp upstream (winui3/release/1.8.4, dc46907e):
OnSizeChanged/GetCornerRadiusnow returns the control'sCornerRadius— matchesreturn CornerRadius();(line 97).SharedHelpers.MakeIconElementFrom(iconSource)matches line 68.- The
Value < -1exception: upstream throwshresult_out_of_boundswith that message; passingnameof(Value)as the parameter name is a sensible mapping. - The commented-out trailing return is unreachable upstream too (line 99).
I didn't review areas.json, the sample page or the new test, and CI currently shows 3 failing checks, so this is a comment rather than an approval.
GitHub Issue: closes #26492
PR Type:
What changed? 🚀
Onboards
InfoBadgeto theWinUI Port Sync, recorded at WinUI 2.6.5. Before the area was added, the port was caught up to the latest stable release, reviewed line by line against it, and its Uno workarounds were audited.Starting point
The four code headers named WinUI 1.4.2 (
7198c4e6); the two theme XAML files named 2.5.1 and are byte-identical to 2.6.5. The sample code-behind had no header but matches upstream'sTestUIpage. The catch-up started at 1.4.2.Upstream changes 1.4.2 → 2.6.5 (2 files, +11 −2)
InfoBadge.cpp:iconSource.CreateIconElement()→SharedHelpers::MakeIconElementFrom(iconSource)(plus indentation)InfoBadge.vcxitems: Perf2026 page entriesNothing skipped, so no skipped-items issue. Upstream has no
Stringsfolder.Line-by-line review against 2.6.5
InfoBadge.cpp/.hInfoBadge.csOnSizeChangedreturnednew CornerRadius()where upstream returnsCornerRadius()(the control's property), so a locally setCornerRadiuswas replaced by 0 and the badge rendered square. Gap fixed: theValue < -1exception passed its message as the parameter name. Still differing, marked: the unreachable trailingreturn(unreachable upstream too) stays commented out to avoid CS0162InfoBadge.idl,Generated/InfoBadge.properties.cppInfoBadge.properties.csValue= -1) and callbacks matchInfoBadgeTemplateSettings.cpp/.h,Generated/InfoBadgeTemplateSettings.properties.cppInfoBadgeTemplateSettings.csInfoBadge.xaml,InfoBadge_themeresources.xamlAPITests/InfoBadgeTests.csInfoBadgeTests.mux.csVerify.Throws<ArgumentOutOfRangeException>instead of<Exception>, because Uno'sVerify.Throwsis exact-type (WinUI'sE_BOUNDSprojects toArgumentOutOfRangeException)InteractionTestsTestUI/InfoBadgePage.xaml(.cs)InfoBadgeTests/InfoBadgePage.xaml(.cs)x:Name, and replacedcontract5Present:Spacing(UWP contract-conditional namespace) with plainSpacingAll Uno files now carry a
MUX Referenceheader naming their upstream file, with no version:areas.jsonholds it.Workaround audit
InfoBadge.cscommented-out trailingreturnInfoBadgeTests.mux.csexact exception typeMSTestInterop.Verify.ThrowscallsAssert.ThrowsExactly#pragma warning disable CS0105usingcopied from upstreamReferenceEqualsforSelectedItemchecks==; avoids CS0252Nothing removed, so there is no
refactorcommit.Tests
Given_InfoBadge.When_CornerRadius_Set_Locally_Then_Used_By_TemplateSettingsfailed (Expected1,2,3,4, Actual0,0,0,0). It passes now.InfoBadgeTests(3),Given_InfoBadge(2, new) and everyGiven_FrameworkElement_And_Leak.When_Add_Removerow, includingInfoBadge: 89 passed, 0 failed.SamplesApp(withUno.UI,Uno.UI.RuntimeTestsand the samples) with analyzers on (noUnoFastDevBuild), 0 errors. Built at net10.0.detect.ps1 -AreaFilter infobadgereports up to date, and the 132 Pester tests pass.No project or MSBuild files changed. The
areas.jsonentry conflicts textually with #26476, #26486 and #26491 (each appends an area); whichever merges later needs a trivial rebase.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu2UutP6MJa47mVagdR