Skip to content

feat!: Remove Uno-only implicit conversion operators - #24782

Merged
MartinZikmund merged 17 commits into
masterfrom
dev/mazi/implicit-operators-70
Oct 7, 2026
Merged

MartinZikmund merged 17 commits into
masterfrom
dev/mazi/implicit-operators-70

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes unoplatform/uno-private#2105

PR Type:

✨ Feature (breaking, 7.0)

What changed? 🚀

Uno exposed a few C# shortcuts that WinUI doesn't have. Code using them compiled on Uno heads but failed on a WinAppSDK head, and the string ones only failed at runtime (Brush b = "Redd" throws). 7.0 removes them:

Removed Use instead
Brush ← Color / string new SolidColorBrush(...)
GridLength ← string / double new GridLength(...), GridLength.Auto
RowDefinition / ColumnDefinition ← string new RowDefinition { Height = ... }
IconElement ← string new SymbolIcon(Symbol.X)
CornerRadius ← double new CornerRadius(...)
Binding ← string new Binding { Path = new PropertyPath(...) }
string ← PropertyPath path.Path
CornerRadius.None, Thickness.Empty default(CornerRadius), default(Thickness)

Kept on purpose:

  • PropertyPath ← string: generated XAML emits Path = @"X" for every {Binding X}. The generator-backed string operators (Geometry, ImageSource, Duration/KeyTime from string, PointCollection, DoubleCollection, …) are also left alone.
  • Members that WinUI's own C# projection has (checked by reflecting Microsoft.WinUI.dll): GridLength.Auto, Duration.Automatic/Forever, Duration/KeyTime from TimeSpan, RepeatBehavior.Forever, Matrix.Identity.

Generator fix found along the way: {Binding FallbackValue=0} on an object-typed property resolved the value type as Binding itself and only compiled thanks to Binding ← string. That's fixed now. Generated output is byte-identical: all 483 existing generator snapshots are unchanged, and a new snapshot test fails without the fix.

Ecosystem check: C# Markup (uno.csharpmarkup) uses none of the removed members, since it generates explicit constructors, so the #2075 sequencing in the issue doesn't apply. Toolkit, Themes, Extensions, Chefs and Templates don't use them either.

Commits:

  1. fix(xaml) generator fix, then 2. test(xaml) its snapshot test
  2. refactor internal Thickness.Empty/CornerRadius.None → default(T)
  3. feat! removal, plus call-site migration and PackageDiffIgnore entries
  4. docs migration guide section and checklist item

Validation

  • Compile (strict, analyzers on): Uno.UI, SamplesApp desktop (incl. runtime tests), Uno.UI.UnitTests, Uno.UI.SourceGenerators.Tests — net10.0.
  • Generator tests: 497 total / 483 passed / 14 skipped / 0 failed.
  • Uno.UI.UnitTests: 4216 total / 4181 passed / 23 skipped / 12 failed. The 12 are the pre-existing When_Gregorian_FixedDate* timezone tests (fail on non-UTC machines, green on CI).
  • Runtime (Skia desktop): targeted run of 9 classes (Border, Shapes, SKCanvasElement, FrameworkElement, UIElement, BindingExpression, SymbolIcon, TemplateBindingAfterAnimation, VisualStateManager): 738 total / 713 passed / 3 skipped / 24 failed. All 24 are 1px/fractional layout asserts that fail identically on the base commit (A/B run at 250% display scale), so they are pre-existing and scale-dependent. The edited tests pass.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (generator snapshot test)
  • 📚 Docs have been added/updated (migrating-to-uno-7.md)
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests

Breaking change / migration: C# code only, and the compiler flags every use. The fix is the explicit constructor from the table above, which is also what compiles on WinAppSDK. XAML is unaffected.

🤖 Generated with Claude Code

https://claude.ai/code/session_018yJb4hsnB1zq6DJuqugnNW

@github-actions github-actions Bot added area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/code-generation Categorizes an issue or PR as relevant to code generation area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 3m 2s —— View job


