AndreiMisiukevich / CardView

CardsView | CarouselView | CoverflowView | CubeView for Xamarin.Forms
MIT License
710 stars 114 forks source link

Support for .NET Maui #399

Closed DoubleDBE closed 1 year ago

DoubleDBE commented 2 years ago

Will this library be ported to .NET Maui?

AndreiMisiukevich commented 2 years ago

@DoubleDBE I think, Yes.

AndreiMisiukevich commented 2 years ago

@DoubleDBE do you want to volunteer on this?

peter-mghendi commented 2 years ago

@AndreiMisiukevich what would need to be done?

DoubleDBE commented 2 years ago

Maui has an option for XF compatibility which can be used to gradually port XF libraries to maui with minimal changes.

I think that's the best option for now because documentation for maui is very slim at the moment, and things can still change due to the fact that it's still in development.

@AndreiMisiukevich @sixpeteunder What are your opinions?

peter-mghendi commented 2 years ago

@DoubleDBE I'm willing to help. It would be my first contribution of this kind but I think with some help can get it done.

Not a professional opinion, but I think MAUI is nearing RC so things might stabilize soon.

ederbond commented 2 years ago

MAUI is currently on RC2 and very close to GA (My personal guess is that they will announce GA on Build Conference this year). Do you guys have any clue of when and "if" this will be ported to MAUI?

AndreiMisiukevich commented 2 years ago

@ederbond I believe you will be able to use all Xamarin packages in your MAUI application by adding the XamarinCompat package.

Or am I missing something?

ederbond commented 2 years ago

According to the MAUI team there will be some required changes on the package itself to make it compatible with the "Compatibilty Mode" of dotnet MAUI https://twitter.com/ederbond/status/1522630420101218304?s=20&t=1M4IXZNaYjTCWENj9YJQow

image
developer9969 commented 2 years ago

Hi Big fan of this nuget - is there any chance of this being moved to Maui? Is it on the cards on no at all. It would be nice to know so that we can plan accordingly.

Again @AndreiMisiukevich thank you for this control .

AndreiMisiukevich commented 2 years ago

@developer9969 hi :) and thanks for your support, I appreciate it. I want to be honest with you, currently I don't have time for that and I'm not sure that it will have it in near future :(

AndreiMisiukevich commented 2 years ago

@developer9969 maybe you want to help with porting it to maui? at least as "compat" package?

developer9969 commented 2 years ago

@AndreiMisiukevich I will have a look - but I am getting familiar with the all handlers etcs way of doing things..

maexsp commented 2 years ago

@AndreiMisiukevich @developer9969 hi :) i started with some investigations and found out the compatibility mode seems not to work (InvalidCastException) as long as the custom control does derive from AbsoluteLayout. Exact this is done in CardsView. I filed a issue to the MAUI team: https://github.com/dotnet/maui/issues/9936

As an alternative I tryed to use the handlers approach and same issue there. As long as the CardsView derives from AbsoluteLayout a InvalidCastException is thrown. Only to derive from ContentView or View/IView solves the problem but those types cannot have multiple children.

Also the _hasRenderer needs to be removed cause MAUI does not throw anymore "Renderer" NotifyPropertyChanges.

On my current solution Items are rendered again but the renderer I needed to remove for now and so swipe/touch/fling is not working right now.

xleon commented 1 year ago

Our app is based heavily on this library and we are thinking about migrating to MAUI. When the moment comes I will need this library migrated so if nobody does it before then I'll do it. I don't think the compatibility hack will be enough. However I wanted to ask you in case I consider making a PR in the future: how would you organise folders and code in this solution to keep both XF and MAUI separated? I guess we'll have to check how other library authors are keeping XF compatibility but any hints would be much appreciated.

AndreiMisiukevich commented 1 year ago

@xleon thanks for your feedback and for your readiness to help!

I think it should be completely separate github project. I can create it

xleon commented 1 year ago

Nice. First I wanted to play around an hypothetical migration. I'm pretty new to MAUI and it has more changes in Layouts that I expected. For instance I'm currently investigating how to solve this issue https://github.com/xleon/CardView.MAUI/blob/main/PanCardView/CardsView.cs#L822

AndreiMisiukevich commented 1 year ago

@xleon probaby you can ignore that. It was added as workaround as far as I remember

naweed commented 1 year ago

Hi @AndreiMisiukevich, Any idea when we can expect Maui port of this great library? We are all deeply missing this wonderful package for our Maui apps.

AndreiMisiukevich commented 1 year ago

Hello @naweed thanks for your warm words. But unfortunately I don't think I have time for this :(

FreakyAli commented 1 year ago

@AndreiMisiukevich I love your work here, I really wish this was ported to Maui :(

AndreiMisiukevich commented 1 year ago

@FreakyAli thanks dude

Here we go https://github.com/AndreiMisiukevich/CardView.MAUI

The quality is not as good as you might expect though :(

FreakyAli commented 1 year ago

@AndreiMisiukevich Awesome i will check it out later, Also why do you say the quality might not be as I expect?

AndreiMisiukevich commented 1 year ago

@AndreiMisiukevich Awesome i will check it out later, Also why do you say the quality might not be as I expect?

Because Maui is still raw :( and for example CubeView is broken, also I had to disable IsClippedToBounds for carousel view because of some weird bug. Overall it works but not as good as XF version

FreakyAli commented 1 year ago

@AndreiMisiukevich Yeah I can relate to this, I had some existing controls that I created in XF and then moved to MAUI quite recently and many of them broke, Properties didn't work anymore & other such issues. In any case, I will check it out hopefully bugs will get solved. You can check out my controls if you're interested by the way, Nothing fancy but still decent API extensions in my opinion : https://github.com/FreakyAli/Maui.FreakyControls

AndreiMisiukevich commented 1 year ago

@FreakyAli thanks!

IeuanWalker commented 1 year ago

@FreakyAli lol same experience for me too, still working through my NuGet's but every single one has something that used to work but now has some sort of bug that I have to spend hours researching to find a way around it.

FreakyAli commented 1 year ago

@FreakyAli lol same experience for me too, still working through my NuGet's but every single one has something that used to work but now has some sort of bug that I have to spend hours researching to find a way around it.

I have my fingers crossed that the Maui team will fix them eventually, Anyway as far as I see as of right now. Maui is not stable enough for production apps. (Just my humble opinion.)

AndreiMisiukevich commented 1 year ago

@FreakyAli I absolutely agree with this statement