Skip to content

Conversation

@ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

fix #2861 reinstate ViewToViewModel trigger
feature can now choose the direction the trigger will affect

What is the current behaviour?

after #2772 the trigger was fixed to match a test incorrectly, v14.1 and v14.2 have the ViewModelToView implementation which is the reverse of the correct functionality according to the documentation.

What is the new behaviour?

Added the ability to choose the direction with the default being ViewToViewModel as per the documentation

What might this PR break?

those who have used the ViewModelToView implementation in V14.1 and V14.2 will need to specify the direction in the binding as TriggerUpdate.ViewModelToView.

Please check if the PR fulfils these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

Added TriggerUpdate option to Bind with Trigger to choose which direction the update will occur.
TriggerUpdate default is ViewToViewModel which uses original functionality.
Added tests
@reactiveui reactiveui deleted a comment from todo bot Aug 10, 2021
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #2867 (6743c80) into main (326a0ee) will decrease coverage by 0.52%.
The diff coverage is 59.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2867      +/-   ##
==========================================
- Coverage   72.10%   71.57%   -0.53%     
==========================================
  Files         137      139       +2     
  Lines        4828     4890      +62     
==========================================
+ Hits         3481     3500      +19     
- Misses       1347     1390      +43     
Impacted Files Coverage Δ
.../Bindings/Converter/DoubleToStringTypeConverter.cs 0.00% <0.00%> (ø)
...Bindings/Converter/DecimalToStringTypeConverter.cs 47.61% <47.61%> (ø)
.../Bindings/Property/PropertyBinderImplementation.cs 88.11% <97.29%> (+0.75%) ⬆️
...ctiveUI/Bindings/Property/PropertyBindingMixins.cs 100.00% <100.00%> (+4.16%) ⬆️
...ReactiveUI/Platforms/net5/PlatformRegistrations.cs 57.14% <0.00%> (-28.58%) ⬇️
src/ReactiveUI.Wpf/Registrations.cs 76.92% <0.00%> (-15.39%) ⬇️
src/ReactiveUI.Winforms/Registrations.cs 76.92% <0.00%> (-15.39%) ⬇️
src/ReactiveUI/RxApp.cs 75.34% <0.00%> (-6.85%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 326a0ee...6743c80. Read the comment docs.

Issue with GitHub Actions causing build failure, was thinking was issue with DiffEngine 7.1.0
Add DecimalToStringTypeConverter and DoubleToStringTypeConverter
Add test for Bind with trigger and type converter
@reactiveui reactiveui deleted a comment from todo bot Aug 10, 2021
@ChrisPulman ChrisPulman enabled auto-merge (squash) August 10, 2021 23:04
@ChrisPulman ChrisPulman merged commit 7896a49 into main Aug 11, 2021
@ChrisPulman ChrisPulman deleted the fix_ReinstateBindWithTrigger branch August 11, 2021 00:20
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

since #2772 change, I'm having issues with binding with trigger

3 participants