Review complete ✅

Verdict: Ship. No inline findings — the removal is mechanical, consistent, and each call-site substitution is behavior-preserving.

  • Gather context (PR diff, changed files, AGENTS.md rules)
  • Review generator fix (XamlFileGenerator.cs, DependencyPropertyMixinGenerator.cs) + snapshot tests
  • Review removed implicit operators (Brush, GridLength, RowDefinition/ColumnDefinition, IconElement, CornerRadius, Binding, PropertyPath)
  • Review call-site migrations across Uno.UI and Uno.UI.Composition
  • Review test changes (unit + runtime tests) for coverage/quality
  • Review PackageDiffIgnore.xml entries and docs update
  • Post inline findings (none)
  • Post summary

Issue count by severity: 0 blocking, 0 minor.

What was checked:

  • Every removed operator (Brush, GridLength, RowDefinition/ColumnDefinition, IconElement, CornerRadius, Binding, PropertyPath, CornerRadius.None, Thickness.Empty) has no leftover callers anywhere in src/ — confirmed via repo-wide grep, not just the diff.
  • Spot-checked non-trivial migrations for behavioral equivalence, not just mechanical sed-style substitution: BindingExpression.cs's ParentBinding.Path?.Path ?? "" reproduces the removed PropertyPath→string operator's null handling exactly; BindingPropertyHelper.FastConvert.cs's new SymbolIcon { Symbol = Enum.Parse<Symbol>(input, true) } reproduces the removed IconElement←string operator body verbatim (same Enum.Parse call, same input type).
  • PackageDiffIgnore.xml entries verified against actual namespaces/signatures in source (e.g. PropertyPath is namespaced Microsoft.UI.Xaml, not .Data, and the ignore entry matches).
  • Generator fix (XamlFileGenerator.cs:6002-6007): the SymbolEqualityComparer.Default.Equals(actualValueType, Generation.DataBindingSymbol.Value) guard matches the existing idiom already used at line 4326, and the new regression test's snapshot (FallbackValue = @"0") confirms the fix — an untyped string literal deferred to runtime conversion, rather than accidentally resolving to Binding as the value type.
  • Kept-on-purpose operators (Duration/KeyTime from TimeSpan, GridLength.Auto) were spot-verified as still present and matching the stated WinUI-parity rationale.
  • Docs (migrating-to-uno-7.md) code samples checked against actual property types (Binding.Path is PropertyPath, PropertyPath.Path is string) — accurate.

Cross-cutting observations (non-blocking):

  • The change is purely mechanical/subtractive plus call-site fixups — no new abstractions, no SOLID/layering concerns, no async/cancellation surface touched, no platform-suffix violations.
  • Conventional Commits followed correctly across all 5 commits, including the feat! breaking marker with issue reference.
  • Test coverage is appropriate: the generator fix has a dedicated red/fix/green snapshot test, and all runtime/unit test call-sites were updated in lockstep with the source changes rather than left stale.

@Xiaoy312 Xiaoy312 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.

good riddance

@Xiaoy312 Xiaoy312 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.

good riddance

@mergify

mergify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund force-pushed the dev/mazi/implicit-operators-70 branch from dcee2bb to fcce14d Compare September 29, 2026 07:13
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 58s —— View job


Review complete ✅

Verdict: Ship. 1 minor (non-blocking) inline finding — everything else checked out clean.

  • Gather context (PR diff, changed files, AGENTS.md rules)
  • Determine what changed since the last review pass — no new commits since the prior automated review (same 5 commits, same 50-file/+327/-141 diff); re-verified the substance directly against origin/master...HEAD rather than relying on the earlier pass
  • Review generator fix (XamlFileGenerator.cs) + DependencyPropertyMixinGenerator.cs + snapshot test
  • Review removed implicit operators and call-site migrations (Brush, GridLength, RowDefinition/ColumnDefinition, IconElement, CornerRadius, Binding, PropertyPath, CornerRadius.None, Thickness.Empty)
  • Review test changes (unit + runtime tests)
  • Review PackageDiffIgnore.xml entries and docs update
  • Post inline findings (1 minor)
  • Post summary

