Repository navigation
refactor(dp)!: Clean up DependencyPropertyValuePrecedences enum - #23685
Conversation
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23685/wasm-skia-net9/index.html |
|
The build 221330 found UI Test snapshots differences: Details
|
52ab90b to
1a422bf
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23685/wasm-skia-net9/index.html |
|
The build 222057 found UI Test snapshots differences: Details
|
Removes the obsolete `TemplatedParent` and `ImplicitStyle` members and renames the surviving style precedences to match WinUI's BaseValueSource model: - `ExplicitStyle` -> `Style` (holds an applied implicit or explicit style) - `DefaultStyle` -> `BuiltInStyle` (the Generic.xaml default style), reordered above `Inheritance` to reflect its real runtime precedence Default-style values previously misused the `ImplicitStyle` slot; they now use the correctly-named `BuiltInStyle`. All readers across the DP system (DependencyObjectStore, DependencyPropertyHelper, Style, FrameworkElement, DependencyObjectExtensions) are repointed onto the surviving values. The removed public members are declared in build/PackageDiffIgnore.xml so the API-diff gate accepts the intentional break. BREAKING CHANGE: the public enum members DependencyPropertyValuePrecedences.TemplatedParent, .ImplicitStyle, .ExplicitStyle and .DefaultStyle are removed. Use .Style and .BuiltInStyle. Relates to #16356 Co-Authored-By: Claude Opus 4.8 <[email protected]>
1a422bf to
1ba8dd3
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23685/wasm-skia-net9/index.html |
|
The build 222128 found UI Test snapshots differences: Details
|
|
Tick the box to add this pull request to the merge queue (same as
|
BC39 landed via #23685, but the rollup still showed it unticked against the abandoned PR #15684, two comments still named removed enum members, and the migration guide never covered the enum at all — it is public and reachable through the `DependencyObjectExtensions.GetValue`/`SetValue` precedence overloads. Ticks the rollup row and repoints it, records what actually changed, adds the old-to-new table to the migration guide, and fixes the two stale comments. The Hyperlink one was doubly wrong: `SetCurrentForeground` applies at `Animations` precedence (matching `CHyperlink::UpdateForegroundColor`), not a style level. Closes unoplatform/uno-private#2135 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011qRGTg54VDxAG7zjuEVdoA
BC39 landed via #23685, but the rollup still showed it unticked against the abandoned PR #15684, two comments still named removed enum members, and the migration guide never covered the enum at all — it is public and reachable through the `DependencyObjectExtensions.GetValue`/`SetValue` precedence overloads. Ticks the rollup row and repoints it, records what actually changed, adds the old-to-new table to the migration guide, and fixes the two stale comments. The Hyperlink one was doubly wrong: `SetCurrentForeground` applies at `Animations` precedence (matching `CHyperlink::UpdateForegroundColor`), not a style level. Closes unoplatform/uno-private#2135 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011qRGTg54VDxAG7zjuEVdoA
BC39 landed via #23685, but the rollup still showed it unticked against the abandoned PR #15684, two comments still named removed enum members, and the migration guide never covered the enum at all — it is public and reachable through the `DependencyObjectExtensions.GetValue`/`SetValue` precedence overloads. Ticks the rollup row and repoints it, records what actually changed, adds the old-to-new table to the migration guide, and fixes the two stale comments. The Hyperlink one was doubly wrong: `SetCurrentForeground` applies at `Animations` precedence (matching `CHyperlink::UpdateForegroundColor`), not a style level. Closes unoplatform/uno-private#2135 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011qRGTg54VDxAG7zjuEVdoA
BC39 landed via #23685, but the rollup still showed it unticked against the abandoned PR #15684, two comments still named removed enum members, and the migration guide never covered the enum at all — it is public and reachable through the `DependencyObjectExtensions.GetValue`/`SetValue` precedence overloads. Ticks the rollup row and repoints it, records what actually changed, adds the old-to-new table to the migration guide, and fixes the two stale comments. The Hyperlink one was doubly wrong: `SetCurrentForeground` applies at `Animations` precedence (matching `CHyperlink::UpdateForegroundColor`), not a style level. Closes unoplatform/uno-private#2135 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011qRGTg54VDxAG7zjuEVdoA
GitHub Issue: closes #16356
PR Type:
💬 Other — breaking API cleanup (refactoring with public enum surface removal)
What changed? 🚀
Cleans up the public
DependencyPropertyValuePrecedencesenum, converging it on WinUI'sBaseValueSourcemodel and removing legacy/misused members.Before, the enum carried levels that diverged from WinUI and were used inconsistently:
ExplicitStyle;ImplicitStylelevel;DefaultStylewas effectively vestigial and sat belowInheritance;TemplatedParenthad no readers anywhere.After, aligned with WinUI's
BaseValueSource:ExplicitStyleStyle— an applied implicit or explicit style (WinUIBaseValueSourceStyle)DefaultStyleBuiltInStyle— the Generic.xaml default style (WinUIBaseValueSourceBuiltInStyle), reordered aboveInheritanceto reflect its real runtime precedenceImplicitStyleBuiltInStyleTemplatedParentAll readers across the DP value-resolution system are repointed onto the surviving values:
DependencyObjectStore,DependencyPropertyHelper,Style,FrameworkElement,DependencyObjectExtensions, plus theWrapPanel/Slidercall sites. There is no behavioural change for real scenarios — default styles already took precedence over inheritance at runtime (via the misusedImplicitStyleslot); this PR simply makes the enum say what the system actually does, and gives the levels their WinUI-aligned names.PR Checklist ✅
BuiltInStyle-over-Inheritanceordering (Given_DependencyProperty.When_Each_Precedence_Set_Then_Highest_Wins,When_BuiltInStyle_Set_Then_Takes_Precedence_Over_Inherited_Value); existing style/precedence and binder tests updated for the new names.Screenshots Compare Test Runresults.Breaking change
Source-breaking, intentionally scoped to the 7.0 breaking-changes window (this PR targets
feature/breakingchanges).The public enum members
DependencyPropertyValuePrecedences.TemplatedParent,.ImplicitStyle,.ExplicitStyleand.DefaultStyleare removed (hard removal — no[EditorBrowsable]-hidden aliases). Migration for any code referencing them:ExplicitStyle→StyleImplicitStyle/DefaultStyle→BuiltInStyleTemplatedParent→ no replacement (it had no readers)🤖 Generated with Claude Code