Implement Shell and Dependency Injection for Popup Sample App#303
Merged
pictos merged 10 commits intopj/popup-to-handlerfrom Feb 18, 2022
Merged
Conversation
pictos
approved these changes
Feb 18, 2022
Member
|
Thanks, @brminnick . Tomorrow I'll more changes on the original PR and that should be ready for another review round |
TheCodeTraveler
added a commit
that referenced
this pull request
Mar 14, 2022
* android and ios popup implementation * bring renderer * Moved Handlers to Core project * updated Windows supported version * Added Handlers, native popup and Extensions to Core project * Added workaround classes until p12 * Added NavigationExtensions and Popup implementation * Added workaround until p12 * Updated Core to p12 * p12 update * returned with the WrapperControl * Handler work * initial spike on PlatformSpecificConfiguration and Handlers * Fixed popupColor on iOS * more iOS love * Changed the method call to be one from internal MAUI * IsLightDismissEnabled is now bindable * IsLightDismissEnabled is now a Bindable Property * Ported all sample pages from XCT to MCT * hold for rebase * Added popup samples * adjusted to workaround a maui bug * changed the obsolete API to a supported one * Fixed windows popup version * code style * Added xml docs and code improvements * More xml docs and code clean up * Fixed sample * Fixed border and size calculation on Windows * more native work * samples! * fixed editor config * Update src/CommunityToolkit.Maui.Core/Platform/Android/PopupExtensions.android.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui.Core/Platform/Windows/MCTPopup.windows.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui.Core/Platform/Windows/PopupExtensions.windows.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui/Extensions/Navigation/NavigationExtensions.netstandard.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui/Extensions/Navigation/NavigationExtensions.netstandard.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * moved files and updated to p13 * Changed prop implementation on PopupSize * bump windows version to match .NET MAUI template * Replace all Xamarin references to MAUI RIP Xamarin (◡︵◡) * Code review * removed the "native" word * fixed wrong tag * fixed ViewController set * removed using * make the navigation on Windows better * Remove `netstandard` * Fix `UniformItemsLayoutTests ` namespace * Update PopupViewHandler.shared.cs * Update PopupViewHandler.shared.cs * Implement Shell and Dependency Injection for Popup Sample App (#303) * Alphabetize FlyoutItems * Reorganize Folder Architecture, Create ViewsGallery, Use AppShell * Fix Build Errors * Fix Build Errors * Update CommunityToolkit.Maui.Sample.csproj (#302) * Update Shell + DI * Add Popups to `MultiplePopupPage` * Finish `MultiplePopupPage` * Update MultiplePopupPage.xaml.cs * Update `AppShell.xaml` for MacCatalyst * Update `Microsoft.NET.Test.Sdk ` NuGet Package * Rename to `PopupExtensions.*.cs` * Update Code Organization * Update Code Organization * Create PopupTests.cs * Rename `MCTPopup` to `MauiPopup` This aligns with the .NET MAUI naming convention, e.g. `MauiLabel` * Add `MacCatalyst` Values * Added workaround for Windows measurement * improved comment * Update `Title` * Center the red frame * Use `ButtonPopup` * Added a test as sample * Fixed namespace and added xml docs * Updated to use Page instead of INavigation * Fixed measurement on Android * Popup tests to make Brandon Happy ƪ(ړײ)ƪ * Update Exceptions * Add `ShowPopupAsync`, `dotnet format` * Removed MainPage reference from MauiPopup.macios * Moved Maui.Controls reference to CommunityToolkit.Maui project * code fix style * Renamed BasePopup -> Popup The control isn't abstract anymore * deleted old Popup file * measurement is hard (ノ ゜Д゜)ノ ︵ ┻━┻ * Fix `CsharpBindingPopup` * add `static` * Move `WrapperControl` to `CommunityToolkit.Core.Views` * Add Nullable Static Analyzers, Remove Null Forgiving Operator, Remove unused parameters * Remove unneeded Null Propagating Operator * `dotnet format` * Remove unneeded Null Propagating Operators, Remove Unused Code * Remove Unused Code * Fix Null Crash * Rename HandlerImpl to HandlerImplementation * Move `PopupExtensions` to `Views/Popup` * Rename `BasePopup` to `Popup` * Fix Typo * Update PopupExtensions.shared.cs * Update PopupExtensions.windows.cs * Reorder methods, Set default Color from `null` to `Colors.Transparant` * Update Namespaces * Update MauiPopup.windows.cs * Update src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupViewHandler.macios.cs Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> * Add missing `;` * Fixed popup issue for MacCatalyst * Improved the measurement calculation * Fixed samples * Added netstandard rules on csproj * moved non-platform code to a new file * code style * Update `ReturnResultPopup` Sample * Moved wrapper control to CommunityToolkit.Maui project * Removed WeakEventManager code * Windows work to support the Wrapper change * Fixed popup crash * Remove `*.netstandard.cs` file suffix The .NET MAUI Community Toolkit doesn't support .NET Standard; only .NET 6.0+ is supported. We will defer this to the Discussion #301: #301 * Remove Unused `MainGalleryViewModel` * Remove Duplicate `PopupAnchorViewModel` + `PopupPositionViewModel`, Consolidate Under `Add Views View Models` * Update `Add Extensions` Comment * Update `MauiPopup` Naming * Rename `BasePopup` to `Popup` * Convert `public class MockApplication` to `class MockApplication` to match `ApplicationHandlerStub` * Remove `netstandard` * Us DI to Inject `CsharpBindingPopupViewModel` * Update XML Comments for `LightDismiss` * Rename to `IPopup.OnLightDismissed()` to match `IPopup.OnClosed()` and `IPopup.OnOpened()` Since this is the method that runs _after_ a Light Dismiss has been triggered, it should use the `On*` naming and use the past-tense of `*Dismissed` to demonstrate that it is a reaction to an event that happened in the past * Rename to `WasLightDismissed` to denote that the action has already happened by using the past-tense * Fix OnLightDismissed for Windows * Fix `CommunityToolkit.Core` namespace -> `CommunityToolkit.Maui.Core` * Removed border and fixed double event subscription * added xmlns namespace for Views namespace * Changed the default color * Added layouts to xml schema * Consolidate Fields + Properties together * Consolidate Fields + Properties Together * Rename `PopupViewHandler` to `PopupHandler` * Replace Light Dismiss Nomenclature (#324) * Update `CommunityToolkit.Mvvm` NuGet Pacakge * Resolve Recommendation from @VladislavAntonyuk https://github.com/CommunityToolkit/Maui/pull/290/files#r817959288 Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description of Change
Hey @pictos! Here's the updates to the Popup Sample app that we chatted about. It implements Shell and Dependency Injection to be consistent with the existing samples.
Check it out and let me know what you think! I wanted to give you a chance to review the sample before pushing it to #290 in case you wanted to tweak anything 🙌