Issue count by severity: 0 blocking, 1 minor.

What was checked directly:

  • Confirmed via repo-wide grep that no callers of the removed CornerRadius.None / Thickness.Empty remain (the one hit, FullCornerRadius.None, is an unrelated, still-existing type).
  • BindingExpression.cs's ParentBinding.Path?.Path ?? "" and BindingPropertyHelper.FastConvert.cs's new SymbolIcon { Symbol = Enum.Parse<Symbol>(input, true) } reproduce the removed operators' behavior exactly (null-handling and Enum.Parse call are unchanged).
  • XamlFileGenerator.cs generator fix guards on !SymbolEqualityComparer.Default.Equals(actualValueType, Generation.DataBindingSymbol.Value), matching the existing idiom elsewhere in the file, and is backed by a proper red/fix/green snapshot test (Given_Binding.When_FallbackValue_Literal_On_Object_Property) plus 3 new generated-output snapshot files.
  • PackageDiffIgnore.xml entries' fully-qualified names/namespaces match the actual removed member signatures (e.g. Microsoft.UI.Xaml.PropertyPath.op_Implicit, not .Data.PropertyPath).
  • Removal sites (Brush.cs, GridLength.cs, CornerRadius.cs, Thickness.cs, Binding.cs, PropertyPath.cs, RowDefinition.cs, ColumnDefinition.cs, IconElement.cs) are clean subtractions with no leftover dead code.

Minor finding (inline): doc/articles/migrating-to-uno-7.md line 1078 — inserting the new checklist item as 17. left the last two items both literally numbered 18. in the raw markdown source. Cosmetic only (GitHub renumbers ordered lists on render), but worth a quick fix for readability of the raw diff/source.

Cross-cutting observations (non-blocking):

  • Purely mechanical/subtractive change plus lock-step call-site fixups — no new abstractions, no layering/SOLID concerns, no async/cancellation surface touched, no platform-suffix violations.
  • Conventional Commits followed correctly across all 5 commits, including the feat! breaking marker with issue reference.
  • Test coverage matches the change: generator fix has its own snapshot test; all affected unit/runtime test call-sites were updated in lockstep rather than left stale.
    · branch dev/mazi/implicit-operators-70

Comment thread doc/articles/migrating-to-uno-7.md Resolved
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/implicit-operators-70 branch from fcce14d to e9df53d Compare September 29, 2026 13:15
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 13s —— View job


Review complete ✅

Verdict: Ship. No new findings — this pass re-reviewed the full diff against origin/master from scratch (not by trusting the prior two automated passes) and confirms the same 5 commits / 50-file diff is unchanged in substance.

  • Gather context (diff vs origin/master, no new commits since the last automated review)
  • Review diff against AGENTS.md rules (operator removals, call-site migrations, generator fix, tests, PackageDiffIgnore.xml, docs)
  • Check whether the previously-flagged numbering nit was addressed
  • Post inline findings (none — see below)
  • Post summary

Issue count by severity: 0 blocking, 0 minor.

What changed since the last review pass: the numbering nit flagged in the prior automated review (doc/articles/migrating-to-uno-7.md, duplicate 18.) is now fixed — the checklist is sequential 15.→20. with no duplicates.

