Skip to content

chore: Cleanup DependencyPropertyValuePrecedences#22291

Closed
Youssef1313 wants to merge 4 commits intounoplatform:masterfrom
Youssef1313:dev/youssef/cleanup-dp-prec
Closed

chore: Cleanup DependencyPropertyValuePrecedences#22291
Youssef1313 wants to merge 4 commits intounoplatform:masterfrom
Youssef1313:dev/youssef/cleanup-dp-prec

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

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:

Other information ℹ️

Copilot AI review requested due to automatic review settings January 7, 2026 11:55
@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Jan 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

⚠️ CRITICAL ISSUE: The PR description contains "closes #" without an issue number, which violates repository guidelines requiring all PRs to link to a proper GitHub issue.

⚠️ CRITICAL BUILD ERROR: The enum definition in 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 TemplatedParent precedence value from the enum
  • Rename ImplicitStyleDefaultStyle to accurately reflect that it represents default styles
  • Rename ExplicitStyleExplicitOrImplicitStyle (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

Comment thread src/Uno.UI/UI/Xaml/DependencyPropertyValuePrecedences.cs Outdated
Comment thread src/Uno.UI/UI/Xaml/DependencyPropertyValuePrecedences.cs
@unodevops
Copy link
Copy Markdown
Contributor

🤖 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

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22291/docs/index.html

@Youssef1313 Youssef1313 marked this pull request as ready for review January 7, 2026 14:23
Copilot AI review requested due to automatic review settings January 7, 2026 14:23
@Youssef1313
Copy link
Copy Markdown
Member Author

@MartinZikmund

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

@@ -21,32 +21,21 @@ public enum DependencyPropertyValuePrecedences : int
/// </summary>
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copilot generated this review using guidance from organization custom instructions.
Copilot AI review requested due to automatic review settings January 8, 2026 07:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread src/Uno.UI/UI/Xaml/DependencyPropertyValuePrecedences.cs
@unodevops
Copy link
Copy Markdown
Contributor

🤖 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

@unodevops
Copy link
Copy Markdown
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22291/docs/index.html

@Youssef1313 Youssef1313 deleted the dev/youssef/cleanup-dp-prec branch January 14, 2026 13:26
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants