-
Notifications
You must be signed in to change notification settings - Fork 336
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
MAUI support timeline #684
Comments
Hey @jeremy-bridges i have recently been thinking about this, and how to go about doing it. I definitely plan on giving it an attempt, my concerns is our custom renderers we use on each platform, as apart from Android/iOS i am at a loss for other platforms. |
Would also love it if we get MAUI support. Rg is currently solving a pretty niche problem we have in our project and we are planning to move over to MAUI as soon as it drops. |
+1 on this. I tried using pop-up from community toolkit, but it lacks animations and has some bugs. Would be great to see this NuGet migrated to MAUI. I only need Android implementation, so if you could do first pre release with just Android (or Android & iOS) that would be great. |
All custom renderers and other Xamarin.Forms stuff should still work in MAUI through some compatibility namespace. Similar to how they'd created Xamarin.CommunityToolkit.MauiCompat |
I recently started doing work on this on Windows Visual studio, using the compatibility tools and whatnot. Almost got a working prototype for Android, however, I was having issues with deployment and just generally not understanding the windows version. I will be able to complete this once they have a working version of MAUI for Mac VS, or at least something workable. we definitely will try an Android/iOS version first, moving forward from there. |
Not sure if it's still gonna help, but I found an article detailing how to perform the migration: https://www.syncfusion.com/blogs/post/how-to-reuse-xamarin-forms-custom-renderers-in-net-maui.aspx |
@LuckyDucko let me know what we can do to help you out. [email protected] @Redth |
@maxkoshevoi & others I've made my first prototype thrown up on the new Maui-Compatibility branch. I have not gone through what is mentioned on that sync fusion post exactly, just bashed around until popups started appearing. There still seems to be some weird issues which I'm sure are my own fault. Currently its only Android. Also, would love some help from people remaking the xaml pages to be 'maui compatible' so then we can determine what's actually wrong with my changes. @davidortinau the shock/surprise of you dropping into this thread kicked me into gear, so thank you for that. I think the best help would be the ongoing changes to the what MAUI Xaml is, as right now it has me spinning (Why does everything suddenly need .Content? im sure there is a good reason.) |
<UseMaui>true</UseMaui><!-- To add MAUI packages -->
<SingleProject>true</SingleProject><!-- To support using code for different platforms in Platforms folder -->
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling><!-- To use Windows code in single project (https://docs.microsoft.com/ru-ru/windows/apps/windows-app-sdk/single-project-msix) --> Also add this to enable implicit usings:
|
@maxkoshevoi I have only targeted net6.0-android on purpose, due to your comment
The rest will also be done, but it seems a good move to focus on one platform at a time. i have kept the MAUI work exclusively within So people are able to compare old v new in this 'transition' period There is also sampleMaui folder that will eventually replace Samples. Within this Maui area,
ImplicitUsings i will add in. |
My bad, I didn't notice I've looked at the Everything builds, but Sample crashes with Do you also have this behavior? I'm using VS2022 Preview 4.1. |
Are you using Rider to auto suggest these fixes (concerning nullable and whatnot) Keep 'em coming, there is some cobwebs in this code (looking at you Task.SetResult) that need to be cleared out. Hmm, i have not gotten that error yet, using VS2022 Preview as well. Let me download your branch and see whats up. I just tested your code, and it deploys just fine on my Test Device (Samsung A20). Are you using emulators? |
Hmmm, i am using that version of VS preview, and 1.1608 as far as i'm aware. |
Tried it on physical Pixel 4 (Android 12 Beta 5). Same crash. Maybe my VS is broken. |
Have you fixed the public class UintTypeConverter : TypeConverter
{
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
{
try
{
return Convert.ToUInt32(value);
}
catch (Exception)
{
throw new InvalidOperationException($"Cannot convert {value} into {typeof(uint)}");
}
}
} also, you have to change public class EasingTypeConverter : TypeConverter
{
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
{
if (value != null)
{
var fieldInfo = typeof(Easing).GetRuntimeFields()?.FirstOrDefault(fi =>
{
if (fi.IsStatic)
return fi.Name == value.ToString();
return false;
});
if (fieldInfo != null)
{
var fieldValue = fieldInfo.GetValue(null);
if (fieldValue != null)
return (Easing)fieldValue;
}
}
throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Easing)}");
}
} |
@yunusefendi52 Good catch! I thought it was a built-in converter. Updated convertors do work.
if (fieldInfo != null)
return (Easing?)fieldInfo.GetValue(null);
@LuckyDucko I was able to launch the Sample, thanks to new converters, and now there's another issue. Popups are not closing when I click outside of them. Back button also doesn't do anything. Only clicking on "Close" button on popup itself closes the popup. |
Sure @maxkoshevoi, don't know why I changed |
I think you should set up that manually in MainActivity https://github.com/rotorgames/Rg.Plugins.Popup/wiki/Getting-started#android-back-button |
Thanks, forgot about that. Good thing is that there's now new "Maui way" of doing this via @LuckyDucko Here's more detailed explanation of the current issue:
|
@maxkoshevoi good call on the MAUI way idea, i originally had it set up manually in mainactivity, but if there is the MAUI way, we should implement that. @yunusefendi52 thanks for fixing the converter issue. Its strange to me that i was able to compile and launch without it. But its sorted now. so thats good 👍🏻 The LoginPopupPage i also was having strange issues, i have definitely noticed the issue you mentioning. |
I fixed the situation concerning the LoginPopupPage, i believe it was relating to the use of MainThread. I was making adjustments and wasnt expecting it to work. However, when i made the popuppage renderer available for Maui, it stopped appearing properly. So i commented that out for now, but would be a good next step |
@LuckyDucko Now all popups not close on back button 😄 You need to remove But after fixing that, there're new issues.
|
@maxkoshevoi oh my bad, i thought i fully removed it! Fixed The LoginPopupPage issue you mentioned is because it is a stored Popup Page i changed it to work like the other pages, and it works fine. I imagine most use cases are similar to that. I came across this issue as well, and thought i fixed it. Perhaps i didn't commit my latest changes, made a mistake while reverting other work. The closing animation situation is new. I have messed around with other animation work, so i will look into that. The shadow on the right is the scrollbar for a scrollview, it is badly centered. (Also need to set up my gpg key for windows, i usually do my work on mac, need to stop added unverified commits) |
Quick update I'm still working through this. So, had to scrap all that work, however, still i struggled to get the actual renderer to work, once enabled it kept just not appearing, and i'm unsure if its a renderer issue, a change in how Maui works concerning our xaml pages, or a mix! So, my latest idea, is i am recreating the pages in the new CSharp Markup, to take advantage of its autocomplete and also in the hope that this repo will be an example of the same thing made many different ways (XAML/CSharpMarkup/MVU/Blazor?) I plan on taking charge on atleast the beginnings of each of these remakes, which will either be in their own solutions, namespaces, or with extra names (LoginPageXaml/LoginPageCsharpMarkup/LoginPageMVU). Also, the badly centered scrollbar was a Xaml issue i believe once Android is at a minimal viable product, i can start organising the project in terms of what needs to be done, and we can continue to move from there |
@martijn00 Why is this closed? Latest NuGet release still doesn't support any of |
@maxkoshevoi i believe @martijn00 has made a mistake here I apologise for the loooong hiatus concerning this, i want to get back onto it. The maui release will definitely have breaking changes |
Any updates? As Maui is going to be release soon enough? |
@scarrier92 I am going to continue development on the Maui version of this release separately in a new repo, due to the breaking changes. I am having some issues however, I do hope to push through with them and have some form of a release i had an android version working, however, it seems to have stopped, so guess ill be back on that now |
https://github.com/AswinPG/RGPopup |
@AswinPG absolute legend! I was stuck on something going pear shaped with Android, i am going to look at the changes you have made and see it work back to my own, as i'm trying to upgrade the codebase as i'm going, which i'm pretty sure is where i've come unstuck. |
And we are off (Android only, and its pre-release so make sure you set that for your searching in Nuget) Went through Aswin's code and figured out the changes that needed to be made, iOS is next on the list, but let me know what Android issues you have. I plan on integrating awaitable tasks baked in to popups (not in the way awaitablepopups does it however, as that requires alot of extra that I dont think people want) https://github.com/LuckyDucko/Mopups |
We now have iOS working and available, Next on the list is UWP , since I know that many Rg users use UWP. Lets hope I can sift through it ;) |
Is there a nuget that works on ios and android ? |
What's the time estimate for this to be fully supported for Windows and macOS as well? |
@LuckyDucko Can you please provide us with timeframe when this is going to be available for WinUI and macOS? Rg.Plugin.Popup is used all over our code for Xamarin and we are moving to MAUI and this is critical to our work, so I would really appreciate a feedback on my question please. |
In the Mopups Repo, we have a PR for basic MacOS availability. I cannot provide timeframes as i am only 1 person (with the help of some dedicated individuals), and i have been getting the grips on .Net Web Development. The next goals however are MacOS and Windows. Thats for sure. I'll give it a dedicated try over this weekend, and see if i can get Windows working. Disclaimer i have never once built/used a Windows Application so its going to be another learning experience |
@LuckyDucko Thank you very much for the feedback and for your hard work working on this project, looking forward for it to complete and supports Windows and MacCatalyst. |
Any more word on this at all would be nice to have it soon rc1 is in a few weeks. |
Hello guys, For people who just need simple popup without animation etc.. You can push ContentPage with "transparent" background. BackgroundColor = Color.FromArgb("#01010101"); Push like this await Application.Current.MainPage.Navigation.PushModalAsync(page); Pop like this (unfortunatly you can not remove a specific page, only the last one) await Application.Current.MainPage.Navigation.PopModalAsync(); Okay It lacks of many things, but it's a workaround for thoose really stuck and need just basics. but it's a simple modal page with a transparent background, you can do whatever layout on it (Center the content on the middle of the modal page, or animate the content your self when OnAppearing, easy). It works on Mac, iOS, Android, Windows, without handlers or renderers. |
To be clear to everyone, MAUI development is done on the Mopups Repo, not on this repo. We currently have iOS and Android support. Mopups is Rg.popups, with some changes and new direction |
@LuckyDucko Did you have the chance last weekend to check the support for Windows for the project? |
I did, and i am sorry to say that unless someone else is able to make some strides in it, i don't think i am going to make much headway. I was having difficulty even at the get go trying to set it up with WinUI. If someone is able to create a project in MAUI with all the environment setup, i might be able to port it over. |
The only issue with my workaround is that we can not remove a specific page. I open an issue on MAUI repo below. Yeah we need to get rid of it! |
💬 Questions and Help
I'm curious if contributors are going to move to support MAUI. Ideally, I'd love to test out this new platform while it is in beta. Ideally, pre-release packages of Rg.Plugins.Popup would facilitate this testing. Thanks for considering it.
The text was updated successfully, but these errors were encountered: