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

Microsoft.Toolkit.Mvvm package #3229

Merged
merged 256 commits into from Aug 1, 2020

Conversation

Sergio0694
Copy link
Member

@Sergio0694 Sergio0694 commented Apr 9, 2020

Closes #3230

PR Type

What kind of change does this PR introduce?

  • Feature

Preview package

The CI is now running for this PR, so you should be able to just get the latest package from the CI build artifacts.

What is the current behavior?

There are no built-in MVVM primitives.

What is the new behavior?

There is a new Microsoft.Toolkit.Mvvm package offering some basic MVVM primitives.
Additional details are all listed in the related issue.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • If new feature, add to Feature List (deprecated, see Update Readme feature list #3236)
  • Contains NO breaking changes

@ghost
Copy link

ghost commented Apr 9, 2020

Thanks Sergio0694 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@michael-hawker michael-hawker added the .NET Components which are .NET based (non UWP specific) label Jul 21, 2020
Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking forward to the next phase of docs and samples!

Copy link

@Aminator Aminator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This library is a great addition to the Windows Community Toolkit and will make it easier for developers that want to get started with MVVM or want to switch from existing MVVM libraries. You can choose only the components you need and the API surface is held quite simple, though beginners to MVVM will need proper documentation. It covers many different patterns for using MVVM in that it makes messaging completely optional and allows having a static service locator with the Ioc class and proper dependency injection with Microsoft.Extensions.DependencyInjection utilizing constructor injection. The code is well written and performant and only needs a few remaining issues ironed out.

Microsoft.Toolkit.Mvvm/ComponentModel/ObservableObject.cs Outdated Show resolved Hide resolved
Microsoft.Toolkit.Mvvm/DependencyInjection/Ioc.cs Outdated Show resolved Hide resolved
Microsoft.Toolkit/Extensions/TaskExtensions.cs Outdated Show resolved Hide resolved
Microsoft.Toolkit.Mvvm/Microsoft.Toolkit.Mvvm.csproj Outdated Show resolved Hide resolved
Features 7.0 automation moved this from In progress to Review in progress Jul 30, 2020
@ghost
Copy link

ghost commented Jul 30, 2020

This PR has been marked as "needs attention 👋" and awaiting a response from the team.

@Sergio0694
Copy link
Member Author

Thank you @Aminator for taking the time to go over the PR and for the feedbacks! 😊🚀

@michael-hawker
Copy link
Member

Thank you for the review @Aminator! 🦙❤

Think we've had enough eyes and feedback on this for our initial round, so we'll merge this in and look for making any changes after a broader feedback period with a preview NuGet package. I'll open an issue when we make a release of that to track any feedback overall, or we'll do that in a separate sample repo for the interim maybe?

Either way 🚀

@ghost ghost removed the needs attention 👋 label Aug 1, 2020
@michael-hawker michael-hawker merged commit 1383eec into CommunityToolkit:master Aug 1, 2020
Features 7.0 automation moved this from Review in progress to Done Aug 1, 2020
ghost pushed a commit that referenced this pull request Aug 11, 2020
## Follow up to #3229 
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

### NOTE
Marking this not as a draft so that the CI will run, but added the "DO NOT MERGE ⚠" tag as we might come up with further improvements to add to this PR before actually deciding to merge this and finalize the package.

<!-- Add a brief overview here of the feature/bug & fix. -->

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

 - Bugfix 
 - Feature
 - Refactoring (no functional changes, no api changes) 
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->

## Notable changes
<!-- Describe how was this issue resolved or changed? -->
This PR includes some refinements and tweaks to the `Microsoft.Toolkit.Mvvm` package, like:

- Added new `ObservableRecipient.SetProperty` overloads with `Expression<Func<T>>` and `bool broadcast` params
- Fixed a possible bug in `Messenger.Type2.Equals` (just to be extra sure)
- Improved codegen for `ObservableRecipient.Set<T>(ref T, T, string)` (missing `EqualityComparer<T>.Default.Equals` inlining)

## PR Checklist

Please check if your PR fulfills the following requirements:

- [X] Tested code with current [supported SDKs](../readme.md#supported)
- [ ] ~~Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->~~
- [ ] ~~Sample in sample app has been added / updated (for bug fixes / features)~~
    - [ ] ~~Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)~~
- [X] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [X] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [X] Contains **NO** breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 💡 feature request 📬 A request for new changes to improve functionality .NET Components which are .NET based (non UWP specific) open discussion ☎️
Projects
No open projects
Features 7.0
  
Done
Development

Successfully merging this pull request may close these issues.

[Feature] Basic MVVM primitives (.NET Standard)
8 participants