Skip to content

Implement Shell and Dependency Injection for Popup Sample App#303

Merged
pictos merged 10 commits intopj/popup-to-handlerfrom
Implement-Shell-and-Dependency-Injcetion-for-Popup-Sample-App
Feb 18, 2022
Merged

Implement Shell and Dependency Injection for Popup Sample App#303
pictos merged 10 commits intopj/popup-to-handlerfrom
Implement-Shell-and-Dependency-Injcetion-for-Popup-Sample-App

Conversation

@TheCodeTraveler
Copy link
Copy Markdown
Collaborator

@TheCodeTraveler TheCodeTraveler commented Feb 17, 2022

Note: This PR merges to pj/popup-to-handler (aka PR #290), not main

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 🙌

@pictos pictos merged commit a8517b6 into pj/popup-to-handler Feb 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the Implement-Shell-and-Dependency-Injcetion-for-Popup-Sample-App branch February 18, 2022 02:48
@pictos
Copy link
Copy Markdown
Member

pictos commented Feb 18, 2022

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>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2024
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.

2 participants