Repository navigation
fix(progressbar): Port ProgressBar to WinUI 2.5.1 - #24563
Conversation
|
Claude finished @MartinZikmund's task in 2m 43s —— View job Review complete ✅
Verdict: ship. No inline findings to post — this is a clean, faithful re-port. Summary of what I checked:
Not independently verified: I did not build the solution or run the tests myself (no Cross-cutting note: The pre-existing duplicate Branch: |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
One or more issues must be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Re-ports ProgressBar and related types from WinUI 2.5.1, correcting indicator sizing, visual states, visibility handling, and automation behavior.
Changes:
- Accounts for borders and padding when sizing indicators.
- Updates indeterminate state transitions and automation value setting.
- Adds regression runtime tests and updates MUX references.
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBarTemplateSettings.Properties.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBarTemplateSettings.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBarAutomationPeer.mux.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBarAutomationPeer.h.mux.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBarAutomationPeer.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBar.xaml | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBar.Properties.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBar.mux.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBar.h.mux.cs | Updated as part of this pull request. |
| src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBar.cs | Updated as part of this pull request. |
| src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_ProgressBar.cs | Updated as part of this pull request. |
| src/Uno.UI.FluentTheme/Resources/PriorityDefault/ProgressBar.xaml | Updated as part of this pull request. |
| src/Uno.UI.FluentTheme/Resources/PriorityDefault/ProgressBar_themeresources.xaml | Updated as part of this pull request. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24563/wasm-skia-net9/index.html |
|
The build 234650 found UI Test snapshots differences: Details
|
|
|
dc032c6 to
e5ec4fa
Compare
|
Claude finished @MartinZikmund's task in 3m 36s —— View job Review complete ✅
Verdict: fix-first. 1 medium-severity inline finding; otherwise a clean, faithful re-port. Findings by severity:
Cross-cutting notes:
Branch: |
|
The build 235442 found UI Test snapshots differences: Details
|
e5ec4fa to
9facc34
Compare
|
Claude finished @MartinZikmund's task in 1m 28s —— View job Review complete ✅
Verdict: ship. No new inline findings — the current HEAD (
What I re-verified by reading the files in full: all Not independently verified: no local build/test run in this pass (static review only, consistent with the two prior passes) — runtime confidence relies on the evidence already stated in the PR description (6 new tests failing before / passing after the port, plus Branch: |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24563/wasm-skia-net9/index.html |
|
The build 235799 found UI Test snapshots differences: Details
|
|
|
9facc34 to
6850060
Compare
|
Claude finished @MartinZikmund's task in 48s —— View job Review todo
Verdict: ship ✅0 new findings. This I re-verified the specific items from that prior pass are still true at current HEAD:
Cross-cutting notes:
Not independently verified: no local build/test run in this pass (static review only, consistent with all prior passes on this PR) — runtime confidence relies on the evidence already stated in the PR description (6 new tests failing before / passing after the port, plus Branch: |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24563/wasm-skia-net9/index.html |
|
The build 236287 found UI Test snapshots differences: Details
|
|
|
6850060 to
0e428e3
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (2)
Resolved since last review (2)
|
Claude finished @MartinZikmund's task in 39s —— View job Review todo
Verdict: ship ✅0 new findings. This Re-verified the two items from the last full reviews are still correctly resolved at current HEAD:
Cross-cutting notes (unchanged from prior passes):
Not independently verified: no local build/test run in this pass (static review only, consistent with all prior passes) — runtime confidence relies on the evidence already stated in the PR description (6 new tests failing before / passing after the port, plus Branch: |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24563/wasm-skia-net9/index.html |
|
The build 237187 found UI Test snapshots differences: Details
|
|
|
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Verified: the port structure (partial split, MUX headers, SetProgressBarIndicatorWidth, UpdateStates, UpdateWidthBasedTemplateSettings, LayoutRound with AwayFromZero, null-XamlRoot fallback, border and padding subtraction, ShowPaused/ShowError resize, automation peer SetValue) against controls/dev/ProgressBar/ProgressBar.cpp and ProgressBarAutomationPeer.cpp. The local WinUI checkout is at 188f602b2, not the referenced tag ba3a8d59e, so the comparison is against that checkout.
Blocking:
- Tests - WinAppSDK Runtime Tests fails on this head (Azure build 237187, head 0e428e3): Given_ProgressBar.When_Indeterminate_Collapsed_Then_Determinate_State. Assert.AreEqual("Determinate", CurrentState) fails with an actual value of 13 characters (most likely "Indeterminate"). This test has no platform exclusion, so it runs against native WinUI in that job. Either the expectation is not what WinUI does (then it needs a platform condition and a comment), or the port's Visibility path differs. Please resolve it against native WinUI, not only Skia.
- Misport in ProgressBar.mux.cs:
Math.Abs(maximum - minimum) > double.Epsilon. WinUI uses DBL_EPSILON (about 2.22e-16). C# double.Epsilon is the smallest denormal (about 4.9e-324). Use 2.220446049250313E-16 or a named constant. As written, differences in (0, 2.2e-16] take the division branch where WinUI takes the error branch.
Non-blocking:
3. The description says the template content is identical to WinUI. It is not. Both src/Uno.UI/UI/Xaml/Controls/ProgressBar/ProgressBar.xaml and src/Uno.UI.FluentTheme/Resources/PriorityDefault/ProgressBar.xaml comment out the two RepositionThemeAnimation entries, which are active in WinUI 2.5.1. Please document why, or align them.
4. GetClassNameCore returns typeof(ProgressBar).FullName; WinUI returns the short name "ProgressBar". This is not introduced by this PR, so check the other Uno peers before changing it.
0e428e3 to
c0fd70e
Compare
|
Claude finished @MartinZikmund's task in 21s —— View job Review of latest head (
|
🤖 Addressed PR comments up to this pointRebased onto current morning4coffe-dev's review, thanks for the careful pass:
Copilot threads: I replied to and resolved both (raw-width template settings and the Validation:
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 243323 found UI Test snapshots differences: Details
|
|
This pull request is merged. |
The ProgressBar port claimed winui3/release/1.7-stable but its logic predated 1.5.5. Re-port ProgressBar, its automation peer and template settings from winui3/release/2.5.1: - Indicator widths subtract the layout-rounded BorderThickness and Padding, clamped at zero, in both determinate and indeterminate modes. - The rasterization scale falls back to 1.0 when XamlRoot is null. - ShowPaused/ShowError changes resize the indicators, not just the visual state. - A collapsed indeterminate bar goes to its determinate states. - ProgressBarAutomationPeer.SetValue sets Value instead of throwing. Files are split into declaration/.h.mux/.mux/.Properties partials. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GRTN5HXeXGXVpTbcBuJ4xL
Add runtime tests for the 2.5.1 ProgressBar behaviors: border-aware indicator widths (determinate and indeterminate), full-width second indicator when paused or in error, determinate state when collapsed, and ProgressBarAutomationPeer.SetValue. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GRTN5HXeXGXVpTbcBuJ4xL
C#'s double.Epsilon is the smallest denormal, not C++'s DBL_EPSILON. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1AXKnxQDaBVoc86q6
Native WinUI keeps CurrentState unchanged while the control is collapsed, so the assertion only holds on Uno. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1AXKnxQDaBVoc86q6
Assert the forever Indeterminate storyboard stops once the bar is collapsed (#26375), and reset window content after tests that load an element so an indeterminate bar does not leak into later tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNtyyK7JKcFPQxBLzNjn
c0fd70e to
a5cf44b
Compare
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 11s —— View job Review of latest head (
|
🤖 Addressed PR comments up to this point
Validation: Runtime: |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 246278 found UI Test snapshots differences: Details
|



GitHub Issue: closes #24561, closes #26375
PR Type:
🐞 Bugfix
What changed? 🚀
The ProgressBar port's header claimed
winui3/release/1.7-stable, butSetProgressBarIndicatorWidthpredated WinUI 1.5.5. This PR re-portsProgressBar,ProgressBarAutomationPeerandProgressBarTemplateSettingsfromwinui3/release/2.5.1(ba3a8d59e).Behavior changes, all matching WinUI:
BorderThicknessplusPadding, clamped at zero. Before, a bar with a horizontal border overshot its track at 100%.LayoutRoundrounds halfway cases away from zero, like C++round().XamlRoot. The rasterization scale falls back to 1.0 (the WinUI fix for a Watson AV).Visibilitychange callback, plus theVisibility == Visiblecheck inUpdateStates). This stops theRepeatBehavior="Forever"Indeterminatestoryboard, so a hidden busy indicator no longer keeps the window rendering at display rate (A collapsed indeterminate ProgressBar keeps animating (120 fps, ~15% CPU); WinUI switches it to Determinate #26375).IRangeValueProvider.SetValuesetsValueinstead of throwingElementNotEnabledException.Structure only: the files are split into
.cs(declaration),.h.mux.cs,.mux.csand.Properties.cspartials to match the upstream file layout. The XAML is untouched: master already re-synced the FluentThemeProgressBar.xamlwith 2.5.1 (including theRepositionThemeAnimationtransitions). The public API is unchanged.Validation (Skia desktop, Release): the 6 new runtime tests fail before the port and pass after.
Given_ProgressBar(both classes),RangeBaseTestsand theGiven_FrameworkElement_And_Leak.When_Add_Removesweep (85 tests) all pass. After the rebase on 2026-11-03:Given_ProgressBarpasses 8/8 on Skia desktop and 7/7 applicable cases on native WinUI (WinAppSDK head); the collapsed-state test is excluded on WinUI, which leavesCurrentStateuntouched while collapsed.After the rebase on 2026-11-13:
Given_ProgressBarpasses 8/8 on Skia desktop (net10.0, Release). The collapsed-state test now also asserts that theIndeterminatestoryboard goes fromActivetoStopped. With theVisibilitycallback removed, it fails (the state staysIndeterminate). Tests that load an element now reset the window content afterwards.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01GRTN5HXeXGXVpTbcBuJ4xL