What was independently re-verified this pass (not just taken on faith from prior reviews):

  • GridLength.FromString(string) (src/Uno.UI/UI/Xaml/GridLength.cs:44) is public static and is the correct drop-in for the removed (GridLength)value cast in Given_GridLength.cs:568 — same parsing logic as the removed implicit operator, which forwarded to FromString anyway.
  • The generator fix's guard (XamlFileGenerator.cs:5990, !SymbolEqualityComparer.Default.Equals(actualValueType, Generation.DataBindingSymbol.Value)) uses the same Generation.DataBindingSymbol.Value lazy accessor already used elsewhere in the file (e.g. XamlFileGenerator.cs:4293), so it's not introducing a new/inconsistent pattern.
  • CornerRadius.cs:1086 (this == default) relies on CornerRadius implementing IEquatable<CornerRadius> with an == operator — target-typed default resolves correctly there, equivalent to the removed this == None.
  • All removed operators (Brush, GridLength, RowDefinition/ColumnDefinition, IconElement, CornerRadius, Binding, PropertyPath, CornerRadius.None, Thickness.Empty) have matching, correctly-namespaced entries in PackageDiffIgnore.xml.

Cross-cutting observations (non-blocking, unchanged from prior passes): purely mechanical/subtractive change with lock-step call-site fixups, no new abstractions or layering concerns, Conventional Commits followed correctly (feat! with issue reference), test coverage matches the change (dedicated snapshot test for the generator fix).
· branch dev/mazi/implicit-operators-70

Copilot AI balanced review requested due to automatic review settings October 1, 2026 07:29
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/implicit-operators-70 branch from e9df53d to 8d261da Compare October 1, 2026 07:29
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 16s —— View job


Review complete ✅

Verdict: Ship, with one worth fixing before merge. 2 findings — 1 medium (policy), 1 minor (docs nit).

  • Gather context (diff vs origin/master — unchanged from prior passes: same 5 commits, 50 files, +328/-142)
  • Review generator fix (XamlFileGenerator.cs, DependencyPropertyMixinGenerator.cs) + snapshot tests
  • Review removed implicit operators (Brush, GridLength, RowDefinition/ColumnDefinition, IconElement, CornerRadius, Binding, PropertyPath, CornerRadius.None, Thickness.Empty) + call-site migrations
  • Review test changes
  • Review PackageDiffIgnore.xml and docs
  • Post inline findings (2)
  • Post summary

Issue count by severity: 0 blocking, 1 medium, 1 minor.

New findings this pass (not raised in prior automated reviews):

  • build/PackageDiffIgnore.xml (medium, policy): the 12 new reason="..." entries this PR adds all cite uno-private#2105 — a private-repo issue number — inside a file that's committed to the public repo. AGENTS.md's mandatory "Public Documentation and Spec References" rule says repo-tracked, shareable artifacts must not reference private issues/PRs, and this is the only place in the file that does (everything else uses the public uno#NNNN tracker, 271 occurrences). Easy fix: drop the uno-private#2105 fragment from each reason string.
  • doc/articles/migrating-to-uno-7.md:986 (minor): the suggested Brush ← string replacement (XamlBindingHelper.ConvertValue(typeof(Color), ...) + cast) is more roundabout than the public Microsoft.UI.Colors.Parse(...) API, which is what the removed operator forwarded to internally.

