Maui icon indicating copy to clipboard operation
Maui copied to clipboard

Added warning about the usage of the custom schema

Open pictos opened this issue 3 years ago • 9 comments

Description of Change

Added more info about the usage of the custom schema xmlns.

Linked Issues

  • Related to #427

PR Checklist

  • [ ] Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • [ ] Has tests (if omitted, state reason in description)
  • [ ] Has samples (if omitted, state reason in description)
  • [ ] Rebased on top of main at time of PR
  • [ ] Changes adhere to coding standard
  • [ ] Documentation created or updated: https://github.com/MicrosoftDocs/CommunityToolkit/pull/XYZ

Additional information

pictos avatar May 28 '22 00:05 pictos

Thanks @pictos I really like the idea! I would like us to provide some information around the differences between using a library and app project and give an example of how to overcome it, perhaps this should go in the NuGet read me file too.

I'm hoping to watch that video on the subject so I have a better understanding before I make some full suggestions though.

bijington avatar May 28 '22 16:05 bijington

@brminnick how do you feel about merging this and creating an issue to use an SG to fix the issue? If you go on our discord channel, you'll see some points that we need to test and make sure that SG will work as expected.

pictos avatar May 28 '22 20:05 pictos

@brminnick how do you feel about merging this and creating an issue to use an SG to fix the issue? If you go on our discord channel, you'll see some points that we need to test and make sure that SG will work as expected.

If we do merge I would like to reword it a bit to make it a little bit more helpful in guiding developers on how to workaround the issue.

bijington avatar May 28 '22 20:05 bijington

@bijington do you have something in mind already? If so feel free to push the changes to this PR

pictos avatar May 28 '22 20:05 pictos

@bijington do you have something in mind already? If so feel free to push the changes to this PR

Yeah I can happily provide something on this

bijington avatar May 28 '22 20:05 bijington

Sorry I should add my content to this! I'll try and do that this weekend

bijington avatar Jun 09 '22 19:06 bijington

.UseMauiCommunityToolkit() Analyzer added in #486

TheCodeTraveler avatar Jul 14 '22 22:07 TheCodeTraveler

@brminnick should we close this? Or still is good to have this in some "docs"?

pictos avatar Jul 14 '22 22:07 pictos

I'd like to add implement two more things to the code base before we close this:

  1. A CommunityToolkit.Maui.Init() method that a user can call from a class library
  • This provides a work-around for devs using the .NET MAUI Community Toolkit in a class library to "initialize" the Toolkit
  • The method wouldn't actually do anything (eg it wouldn't wire-up handlers), but it ensures that they have written C# code from CommunityToolkit.Maui and the custom schema will not fail
  1. An analyzer that verifies a developer has called CommunityToolkit.Maui.Init() in their class library
public static void Init()
{
  
}

Having this PR open is a good reminder that we still need to do it!

TheCodeTraveler avatar Jul 14 '22 22:07 TheCodeTraveler

Superseded by https://github.com/CommunityToolkit/Maui/pull/486

TheCodeTraveler avatar Jan 09 '23 03:01 TheCodeTraveler