feat(core): add origin to PropertyChangeData - #11412
Open
edusperoni wants to merge 1 commit into
Open
edusperoni wants to merge 1 commit into
edusperoni wants to merge 1 commit into
Conversation
|
View your CI Pipeline Execution ↗ for commit 6c86476
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
commit: |
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
What is the current behavior?
A programmatic set and a native-originated change (for example the user typing into a
TextField) emit the same<name>Changeevent with identicalPropertyChangeData. Listeners cannot tell user input apart from framework or application writes, nor from values applied by CSS, inheritance or keyframe animations. Two-way bindings and apps work around this with ad-hoc guards, and frameworks see their own writes echoed back as "changes".What is the new behavior?
PropertyChangeDatagains an optionaloriginfield, typed by the new exportedPropertyChangeOriginalias:originscriptProperty/CoerciblePropertysetters,InheritedPropertylocal writes,CssPropertylocal writes (style.color = …),CssAnimationPropertylocal writes,InheritedCssPropertylocal writesnativeProperty.nativeValueChange(the native view reported a value)cssCssProperty/CssAnimationProperty/InheritedCssPropertycss:writes from the style cascadeinheritedInheritedProperty/InheritedCssPropertypropagation from the parentanimationCssAnimationPropertykeyframe writesPlain
Observable.notifyPropertyChange(view models) leavesoriginundefined. Shorthand expansions carry the shorthand's origin into each longhand event.This is additive: no event timing, ordering or payload shape changes; existing listeners are unaffected.
Property.setaccepts an optional secondoriginargument soInheritedPropertycan thread its source through the base setter; property descriptors still invoke it with one argument.Tests:
ui/core/properties/property-change-origin.spec.ts(12 cases) covers every origin and the shorthand and view-model cases.This is the first, independent piece of a larger native-updates redesign (scheduler/commit hook to follow in a separate draft PR).