Re-verified from scratch this pass (confirmed still correct):

  • No leftover usages of any removed operator or of CornerRadius.None / Thickness.Empty anywhere in src/ (repo-wide grep, not diff-scoped).
  • The generator fix's new guard (XamlFileGenerator.cs) matches the file's existing Generation.DataBindingSymbol.Value idiom and is backed by a dedicated red/fix/green snapshot test.
  • Migration checklist numbering (flagged and fixed in an earlier pass) is sequential with no duplicates.
  • Call-site migrations (BindingExpression.cs, BindingPropertyHelper.FastConvert.cs, CornerRadius.cs's this == default) remain behavior-preserving.

Cross-cutting observations (non-blocking): mechanical/subtractive change with lock-step call-site fixups, Conventional Commits followed correctly (feat! with issue reference), test coverage matches the change.
· branch dev/mazi/implicit-operators-70

Comment thread build/PackageDiffIgnore.xml Resolved
Comment thread doc/articles/migrating-to-uno-7.md Resolved

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 review overview

🟡 Changes recommended

The public BindingBase string conversion remains and the migration guide contains a null-unsafe replacement.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Removes Uno-only conversion APIs for WinUI parity and fixes object-typed binding fallback generation.

Changes:

  • Removes conversion operators and zero-value sentinel fields.
  • Migrates internal callers and tests to explicit construction.
  • Adds generator coverage, migration guidance, and package-diff exceptions.

Two issues were identified: an equivalent BindingBase conversion remains, and one migration example is not null-safe.

File Description
src/​Uno.UI/​UI/​Xaml/​Thickness.cs Removes Thickness.Empty.
src/​Uno.UI/​UI/​Xaml/​Setter.cs Explicitly extracts the target path.
src/​Uno.UI/​UI/​Xaml/​Media/​Brush.cs Removes brush conversions.
src/​Uno.UI/​UI/​Xaml/​GridLength.cs Removes grid-length conversions.
src/​Uno.UI/​UI/​Xaml/​FrameworkElement.cs Uses default thickness values.
src/​Uno.UI/​UI/​Xaml/​FrameworkElement.crossruntime.cs Updates the margin default.
src/​Uno.UI/​UI/​Xaml/​Documents/​Block.cs Updates metadata defaults.
src/​Uno.UI/​UI/​Xaml/​Data/​PropertyPath.cs Removes conversion to string.
src/​Uno.UI/​UI/​Xaml/​Data/​Binding.cs Removes string conversion.
src/​Uno.UI/​UI/​Xaml/​CornerRadius.cs Removes sentinel and conversion.
src/​Uno.UI/​UI/​Xaml/​Controls/​TextBlock/​TextBlock.cs Updates padding metadata.
src/​Uno.UI/​UI/​Xaml/​Controls/​StackPanel/​StackPanel.Properties.cs Updates border defaults.
src/​Uno.UI/​UI/​Xaml/​Controls/​Slider/​Slider.mux.cs Updates local initialization.
src/​Uno.UI/​UI/​Xaml/​Controls/​RichTextBlock/​RichTextBlockOverflow.Properties.cs Updates padding metadata.
src/​Uno.UI/​UI/​Xaml/​Controls/​RichTextBlock/​RichTextBlock.Properties.cs Updates padding metadata.
src/​Uno.UI/​UI/​Xaml/​Controls/​RelativePanel/​RelativePanel.Properties.cs Updates panel defaults.
src/​Uno.UI/​UI/​Xaml/​Controls/​Page/​Page.IBorderInfoProvider.cs Updates border defaults.
src/​Uno.UI/​UI/​Xaml/​Controls/​ListViewBase/​VirtualizingPanelLayout.managed.cs Updates padding fallback.
src/​Uno.UI/​UI/​Xaml/​Controls/​LayoutPanel/​LayoutPanel.Properties.cs Updates layout defaults.
src/​Uno.UI/​UI/​Xaml/​Controls/​ItemsControl/​ItemsPresenter.cs Updates padding defaults.
src/​Uno.UI/​UI/​Xaml/​Controls/​Icons/​IconElement.cs Removes symbol conversion.
src/​Uno.UI/​UI/​Xaml/​Controls/​Grid/​RowDefinition.cs Removes string conversion.
src/​Uno.UI/​UI/​Xaml/​Controls/​Grid/​Grid.Properties.cs Updates grid defaults.
src/​Uno.UI/​UI/​Xaml/​Controls/​Grid/​ColumnDefinition.cs Removes string conversion.
src/​Uno.UI/​UI/​Xaml/​Controls/​FlipView/​FlipView.managed.cs Updates margin initialization.
src/​Uno.UI/​UI/​Xaml/​Controls/​Control/​Control.cs Updates thickness metadata.
src/​Uno.UI/​UI/​Xaml/​Controls/​ContentPresenter/​ContentPresenter.cs Updates presenter defaults.
src/​Uno.UI/​UI/​Xaml/​Controls/​CalendarView/​CalendarViewBaseItemChrome.cs Updates radius fallback.
src/​Uno.UI/​UI/​Xaml/​Controls/​CalendarView/​CalendarView.Properties.cs Updates calendar metadata.
src/​Uno.UI/​UI/​Xaml/​Controls/​Border/​Border.cs Updates border defaults.
src/​Uno.UI/​UI/​LayoutHelper.cs Replaces the removed sentinel.
src/​Uno.UI/​DataBinding/​BindingPropertyHelper.FastConvert.cs Explicitly constructs symbol icons.
src/​Uno.UI/​DataBinding/​BindingExpression.cs Explicitly extracts binding paths.
src/​Uno.UI/​Controls/​FauxGradientBorderPresenter.cs Updates border defaults.
src/​Uno.UI.UnitTests/​Windows_UI_XAML_Controls/​GridTests/​Given_GridLength.cs Uses explicit grid-length parsing.
src/​Uno.UI.UnitTests/​DependencyProperty/​Given_DependencyProperty.cs Updates default-value assertions.
src/​Uno.UI.RuntimeTests/​Microsoft/​UI/​Xaml/​Shapes/​When_Shape.cs Explicitly constructs brushes.
src/​Uno.UI.RuntimeTests/​Microsoft/​UI/​Xaml/​Given_UIElement.cs Explicitly constructs grid length.
src/​Uno.UI.RuntimeTests/​Microsoft/​UI/​Xaml/​Given_FrameworkElement.cs Explicitly constructs grid lengths.
src/​Uno.UI.RuntimeTests/​Microsoft/​UI/​Xaml/​Controls/​Given_SKCanvasElement.skia.cs Explicitly constructs brushes.
src/​Uno.UI.RuntimeTests/​Microsoft/​UI/​Xaml/​Controls/​Given_Border.cs Explicitly constructs visual values.
src/​Uno.UI.Composition/​Composition/​BorderVisual.skia.cs Replaces radius sentinel checks.
src/​SourceGenerators/​Uno.UI.SourceGenerators/​XamlGenerator/​XamlFileGenerator.cs Corrects object fallback typing.
src/​SourceGenerators/​Uno.UI.SourceGenerators.Tests/​XamlCodeGeneratorTests/​Given_Binding.cs Adds generator regression coverage.
src/​SourceGenerators/​Uno.UI.SourceGenerators.Tests/​Out/​Binding/​WhFaVaLiOnObPr/​XCG_MainPage.cs Adds the generated snapshot.
src/​SourceGenerators/​Uno.UI.SourceGenerators.Tests/​Out/​Binding/​WhFaVaLiOnObPr/​XCG_LocalizationResources.cs Adds snapshot metadata.
src/​SourceGenerators/​Uno.UI.SourceGenerators.Tests/​Out/​Binding/​WhFaVaLiOnObPr/​XCG_GlobalStaticResources.cs Adds snapshot resources.
src/​SourceGenerators/​Uno.UI.SourceGenerators.Internal/​Mixins/​DependencyPropertyMixinGenerator.cs Updates generated defaults.
doc/​articles/​migrating-to-uno-7.md Documents migration steps.
build/​PackageDiffIgnore.xml Records intended API breaks.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread build/PackageDiffIgnore.xml Resolved
Comment thread doc/articles/migrating-to-uno-7.md Resolved
Copilot AI balanced review requested due to automatic review settings October 2, 2026 05:31
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 46s —— View job


Review complete ✅

Verdict: Fix-first. 1 confirmed finding — everything else holds up; all nits from earlier automated passes and from Copilot's review are already resolved on this branch.

  • Gather context (diff vs merge-base 99ce21a3, unchanged since the last automated pass: 6 commits, 50 files, +328/-142)
  • Check whether Copilot's two findings are still valid
  • Check whether uno-private#2105 / checklist numbering nits from prior automated passes were addressed
  • Re-review diff against AGENTS.md rules
  • Post inline findings (1)
  • Post summary

Issue count by severity: 0 blocking, 1 confirmed (parity gap, the PR's own stated goal), 0 minor.

What's fixed since the last pass:

  • build/PackageDiffIgnore.xml's private uno-private#2105 references are gone — all 12 entries now read "Uno-only convenience with no WinUI counterpart (breaking changes for 7.0)".
  • The migration-guide checklist numbering duplicate is resolved.
  • doc/articles/migrating-to-uno-7.md's Brush ← string replacement now uses Microsoft.UI.Colors.Parse(...) (simpler than the earlier XamlBindingHelper.ConvertValue suggestion).
  • Copilot's null-safety finding on string path = binding.Path; is fixed — the doc now shows binding.Path?.Path ?? "".

Confirmed finding (inline, on src/Uno.UI/UI/Xaml/Data/Binding.cs): Copilot flagged that BindingBase.op_Implicit(string) (src/Uno.UI/UI/Xaml/Data/BindingBase.cs:12) was left behind when Binding.op_Implicit(string) was removed. I traced it independently and it's real, not inert: new Binding(path) there still compiles via the kept PropertyPath.op_Implicit(string) conversion feeding Binding's internal 3-arg constructor, and since both DependencyObject.SetBinding(DependencyProperty, BindingBase) and BindingOperations.SetBinding(..., BindingBase) are public, element.SetBinding(dp, "Path") still compiles on Uno but not on WinAppSDK — reproducing exactly the gap this PR exists to close. It isn't listed under "kept on purpose" in the PR description, so it reads as a miss rather than a deliberate exception.

Re-verified from scratch (all still correct):

  • No leftover callers of any of the 9 actually-removed operators or of CornerRadius.None/Thickness.Empty anywhere in src/ (repo-wide grep).
  • DP default-value swaps (Thickness.Empty/CornerRadius.None → default(T)) in Border.cs, Control.cs, and the mixin generator are like-for-like struct defaults, not a primitive-boxing regression.
  • Generator fix (XamlFileGenerator.cs:5987) guards on the existing Generation.DataBindingSymbol.Value idiom and is backed by a red/fix/green snapshot test.
  • CornerRadius.cs's this == default relies on IEquatable<CornerRadius> + ==, correctly replacing this == None.

Cross-cutting observations (non-blocking): mechanical/subtractive change with lock-step call-site fixups, Conventional Commits followed correctly (feat! with issue reference), test coverage matches the change.
· branch dev/mazi/implicit-operators-70

Comment thread src/Uno.UI/UI/Xaml/Data/Binding.cs Resolved

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 review overview

🟡 Changes recommended

Migration guidance still recommends an Uno-only API, and the previously identified BindingBase implicit conversion remains unresolved.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
Resolved since last review (1)

Comment thread doc/articles/migrating-to-uno-7.md Resolved
@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 236879 has failed on Uno.UI - CI.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 09:18
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/implicit-operators-70 branch from 4b205e8 to c91f33e Compare October 3, 2026 09:18
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237657 found UI Test snapshots differences: skia-linux-screenshots: 130, skia-windows-screenshots: 193

Details
  • skia-linux-screenshots: 130 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutomationProperties_AutomationId.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • Buttons.png-dark
    • Buttons.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • AutomationProperties_AutomationId.png
    • ClipboardTests.png-dark
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • Examples.png
  • skia-windows-screenshots: 193 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Focus_FocusVisual_Properties.png-dark
    • Grid_Spacing_Adjustable.png-dark
    • Grid_Spacing_Adjustable.png
    • Grid_Star_Auto_WithTextblock.png-dark
    • Grid_Star_Auto_WithTextblock.png
    • Grid_Style_Local_Override.png-dark
    • Grid_Style_Local_Override.png
    • Grid_Two_bottom_row_Auto__middle_col_auto.png-dark
    • Grid_Two_bottom_row_Auto__middle_col_auto.png

MartinZikmund and others added 17 commits October 7, 2026 10:41
`{Binding FallbackValue=0}` on an object-typed property resolved the
value's type as `Binding` itself (the member's owner), and only compiled
because of Uno's implicit `string -> Binding` operator. Only use the
owner's type when it is a typed value from property-element syntax.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018yJb4hsnB1zq6DJuqugnNW
WinUI has none of these, so code relying on them compiled on Uno heads
but not on WinAppSDK. Removed: Brush from Color/string, GridLength from
string/double, IconElement from string, CornerRadius from double,
Binding from string, PropertyPath to string, Row/ColumnDefinition from
string, plus the CornerRadius.None and Thickness.Empty fields.

PropertyPath from string is kept: generated XAML emits it for every
{Binding}. XAML markup is unaffected.

BREAKING CHANGE: construct these values explicitly
(new SolidColorBrush(...), new GridLength(...), default(Thickness), ...).

Refs unoplatform/uno-private#2105

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018yJb4hsnB1zq6DJuqugnNW
Same Uno-only shortcut as Binding's: SetBinding(dp, "Path") compiled on
Uno but not on WinAppSDK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CKYPsdeNEWd1CARAojRx7H
Thickness.cs and CornerRadius.cs are also compiled into
Uno.UI.Composition, so the removed sentinel fields and the
CornerRadius from double operator vanish there too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011jrRt9mLQkJpfv6uqds4Xx
It fails on master with the same 318 vs 760 baseline on the Android CI
emulator, unrelated to this change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011jrRt9mLQkJpfv6uqds4Xx
It fails on master on the iOS CI simulator, even when retried alone,
unrelated to this change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011jrRt9mLQkJpfv6uqds4Xx
Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:46
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/implicit-operators-70 branch from c824721 to cdc7fc1 Compare October 7, 2026 08:46

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 reached their quota limit.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of the latest pushes (a998df20, cdc7fc1e)

Verdict: Ship. 0 blocking, 0 minor. I read the diffs and did not build or run tests.

  • a998df20 changes the FallbackValue guard in XamlFileGenerator.cs from an exact symbol match to !IsType(actualValueType, Generation.DataBindingSymbol.Value). A TemplateBinding owner derives from Binding, so it is now excluded as well. That closes the TemplateBinding gap raised earlier by Copilot and the previous automated pass.
  • cdc7fc1e adds When_TemplateBinding_FallbackValue_Literal_On_Object_Property ({TemplateBinding Tag, FallbackValue=0} on ContentPresenter.Content), plus its snapshot files. The author reports that the test failed before the fix and passes after it.

Still open, not part of the operator removal:

  • Skipped InputPane tests: the Android and iOS exclusions in Given_InputPane.cs still have no tracking issue. Please file one so they get re-enabled.
  • Screenshot diffs: build 237657 reports 130 changes on Linux and 193 on Windows, still unexplained. Compare them against the base branch before merge.
    · branch dev/mazi/implicit-operators-70

@MartinZikmund MartinZikmund added the ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met label Oct 7, 2026
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237833 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1136

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DropDownButtonPage.png-dark
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • DisplayInformation.png-dark
    • DynamicFont.png-dark
    • DynamicFont.png
  • skia-windows-screenshots: 1136 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutoBorderStretchwithrightmargin.png
    • AutoSuggestBox_Keyboard.png-dark
    • BasicEnability.png-dark
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
    • BorderVersusPanelClipping.png-dark
    • BorderVersusPanelClipping.png
    • Border_LinearGradientBrush.png-dark
    • Border_LinearGradientBrush.png
    • Border_Simple.png-dark
    • Border_Simple.png
    • Button_IsEnabled_Automated.png-dark
    • Button_IsEnabled_Automated.png
    • Capture with overlap.png-dark
    • Capture with overlap.png
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • ComboBox_Stretch.png-dark

@MartinZikmund
MartinZikmund disabled auto-merge October 7, 2026 09:55
@MartinZikmund
MartinZikmund merged commit e2dc4f1 into master Oct 7, 2026
62 of 64 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/implicit-operators-70 branch October 7, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/code-generation Categorizes an issue or PR as relevant to code generation area/skia ✏️ Categorizes an issue or PR as relevant to Skia kind/documentation ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants