Repository navigation
chore: Cleanup DependencyPropertyValuePrecedences - #15684
Youssef1313 wants to merge 14 commits into
Conversation
8961524 to
af8b5f2
Compare
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15684/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15684/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15684/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15684/index.html |
|
Let's let @jeromelaban to confirm, but it seems safe |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15684/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15684/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15684/index.html |
|
Pushing to Uno 6 |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
Definitely still needed |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15684/index.html |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
f124395 to
ad71431
Compare
Removed unused members and updated comments in PackageDiffIgnore.xml.
b4fd659 to
87b18ed
Compare
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15684/docs/index.html |
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/Uno.UI/UI/Xaml/DependencyPropertyValuePrecedences.cs:43
- The PR description states "makes the current precedences count 8" but the actual count after these changes is 7 precedences: Coercion (0), Animations, Local, ExplicitOrImplicitStyle, DefaultStyle, Inheritance, and DefaultValue. This discrepancy should be corrected in the PR description.
public enum DependencyPropertyValuePrecedences : int
{
/// <summary>
/// Defined by the value returned by PropertyMetadata.CoerceValueCallback (only if it differs from the input/base value)
/// </summary>
Coercion = 0,
/// <summary>
/// Defined by animation storyboards
/// </summary>
Animations,
/// <summary>
/// Values set directly on the Dependency Object
/// </summary>
Local,
/// <summary>
/// Defined when setting a style from the style property or resolving an implicit style
/// </summary>
ExplicitOrImplicitStyle,
/// <summary>
/// Values defined by a default style
/// </summary>
DefaultStyle,
/// <summary>
/// Defined by the inheritance of a FrameworkElement property of the same name
/// </summary>
Inheritance,
/// <summary>
/// Defined on the dependency property metadata
/// </summary>
DefaultValue
}
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15684/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15684/docs/index.html |
|
@Youssef1313 to avoid the public API break, I thought the existing values could be marked as not editor browsable and the renames mapped to the same values, see the latest commit. The only thing that I noticed that could be a problem is that the |
4f5e736 to
1c42d78
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/Uno.UI/UI/Xaml/DependencyPropertyValuePrecedences.cs:56
- With the current enum value assignments (Inheritance = 6 auto-assigned, DefaultStyle = 7 auto-assigned), DefaultStyle will have a LOWER precedence than Inheritance because the precedence system uses numeric comparison where lower values indicate higher precedence. However, the comment in FrameworkElement.cs (line 738-739) states that DefaultStyle should take precedence OVER inherited property values. This is inconsistent. To fix this, DefaultStyle should be assigned a lower numeric value than Inheritance. Consider: ExplicitOrImplicitStyle = 3, Inheritance = 4, DefaultStyle = 5, DefaultValue = 6.
/// <summary>
/// Defined by the inheritance of a FrameworkElement property of the same name
/// </summary>
Inheritance,
/// <summary>
/// Values defined by a default style
/// </summary>
DefaultStyle,
/// <summary>
/// Defined on the dependency property metadata
/// </summary>
DefaultValue
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15684/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15684/docs/index.html |
|
|
|
@MartinZikmund I got it almost green back for you in #22291. Might be easier to continue there. |
|
I think the potential issue @jeromelaban mentioned still holds - existing code using the enum will now use incorrect values, which could be a problem (my guess is it appears especially in XAML source generator outputs). Not sure how much of a break this could be 🤔 |
|
@MartinZikmund The values are not used by XAML generator at all. The only impact I can think of is users explicitly using the enum. It's a case where the enum should have been internal, is not intended to be used, and the likelihood of someone using it is low. However, it's still definitely a breaking change, regardless of the "likelihood" of someone hitting it. So up to you if you want to try taking it (and rolling back if issues arise), or if you want to close the PR altogether. |
|
@Youssef1313 the likelyhood of the use of those is still there. We cannot change those for now, even for our internal dependencies. |
Closes #16356
Removes an unused precedence and renames two others to match their actual semantics.
Note: the removal of the unused precedence makes the current precedences count 8, which means the
DependencyPropertyDetails.Stackarrays will now be of length 8 instead of 16 :)PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):