Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[NET10] Switch to public MAUI types for AvatarView

Open jfversluis opened this issue 10 months ago • 6 comments

For .NET 10 the InternalsVisibleTo has been removed for the .NET MAUI Community Toolkit (see here). I have made the types that we used for AvatarView public, so we need to switch to using those.

The rest of the types we are using will be removed with the Popup v2 PR and the last one can be removed with the alternative AppThemeResource implementation in #2639.

jfversluis avatar Apr 30 '25 13:04 jfversluis

Thanks Gerald! Have you confirmed this for CommunityToolkit.Maui.Markup as well?

TheCodeTraveler avatar Apr 30 '25 21:04 TheCodeTraveler

For .NET 10 the InternalsVisibleTo has been removed for the .NET MAUI Community Toolkit (see here). I have made the types that we used for AvatarView public, so we need to switch to using those.

The rest of the types we are using will be removed with the Popup v2 PR and the last one can be removed with the alternative AppThemeResource implementation in #2639.

Can you point me in the direction of what to look at for AvatarView, as I'd like to understand it and if I can, make the appropriate changes. As I was the one who implement the MAUI version of AvatarView.

GeorgeLeithead avatar May 01 '25 19:05 GeorgeLeithead

I note that it's been reverted? #29321

GeorgeLeithead avatar May 09 '25 15:05 GeorgeLeithead

@GeorgeLeithead is reverted because we didn't make changes here, so if anyone tries MCT + .NET MAUI 10 it will break

pictos avatar May 10 '25 02:05 pictos

Haha yeah, slip up on my side. I didn't think this through enough. The change was fine, but our tests started failing because the Toolkit side didn't make the necessary changes yet.

I've discussed it a bit more, and removing the InternalsVisibleTo is not a breaking change. So what I'll do is create a new PR that makes the necessary types public, the Toolkit can do the transition when we want, probably close to .NET 10 GA, and then I will remove the InternalsVisibleTo for a .NET 10 service release. That way tests will stay happy, we have a transition path and we still don't need to wait another full year to tidy this up :)

jfversluis avatar May 12 '25 11:05 jfversluis

Here is the first PR: https://github.com/dotnet/maui/pull/29443

These should be the types that we will need to start using!

Created an issue for the actual removal of InternalsVisibleTo here: https://github.com/dotnet/maui/issues/29444

jfversluis avatar May 12 '25 11:05 jfversluis