chore: Cleanup DependencyPropertyValuePrecedences#22291
chore: Cleanup DependencyPropertyValuePrecedences#22291Youssef1313 wants to merge 4 commits intounoplatform:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR is a refactoring effort to clean up the DependencyPropertyValuePrecedences enum by removing an unused precedence value (TemplatedParent) and renaming enum members to better reflect their actual semantics. This is a rework of PR #15684.
DependencyPropertyValuePrecedences.cs is missing a crucial rename - ExplicitStyle needs to be renamed to ExplicitOrImplicitStyle to match all the usage changes throughout the codebase. Without this change, the code will not compile.
Key Changes
- Remove unused
TemplatedParentprecedence value from the enum - Rename
ImplicitStyle→DefaultStyleto accurately reflect that it represents default styles - Rename
ExplicitStyle→ExplicitOrImplicitStyle(missing in enum definition) to reflect that it covers both explicit and implicit styles - Update all references throughout the codebase to use the new enum member names
- Remove obsolete comments referencing PR #15684
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/DependencyPropertyValuePrecedences.cs | CRITICAL: Removes TemplatedParent and renames ImplicitStyle to DefaultStyle, but missing the rename of ExplicitStyle to ExplicitOrImplicitStyle |
| src/Uno.UI/UI/Xaml/Style/Style.cs | Updates style application logic to use new precedence names (DefaultStyle, ExplicitOrImplicitStyle) |
| src/Uno.UI/UI/Xaml/Internal/DependencyPropertyHelper.cs | Updates precedence returns and removes obsolete comment referencing PR #15684 |
| src/Uno.UI/UI/Xaml/FrameworkElement.cs | Updates style application to use ExplicitOrImplicitStyle and DefaultStyle precedences |
| src/Uno.UI/UI/Xaml/DependencyObjectStore.cs | Updates store operations and removes obsolete comments; updates precedence checks in HasLocalOrModifierValue |
| src/Uno.UI/UI/Xaml/DependencyObjectExtensions.cs | Updates GetBaseValueSource to check for new precedence names |
| src/Uno.UI/UI/Xaml/Controls/WrapPanel/WrapPanel.cs | Updates template property precedence check from ImplicitStyle to DefaultStyle |
| src/Uno.UI/UI/Xaml/Controls/Slider/Slider.mux.cs | Updates background precedence from ImplicitStyle to DefaultStyle |
| src/Uno.UI.Tests/DependencyProperty/Given_DependencyProperty.cs | Updates all test expectations to use new precedence names |
| src/Uno.UI.Tests/BinderTests/Given_Binder.LocalCache.cs | Updates binder test to use DefaultStyle instead of ImplicitStyle |
| src/Uno.UI.Tests/BinderTests/Given_Binder.GeneratedAttached.cs | Updates attached property tests to use DefaultStyle precedence |
| src/Uno.UI.RuntimeTests/Tests/Uno_Helpers/Given_DependencyPropertyHelper.cs | Updates runtime test expectation to use ExplicitOrImplicitStyle |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22291/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22291/docs/index.html |
| @@ -21,32 +21,21 @@ public enum DependencyPropertyValuePrecedences : int | |||
| /// </summary> | |||
There was a problem hiding this comment.
The PR description states "closes #" without providing an issue number. According to the repository guidelines, every PR must reference a proper GitHub issue. Please provide the issue number or link in the format: "Fixes https://github.com/unoplatform/uno/issues/#ISSUE_NUMBER"
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22291/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22291/docs/index.html |
GitHub Issue: closes #
PR Type:
What is the current behavior? 🤔
DependencyPropertyValuePrecendences enum is messed up.
What is the new behavior? 🚀
Enum is fixed. This is a re-work of #15684.
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️