Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value store v3.0 #8600

Merged
merged 115 commits into from
Nov 18, 2022
Merged

Value store v3.0 #8600

merged 115 commits into from
Nov 18, 2022

Commits on Jun 5, 2022

  1. Configuration menu
    Copy the full SHA
    cf06885 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2022

  1. Initial refactor of AvaloniaObject value store.

    Most (but not all) tests passing, all features mostly implemented exception coercion.
    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    71785b7 View commit details
    Browse the repository at this point in the history
  2. Don't add duplicate frames.

    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    79115bd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    72308f1 View commit details
    Browse the repository at this point in the history
  4. Refactored inheritance.

    To remove `InheritanceFrame` - it was unneeded, we can just point to the nearest ancestor value store with inherited values.
    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    483bbd2 View commit details
    Browse the repository at this point in the history
  5. Implemented coercion.

    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    fb3e9d7 View commit details
    Browse the repository at this point in the history
  6. Reinstated test.

    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    fd3e561 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    14f17f2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1e4577f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    18caac1 View commit details
    Browse the repository at this point in the history
  10. Fix DataContext notifications.

    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    a49a01c View commit details
    Browse the repository at this point in the history
  11. Tweak naming.

    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    2377dca View commit details
    Browse the repository at this point in the history
  12. Remove unused field.

    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    f3369cb View commit details
    Browse the repository at this point in the history
  13. Fix missing logging.

    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    88d59a4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c44e0bd View commit details
    Browse the repository at this point in the history
  15. Fix a couple of inheritance bugs.

    With associated unit tests.
    grokys committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    0119cf1 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2022

  1. Refactored style activators.

    - Always evaluate the active state from current information, don't rely on subscriptions to fire as the current state may not be up-to-date
    - Don't notify the `IStyleActivatorSink` of a change immediately on subscription
    grokys committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    09d0c3a View commit details
    Browse the repository at this point in the history
  2. Remove IValueFrame.

    And use the concrete `ValueFrame` (renamed from `ValueFrameBase`) as this was the only implementation of the interface.
    grokys committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    caf5686 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c386447 View commit details
    Browse the repository at this point in the history
  4. Use shared StyleInstance if possible.

    If a `StyleBase` has no activator, and its `Setter`s don't need to be separately instanced on the control, then we can share a `StyleInstance` between controls.
    
    This causes failing tests because `TopLevel` applies styles in its constructor, but doesn't set `_styled` to true, meaning that styles get applied twice. This issue will need to be addressed separately.
    grokys committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    56c098f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    653a6b8 View commit details
    Browse the repository at this point in the history
  6. Remove assertion.

    Due to #8549.
    grokys committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    a98772c View commit details
    Browse the repository at this point in the history
  7. Remove unused method.

    grokys committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    14a21f1 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f6d15d3 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2022

  1. WIP: Tweaking benchmarks.

    grokys committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    309b127 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cda288f View commit details
    Browse the repository at this point in the history
  3. WIP: Speed up benchmarks.

    grokys committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    d77fe8c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7f5171e View commit details
    Browse the repository at this point in the history
  5. Conform better to dictionary API.

    And rename collection to indicate this.
    grokys committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    0518fdd View commit details
    Browse the repository at this point in the history
  6. Add null check.

    grokys committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    7b0f536 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    036557b View commit details
    Browse the repository at this point in the history
  8. Added ContainsKey.

    grokys committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    f07f64d View commit details
    Browse the repository at this point in the history
  9. Added tests for AvaloniaPropertyDictionary.

    And fixed a couple of bugs.
    grokys committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    13a5ce6 View commit details
    Browse the repository at this point in the history
  10. Renamed/moved benchmark.

    grokys committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    2bfaa8b View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2022

  1. Remove unneeded change.

    grokys committed Jul 22, 2022
    Configuration menu
    Copy the full SHA
    2589f26 View commit details
    Browse the repository at this point in the history
  2. Added Clear method.

    grokys committed Jul 22, 2022
    Configuration menu
    Copy the full SHA
    1023029 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d45f96d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    988e26e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    90c6dcf View commit details
    Browse the repository at this point in the history
  6. Throw for duplicate setters in styles.

    And remove the duplicate setter that we have.
    grokys committed Jul 22, 2022
    Configuration menu
    Copy the full SHA
    c6dab8b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1fa0f20 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    122bc0c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f10d4ac View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b48a1f4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b1bee79 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4569de2 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2022

  1. Configuration menu
    Copy the full SHA
    651dc13 View commit details
    Browse the repository at this point in the history
  2. Don't throw trying to unsub if not subscribed.

    This can happen when re-evaluating the value store if a style is detached before its frame is evaluated.
    grokys committed Jul 24, 2022
    Configuration menu
    Copy the full SHA
    702e839 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    31e6bb4 View commit details
    Browse the repository at this point in the history
  4. Store direct property bindings in ValueStore.

    We already have a place to store them in the `_localValueBindings` list, so use that rather than having a separate `_directBindings` list in `AvaloniaObject`.
    grokys committed Jul 24, 2022
    Configuration menu
    Copy the full SHA
    8f98c2a View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2022

  1. Special-case frames with one entry.

    Seems it's slightly faster to re-evaluate the single value in this case.
    grokys committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    0c4aae0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e1d401 View commit details
    Browse the repository at this point in the history
  3. Remove unused code.

    grokys committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    763111b View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2022

  1. Don't set owner for shared value frames.

    Should fix leak tests.
    grokys committed Jul 26, 2022
    Configuration menu
    Copy the full SHA
    09d0992 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2022

  1. Remove duplicate import.

    grokys committed Jul 27, 2022
    Configuration menu
    Copy the full SHA
    1e737dc View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Configuration menu
    Copy the full SHA
    7211f03 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2022

  1. Configuration menu
    Copy the full SHA
    2e32945 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2022

  1. Configuration menu
    Copy the full SHA
    22576b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c809c9a View commit details
    Browse the repository at this point in the history
  3. Added more failing tests for desired behavior.

    We should be unsubscribing from bindings when a higher priority binding or value is added.
    grokys committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    d1a5870 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a667f5 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2022

  1. Unsubscribe inactive bindings.

    grokys committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    d14ff72 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2022

  1. Configuration menu
    Copy the full SHA
    dd285ee View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. Refactor binding IValueEntry into base class.

    Too many gotchas in implementing binding entries, we'll take the performance hit of a few virtual method calls.
    grokys committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    9367f8b View commit details
    Browse the repository at this point in the history
  2. Fix inactive two-way setter bindings.

    Make two-way bindings in setters not write to source when inactive.
    grokys committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    ead8980 View commit details
    Browse the repository at this point in the history
  3. Skip some of the two-way binding tests.

    The value store alone cannot fix these tests, as writing back to source in two-way bindings is implemented at a higher level than the value store. We'll need to refactor the way two-way bindings work in a separate PR.
    grokys committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    333bcb2 View commit details
    Browse the repository at this point in the history
  4. Added failing animation test.

    grokys committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    ed11b75 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2022

  1. Attach animations in styles.

    grokys committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    2d38eb8 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2022

  1. Configuration menu
    Copy the full SHA
    6f3a649 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2022

  1. Add additional failing test.

    grokys committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    1730331 View commit details
    Browse the repository at this point in the history
  2. Re-evaluate all properties if necessary.

    When re-evaluating a single property, if the frame activation state changes then we need to re-evaluate all properties.
    grokys committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    12f72dd View commit details
    Browse the repository at this point in the history
  3. Expose activation state via a method.

    Previously, the `IsActive` property caused the activator state to be re-evaluated, which meant that when the _debugger_ read it, it was re-evaluated, making debugging difficult.
    grokys committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    96942a2 View commit details
    Browse the repository at this point in the history
  4. Remove tags from style activators.

    They're no longer needed.
    grokys committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    fc33707 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2022

  1. Added another failing test.

    grokys committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    b650bb6 View commit details
    Browse the repository at this point in the history
  2. Re-evaluate all properties if necessary.

    When re-evaluating a single property, if the frame activation state  changes when unsubscribing from inactive frames then we need to re-evaluate all properties.
    grokys committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    dd5a7c9 View commit details
    Browse the repository at this point in the history
  3. Make test fail again.

    grokys committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    d34c367 View commit details
    Browse the repository at this point in the history
  4. Re-evaluate all properties if necessary.

    Even if the frame's activation state has changed to false.
    grokys committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    2144f92 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bda4a4b View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2022

  1. Configuration menu
    Copy the full SHA
    6ee2c43 View commit details
    Browse the repository at this point in the history
  2. Raise correct inheritance value change.

    When raising `PropertyChanged` due to setting the inheritance parent, use the closest value in the inheritance tree rather than the furthest.
    grokys committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    a1830b7 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. Don't use Microsoft.Reactive.Testing here.

    It's unsuitable for our needs as there's no way to make an observable fire on subscribe.
    grokys committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    5a60466 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd357e0 View commit details
    Browse the repository at this point in the history
  3. Fix bug in ExpressionObserver.

    Ensure `rootGetter` is evaluated each time the observer is initialized; plus failing and now passing test.
    grokys committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    b5891a2 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2022

  1. Configuration menu
    Copy the full SHA
    20d85df View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

  1. Configuration menu
    Copy the full SHA
    9b2d9be View commit details
    Browse the repository at this point in the history
  2. Go direct to ValueStore for untyped GetValue.

    Avoids a virtual call in the case of styled properties.
    grokys committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    ba4bfc3 View commit details
    Browse the repository at this point in the history
  3. Removed unused method.

    grokys committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    e2c6444 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9807907 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    63cc1a0 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2022

  1. Configuration menu
    Copy the full SHA
    37de576 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2022

  1. Configuration menu
    Copy the full SHA
    4c436ac View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2022

  1. Configuration menu
    Copy the full SHA
    034e019 View commit details
    Browse the repository at this point in the history
  2. Remove unneeded interface.

    grokys committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    06efa3e View commit details
    Browse the repository at this point in the history
  3. Remove unneeded method.

    grokys committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    e44d902 View commit details
    Browse the repository at this point in the history
  4. Remove unused code.

    grokys committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    bfa6648 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    459d195 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9bc18ef View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2022

  1. Configuration menu
    Copy the full SHA
    d6ea077 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0cdedaa View commit details
    Browse the repository at this point in the history
  3. Prevent exception when removing value.

    Calling `DisposeAndRaiseUnset` can cause a nested reevaluation of property values.
    grokys committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    061f01a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1440b57 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2f61efa View commit details
    Browse the repository at this point in the history
  6. Move collection polyfills to Compatibility dir.

    And tweak to match existing code there.
    grokys committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    2268f70 View commit details
    Browse the repository at this point in the history
  7. Make fields readonly.

    And remove a `using` that crept in unexpectedly.
    grokys committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    f332616 View commit details
    Browse the repository at this point in the history
  8. Remove unused operators.

    grokys committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    1184e0e View commit details
    Browse the repository at this point in the history
  9. Make field readonly.

    grokys committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    ca2a0d6 View commit details
    Browse the repository at this point in the history
  10. Remove empty frames.

    In doing so, merged `ValueStore.OnBindingCompleted` into `OnValueEntryRemoved` as they were doing the same thing.
    grokys committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    ae72b81 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    fcdabff View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2022

  1. Configuration menu
    Copy the full SHA
    0aa7a89 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2022

  1. Configuration menu
    Copy the full SHA
    0119a37 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. Configuration menu
    Copy the full SHA
    4f19650 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. Avoid boxing in EffectiveValue<T>.SetAndRaise.

    Added `IValueEntry<T>` interface back in and use that if present to get the value from the entry.
    grokys committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    a9f12cb View commit details
    Browse the repository at this point in the history
  2. Cache property metadata in effective value.

    Decreases the number of metadata lookups needed. Previously we were doing two lookups on construction now we're only doing one.
    grokys committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    5a13453 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

  1. Configuration menu
    Copy the full SHA
    3ba0758 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2022

  1. Configuration menu
    Copy the full SHA
    59ea8b8 View commit details
    Browse the repository at this point in the history