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

Improve the "new experiment" experience #127

Closed
6 tasks done
mrlacey opened this issue May 20, 2022 · 4 comments · Fixed by #131
Closed
6 tasks done

Improve the "new experiment" experience #127

mrlacey opened this issue May 20, 2022 · 4 comments · Fixed by #131
Assignees
Labels
enhancement Improvement to an existing feature sample app 🖼 testing 🏗

Comments

@mrlacey
Copy link
Contributor

mrlacey commented May 20, 2022

As a result of creating a number of new experiments and copying over existing code from the toolkit, I propose the following changes:

  • Rename the template from "Community Toolkit Labs Project Template" to "Community Toolkit Labs Experiment"
  • Include a reference to the default sample namespace in the example test class.
  • Include more namespaces (including Windows./Microsoft. options) in the example test class.
  • Include something (a readme?) in the generated solution to explain the structure of the solution and where to start looking for things to change/edit.
  • Reference the new sample project in the test projects
  • Add InternalsVisibleTo references in the generated code to all test projects. The local ones and the "all" solution. This is because lots of the existing tests in the main toolkit rely on this approach and doing this is going to be simpler than setting rules about not using internals in experiments as these would need to be changed when promoting from labs.
@mrlacey mrlacey added this to the Initial Release milestone May 20, 2022
@mrlacey mrlacey self-assigned this May 20, 2022
@mrlacey mrlacey added enhancement Improvement to an existing feature testing 🏗 sample app 🖼 labels May 20, 2022
@michael-hawker
Copy link
Member

In #126 I've added the library project to be a reference in the test project. I think that covers your 5th bullet?

@mrlacey
Copy link
Contributor Author

mrlacey commented May 23, 2022

For reference, I have created the following related discussions in the dotnet/templating repo while investigating this issue.

tags.type: "project" vs "solution"

How to prevent a template appearing in Visual Studio?

@mrlacey
Copy link
Contributor Author

mrlacey commented May 23, 2022

Include something (a readme?) in the generated solution to explain the structure of the solution and where to start looking for things to change/edit.

Even if we included such a file, it's not possible to specify that the file should be opened by default when the solution is opened. (It would be if using the new project wizard in VS, but not when generating from the command line.)

Instead, I think it better to add more details to https://github.com/CommunityToolkit/Labs-Windows/blob/main/template/README.md

michael-hawker added a commit that referenced this issue Jun 7, 2022
* Test projects to reference the project with the experiment code

Duplicated change with #126

* Update the displayed template name

* Increase the namespaces referenced in the example test file

This list is based on what's most commonly used in existing toolkit tests.

* Make internal classes visible to all test projects

For #127

* set type to "solution"

as per dotnet/templating#4771

* Add more info about a created solution for a new experiment

For #127

* Don't include the labexp template in VS

it doesn't work there

* Update template/README.md

Co-authored-by: Arlo <arlo.godfrey@outlook.com>

* Update template/README.md

Co-authored-by: Arlo <arlo.godfrey@outlook.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Revert "Test projects to reference the project with the experiment code"

This reverts commit 5dccf8a.

* Update example test

to reference the code being developed
& to use a naming convention better matched to the wider toolkit convention

* increase the number of namespaces included by default in the generated code

This is to reduce the effort required to begin work on an experiment.

* add placeholders and TODO notes for including links to relevant discussion & issue

* update new experiment doc to reflect changes in solution structure

Co-authored-by: Arlo <arlo.godfrey@outlook.com>
Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
@mrlacey
Copy link
Contributor Author

mrlacey commented Jun 7, 2022

See also microsoft/microsoft-ui-xaml#7206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature sample app 🖼 testing 🏗
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants