-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add template for creating new experiments #76
Conversation
How I'm (manually) testing this: Generate a new project also called
Also
Then, generate another new experiment but with a different name and compare it with the previously generated CanvasLayout version and confirm the only differences are:
Adding automated testing for this isn't going to be easy and is unlikely to be useful in the long term. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, @Arlodotexe any feedback?
template/samples/ProjectTemplate.Sample/ProjectTemplate.Sample.csproj
Outdated
Show resolved
Hide resolved
template/samples/ProjectTemplate.Uwp/Properties/AssemblyInfo.cs
Outdated
Show resolved
Hide resolved
[ToolkitSample(id: nameof(SamplePage), "Simple Options", ToolkitSampleCategory.Controls, ToolkitSampleSubcategory.Layout, description: "A sample page for showing how to do simple options.")] | ||
public sealed partial class SamplePage : Page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the ProjectTemplateSamplePage
here? That gets auto-replaced right? Would be easier to accidentally prevent multiple experiments having a SamplePage
and leading to confusion later?
Or do we want to do like ProjectTemplateFirstSamplePage
? And rename the namespace ProjectTemplate.Sample.FirstSample
and folder to FirstSample
to be consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would leave use with a lot of different experiments all creating files in a PT.S.FirstSample
namespace which might look weird when they're put together ina a collective sample.
Do different sample pages have to be in separate directories? Do they need to be in directories at all--can't they just be in teh root of this project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just leave them in the root of the project without having folders for each. Or we don't have to create separate namespaces. The ToolkitSample
attribute is going to expect that the id: nameof(SamplePage)
is unique across all samples, so we don't want to have this be generically named and introduce the possibility of collisions.
….csproj Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
…lkit/Labs-Windows into mrlacey/labtemplate
Since the template project should be its own stand-alone project. It should be buildable on its own still, eh? If so, in this PR, we should swap out our 'experiment' job in the CI YAML to build the template solution here as well. That should help us ensure that we don't break things if we change the template or the props files, right? Or maybe we can invoke the template command itself to create a dummy experiment in that job and try and build that? Maybe that'd be a better "integration" type test for the templates? Thoughts? |
Good idea
I'm not sure how (or if) this would be done but it's a nice idea. |
I'm thinking we can just add the two Labs-Windows/.github/workflows/build.yml Lines 200 to 203 in c7db198
And then we'd just build it with that known path/name instead of CanvasLayout one here. I think that should be pretty simple. |
so that relative paths are the right depths
generated experiments do get a release build so not losing anything here, (hopefully) just making the CI build faster
I have moved this out of draft as I think it's ready. |
Hey @mrlacey, adding a second experiment uncovered an important issue with the sample and documentation registry systems and @michael-hawker asked me to investigate and fix. I'm getting things back in order - will be finished soon! |
This is the issue I've been wanting there to me multiple experiments for. |
… generator from other assemblies
All finished here, we should have no problems with multiple experiments now. |
Rest of the code looks good from my end, just waiting on @michael-hawker to give the OK 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I created #102 using this initially, so worked well. Will merge this and then test @Arlodotexe's fixes rebasing #102 and seeing how it works out.
…labtemplate Add template for creating new experiments
Draft only - for tracking progress
For #4 (Template Infrastructure)
Still to do:
current issues: