Skip to content
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

Template Infrastructure #4

Closed
michael-hawker opened this issue Dec 6, 2021 · 11 comments
Closed

Template Infrastructure #4

michael-hawker opened this issue Dec 6, 2021 · 11 comments
Assignees

Comments

@michael-hawker
Copy link
Member

michael-hawker commented Dec 6, 2021

Define the basic structure of a Labs Project and produce a template so it can be easily copied and distributed.

Labs project requirements

We expect the following of resources from Labs project contributions:

  1. Library source code
  2. Sample app with various scenarios
  3. Unit Tests
  4. UI Tests
  5. Documentation

Guidance and tips

In addition to the baseline project structure, we also want to jump-start developers who use the template. The template should include additional resources such as:

  • Guidance for installing the template
    • How to: Generate a copy of the template (put in repo readme)
  • Readme document in generated template to explain:
    • What are the parts?
    • How to: Add library code
    • How to: Run the samples
    • How to: Add new samples
    • How to: Run the unit tests
    • How to: Setup WinAppDriver to run UI tests
    • How to: Add documentation
    • How to: Submit Labs project to repo
  • Working examples and helpful comments in all areas of the project (samples, tests, docs, etc.)

Template generation

To distribute the template, use the dotnet new CLI and add the configuration to the repo.

VSIX was a suggested alternative, but it doesn't support more than one project at a time. We need to be able to generate multiple projects at once.

Open questions

  • Can we include WinAppDriver via a dev dependency NuGet or something and have a pre-build that spawns it automatically to run the UI Tests?
@Arlodotexe
Copy link
Member

The template infrastructure will need to be able to add a reference to the new sample in the uber-sample uwp/wasm heads automatically when the project is created.

@shweaver-MSFT
Copy link
Member

@michael-hawker @Arlodotexe what do you think about merging in the template before we apply the uno changes? I think this might be a nice checkpoint to settle on the basic template contents and then layer then uno requirements on top.

It's in a good working state, so I'm hoping the tests and template generation to continue to work after we apply the uno upgrade.

@michael-hawker
Copy link
Member Author

@shweaver-MSFT part of that is in main already #11, can you see what conflicts you see if you rebase? The other PR #12 Arlo has open is about sample loading for us to handle multiple samples which is relatively isolated still.

@shweaver-MSFT
Copy link
Member

shweaver-MSFT commented Dec 9, 2021

part of that is in main already #11

@michael-hawker, what part do you mean? Not the template... do you mean the extra uno requirements? I'm not expecting any conflicts, because all of my work is in the Template folder so far.

I see some good structure from #11 in the CanvasLayout sample. But I'm hesitant to adopt any uno patterns until we've figured out the mechanism to support the uber sample, which #12 seems to be focused on.

I can focus on getting the UI tests working from CI, while you guys handle the uber sample mechanism. Sound good?

@michael-hawker
Copy link
Member Author

Yeah, sounds good @shweaver-MSFT! I'll take a look at the template PR in more depth and give it a spin locally. Will let you know if I run into any issues. Thanks!

@shweaver-MSFT
Copy link
Member

I went through the exercise of porting the UITest projects over from the main toolkit, and I'm not convinced it's the right thing to do. Just because it adds so much extra to the template. We go from one UI test project to four just for the sake of working in the CI. I fear it'll create a ton of duplicated boilerplate test code across the repo, and it's not as dev friendly.

Perhaps we can work it into the uber sample somehow...

@Arlodotexe
Copy link
Member

Arlodotexe commented Feb 10, 2022

Considerations

Random bits discovered while fleshing out the sample system that should be taken into consideration for the template system.
Will be updated over time, until we're ready to complete the template infrastructure.

Project template.

  • When a new sample project is created, it should be added to
    • Codespace launch config file. See here
    • Multi-sample solution
    • Each deployable multi-sample project head

Sample page template

  • Initial sample ID should be unique, scoped to class/namespace. See here

@mrlacey
Copy link
Contributor

mrlacey commented Mar 16, 2022

VSIX was a suggested alternative, but it doesn't support more than one project at a time. We need to be able to generate multiple projects at once.

Not true ;)
But I get I'm late to this discussion and a VSIX has other limitations that might not be appropriate

@michael-hawker
Copy link
Member Author

Thanks for that info @mrlacey, FYI #9 shows the prototype we had with dotnet new template (which seems to work pretty well) and some initial testing infrastructure setup examples (though based off before we finalized our current structure for the sample app itself and how it works).

@mrlacey
Copy link
Contributor

mrlacey commented Apr 14, 2022

A new PR for this is now at #76 as the solution structure and requirements have evolved since #9 was worked on.

The biggest changes in the requirements for this are:

  • No need to directly integrate the generated experiments with other (All) solutions.
  • The inclusion of UI tests has been deferred (until we have confidence in a good multi-targeted solution)

@mrlacey
Copy link
Contributor

mrlacey commented May 10, 2022

closed by #76

@mrlacey mrlacey closed this as completed May 10, 2022
Arlodotexe pushed a commit that referenced this issue Dec 8, 2022
The newer packages have emsdk 3.1.12 builds, which are compatible with
Uno.Wasm.Bootstrap 7.x.

Fixes #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants