Conversation
…ded demo code to sample.
…ed basic unit tests. Misc fixes and improvements.
michael-hawker
left a comment
There was a problem hiding this comment.
Haven't dug into the sample display and the markdown renderer stuff yet, but had some initial feedback on the attribute syntax/usage and stuff from the source generator side. Let me know your thoughts and if we can simplify any of those things or not. Also is this just working on UWP or also on WinUI 3/WASM?
Common/CommunityToolkit.Labs.Core.SourceGenerators/Attributes/ToolkitSampleAttribute.cs
Show resolved
Hide resolved
Common/CommunityToolkit.Labs.Core.SourceGenerators/GeneratorExtensions.cs
Show resolved
Hide resolved
Common/CommunityToolkit.Labs.Core.SourceGenerators/Metadata/IToolkitSampleOptionViewModel.cs
Outdated
Show resolved
Hide resolved
Labs/CanvasLayout/samples/CanvasLayout.Sample/SampleOne/SamplePage.xaml.cs
Show resolved
Hide resolved
Labs/CanvasLayout/samples/CanvasLayout.Sample/SampleTwo/SamplePageOptions.xaml.cs
Show resolved
Hide resolved
Labs/CanvasLayout/samples/CanvasLayout.Sample/SampleTwo/SamplePageOptions.xaml.cs
Show resolved
Hide resolved
Labs/CanvasLayout/samples/CanvasLayout.Sample/SampleTwo/SamplePageOptions.xaml
Show resolved
Hide resolved
...Toolkit.Labs.Core.SourceGenerators.XamlNamedPropertyRelay/XamlNamedPropertyRelayGenerator.cs
Show resolved
Hide resolved
This should be working on all 3 heads. |
|
@Arlodotexe looking good! Had to clean my local environment to get the WASM head to run. Only thing is that the XAML/C# display wasn't working there: I didn't notice any obvious errors or exceptions outputted... UWP and WinUI 3 heads worked great though! |
Common/CommunityToolkit.Labs.Core.SourceGenerators/ToolkitSampleOptionGenerator.cs
Show resolved
Hide resolved
michael-hawker
left a comment
There was a problem hiding this comment.
Looks great, just need to understand the WASM C#/XAML display issue, and we'll be good! 🎉🚀
|
For the inconsistent behavior between UWP/WASDK and Uno, I've filed an issue here: unoplatform/uno#8266 |
…options-and-viewable-source Sample options and viewable source

This PR makes progress towards a more cohesive sample system by adding the infrastructure for sample options and viewing source code.
Overview:
x:Nameproperties from outside of a control.CommunityToolkit.Labs.Core.SourceGenerators.XamlNamedPropertyRelay. Separate as not all projects need this generator.CommunityToolkit.Labs.CoretoCommunityToolkit.Labs.Core.SourceGenerators, since it only contains generators and models that use them.CommunityToolkit.Labs.Core.SourceGenerators, to ensure diagnostics are outputted correctly.Demo:
Recordedvideo2022-02-07-191730-1.mp4