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

breaking change: Make Bind use non-generic IViewFor #3677

Merged
merged 7 commits into from Nov 23, 2023

Conversation

ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

Fix for #3644

What is the current behavior?

BindCommand requires a view inherited from IViewFor<TViewModel>
ReactiveUserControl inherits IViewFor<TViewModel> which requires Generics which WinForms does not work well with.

What is the new behavior?

Alter BindCommand where clause relaxing to IViewFor.

NOTE: Bind only requires IViewFor and IViewFor<TViewModel> inherits IViewFor therefore BindCommand is now relaxed to IViewFor in the same way as Bind.

add ReactiveUserControlNonGeneric for WinForms inherits IViewFor

What might this PR break?

API Change

Please check if the PR fulfills these requirements

Tests for the changes have been added (for bug fixes / features)
Docs have been added / updated (for bug fixes / features)
Other information:

Add BindCommandNonGeneric this is too avoid the request of not changing the existing code, therefore adding to the available options.
NOTE: Bind only requires `IViewFor` and `IViewFor<TViewModel>` inherits `IViewFor` therefore would still be a non breaking change if BindCommand were relaxed to IViewFor.

add ReactiveUserControlNonGeneric for WinForms
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (dd1e6b3) 58.49% compared to head (4c30218) 58.38%.
Report is 1 commits behind head on main.

Files Patch % Lines
...activeUI.Winforms/ReactiveUserControlNonGeneric.cs 0.00% 6 Missing ⚠️
...Winforms/ReactiveUserControlNonGeneric.Designer.cs 0.00% 3 Missing ⚠️
...activeUI/Bindings/Command/CreatesCommandBinding.cs 25.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3677      +/-   ##
==========================================
- Coverage   58.49%   58.38%   -0.12%     
==========================================
  Files         158      160       +2     
  Lines        5775     5774       -1     
  Branches     1026     1028       +2     
==========================================
- Hits         3378     3371       -7     
- Misses       2010     2015       +5     
- Partials      387      388       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChrisPulman ChrisPulman marked this pull request as draft November 22, 2023 20:37
@ChrisPulman ChrisPulman marked this pull request as ready for review November 22, 2023 22:06
@glennawatson glennawatson changed the title Fix for 3644 Option 2 breaking change: Make Bind use non-generic IViewFor Nov 23, 2023
@glennawatson glennawatson merged commit 23334c1 into main Nov 23, 2023
1 of 3 checks passed
@glennawatson glennawatson deleted the CP_FixFor3644Option2 branch November 23, 2023 00:34
Copy link

github-actions bot commented Dec 8, 2023

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 Dec 8, 2023
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.

None yet

2 participants