reactiveui/Sextant

feature: Add a RgPopup plugin for Sextant.XamForms

RLittlesII opened this issue · 10 comments

Is your feature request related to a problem? Please describe.

Sextant is a navigation library built for Xamarin.Forms. A few Xamarin.Forms projects I have used have had RgPopup implemented for use. Currently there is a separate navigation structure for the pop up pages.

Describe the solution you'd like

I would like to create a Sextant.RgPopup package that explicitly brings https://github.com/rotorgames/Rg.Plugins.Popup into Sextant and handles some of the boilerplate code to get it up and running.

Describe alternatives you've considered

The alternative I have is re implement this same package under my own name and use it. I have already done this for a few projects and would like a centralized standard place to keep this up to date.

Describe suggestions on how to achieve the feature

Wrap the provided IPopupNavigation in all the Sextant goodness.

Additional context
Other MVVM Frameworks that support XF have a plugin for this package for XF.

Prism RgPopup Plugin

Hey @RLittlesII 👋,

Thanks for backing our project. We will handle your issue with priority support. To make sure we don't forget how special you are, we added a priority label to your issue.

Thanks again for backing us 🎉!

I recently cleaned up and pushed RxUI.Plugins.Popup which extends the PopupPage with IViewFor.

Next step is to wrap the IPopupNavigation to make it work cleanly with Rg.Plugins.Popup.

I'm currently also working on an implementation for this within our own project. Not sure whether it's going to make the cut for the project-release, but at this point I have a fully observable IPopupViewStackService implementation that works the same as Sextant's view stack service (it re-uses much of the code), including view resolution. I'll discuss this within the team, as may be this code can be made available for inclusion into the project.

So I've been allowed to share my code here. Although I, unfortunately, do not have the time to merge this with Sextant's code itself. Or possibly better still (to not create unnecessary project dependencies), create a separate library for it, I thought sharing what I have here might be a good step towards making this a reality.

PopupViewStackService.zip

@AlexanderMelchers Thank you for the suggestion. I have rolled something like this myself in the past. I am not sure when I will be able to get to this feature. It's getting closer to the top of my list.

The way you approached it is similar to the way I have in the past. What I am thinking is to still have a single interface that can be injected, but it would implement the popup interface as well. That way there is only one stack service to inject that surfaces all my API concerns. This would probably be Forms specific.

Side Note: I would change all Observable.FromEventPattern to Observable.FromEvent there is a sizeable performance difference between them.

Hi @RLittlesII,

Does that mean that Sextant would support pop-ups without dependency on the Rg.Plugin.Popup? Because one of my concerns would be to create a hard dependency on this package, which for most cases would, of course, be superfluous to have in their app. Though I like the idea of a single view-stack, one of the reasons I did end up splitting the pop-up one off is that it has different dependencies. Now I know, of course, you could link out the package in cases where you're not actually using pop-ups. But there are cases where this is not possible (including debug builds). Also, it puts additional maintenance-load on a project, which I think might also be undesirable.

I actually came across you other plug-in as well, which is what inspired me to write the one posted here, since, from what I could tell, that one does not do any stack-management, which is something I did want for our implementation. Anyway, feel free to use it in any way you like. Just thought it be a shame to let it go entirely to waste.

Thanks for the tip on FromEvent versus FromEventPattern, by the way. Will keep an eye open for that ;)

@AlexanderMelchers

I would like to create a Sextant.RgPopup package that explicitly brings Rg.Plugins.Popup into Sextant and handles some of the boilerplate code to get it up and running.

ReactiveUI.Plugins.Popup was a bridge to get me closer to implementing this feature. I ran into an issue with namespacing on NuGet. It wasn't mean to do any stack management in Sextant, hence the ReactiveUI namespace. All of this is part of a large goal to make Sextant stand alone if possible in future releases.

I don't have proposed implementation details as this feature isn't actively being worked on. It is in my pipeline. I have some ReactiveUI work that is currently a bit more pressing than this, as it has a larger target audience.

You're welcome for the tip. I want everyone's code to be performant!

Cool! Unfortunately I can't say "looking forward to the result", as our current project has decided to go a different direction and I don't typically have the time for my own projects (especially not now with the pandemic), but I still think it'll be a great feature to have and something I can see myself using if ever I need to do something similar again.

Hello,

I have a question regarding the usage of Sextant.Plugin.Popup. Don’t know if this is the right place to ask though :). Whatever, I tried to find sample or documentation regarding the setup of the IPopupViewStackService and its usage. Do you have such information or tutorials ?

Thanks in advance !

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