Skip to content

chore: Cleanup DependencyPropertyValuePrecedences - #22291

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

Youssef1313 wants to merge 4 commits into
unoplatform: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

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.

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 ImplicitStyle → DefaultStyle to 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

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@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

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.

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>

Copilot AI Jan 7, 2026

Copy link

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

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.

Pull request overview

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

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@Youssef1313
Youssef1313 deleted the dev/youssef/cleanup-dp-prec branch January 14, 2026 13:26
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 2, 2026
@unoplatform unoplatform unlocked this conversation Jul 2, 2026
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