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

Cleans up the blank starter template #26448

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dotMorten
Copy link
Contributor

@dotMorten dotMorten commented Dec 6, 2024

Description of Change

Issue: #26484

Removes resources and XAML that are always going to be deleted. The "Include Sample Content" will instead be the way to get starting content beyond a blank project.
The problem with the current "blank" template is that it adds a lot of content that you always have to delete, adding extra steps. It also removes the dotnet_bot.png that most of us always forget to delete, since no app will actually include it in the end.
This ensures that users are set up to start working without first having to clean up sample content.

If the user does want sample content / a tutorial, they can check the new "Include Sample Content" checkbox that was introduced in 9.0 and still get sample code as a starting point.

As a side benefit, the sample-content version was never actually referencing the dotnet_bot.png file, so it was just wasteful content that is now also cleaned up with this PR.

It also creates consistency with existing WPF template, as well as the work that is currently happening in the WinUI project template.

Tested by manually building the templates projects and installing it from commandline. Tested both via CLI and VS

Fixes #26484

Removes resources and XAML that are always going to be deleted. The "Include Sample Content" will instead be the way to get starting content beyond blank.
@dotMorten dotMorten requested a review from a team as a code owner December 6, 2024 22:52
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 6, 2024
Copy link
Contributor

Hey there @dotMorten! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotMorten
Copy link
Contributor Author

@jfversluis As discussed ;-)

@PureWeen
Copy link
Member

PureWeen commented Dec 7, 2024

Any version of this would have to wait until .NET 10

@rmarinho
Copy link
Member

rmarinho commented Dec 7, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Redth
Copy link
Member

Redth commented Dec 9, 2024

I don't believe there's enough signal to make such a change yet.

What I could see doing is adding this as another parameter option to the template (eg: --empty) and pivoting the template to remove some things or change some things depending on if this is set or not.

If we did this, one of the items we need to still look at is if we can make pivoting on those template parameters more simple. It seems like other templates basically pivot the entire template based on a parameter which keeps things neatly separated, vs right now we have a bunch of #ifdef type logic in one giant template.

In either case we'd also need to make sure the behaviour works correctly if you try to use --sample-content and --empty together? ie: is there a way to declare parameters that are mutually exclusive?

In any case, this is not a change we're prepared to make in this current form, though the discussion is appreciated. Is there an existing issue or discussion in our repo we can link this to? I'd prefer to see these discussions happen before you spend your time on creating a PR that we might not merge :)

@jfversluis jfversluis added the area-templates Project templates, Item Templates for Blazor and MAUI label Dec 9, 2024
@dotMorten
Copy link
Contributor Author

@Redth Issue: #26484

@jfversluis jfversluis marked this pull request as draft December 12, 2024 14:56
@jfversluis
Copy link
Member

Converting to draft for the time being while we discuss a bit first, see linked issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-templates Project templates, Item Templates for Blazor and MAUI community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify the starter template
5 participants