dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.26k stars 9.96k forks source link

Add new Blazor Empty Website project templates with a blank homepage and default theme. #47157

Open thabaum opened 1 year ago

thabaum commented 1 year ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

When creating a new Blazor project, the current Empty templates do not include simple layout and page files for a blank homepage to start a web project. Meanwhile, the default "Blazor Server" and "Blazor WebAssembly" projects have example components, which may not be needed in some scenarios.

Describe the solution you'd like

It would be helpful to have two new templates: Blazor Server Empty Website and Blazor WebAssembly Empty Website, with the following features:

This way, users could choose the appropriate template for their needs and start with a blank slate that includes only the necessary files to get started with a new project and the default Blazor theme.

Additional context

summary that includes all the files and file locations discussed and removes any steps that are not necessary:

  1. Open Visual Studio and create a new Blazor WebAssembly or Blazor Server project.
  2. Once the project is created, navigate to the Pages folder and delete the Counter.razor and WeatherForecastService.cs files. This will remove the counter and weather example files.
  3. In the Shared folder, open the NavMenu.razor file and remove the code for the Counter and Weather links, as well as the SurveyPrompt component.
  4. In the App.razor file, remove the routing configuration for the Counter and Weather components, as well as the SurveyPrompt component.
  5. Navigate to the Pages folder and delete the SurveyPrompt.razor file.
  6. Open the Index.razor file in the Pages folder and remove any unnecessary code, keeping only the "Welcome to Index.razor" message.
  7. Clean up files related in Shared project folder.
  8. You can customize the page to suit your needs and start creating an app without any distractions.

It would be helpful to have additional templates that include only the necessary files, such as an "Empty Index" or "Index Only" template for Blazor projects. These templates should just include the blank homepage file called "Index.razor" and the necessary files to make the default Blazor theme, but without any unnecessary components or code. These templates would be useful for quick idea prototyping and testing different approaches, without the need to remove unnecessary files. The templates should be named "Blazor Server App Blank Home" and "Blazor WebAssembly App Blank Home" for easier searching.

Thanks!

javiercn commented 1 year ago

@thabaum thanks for contacting us.

We might choose to provide an option, but it is unlikely unless we see more people request it. We already have the empty templates for that reason.

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

thabaum commented 1 year ago

@javiercn I did not complete all the steps to remove what is needed to create this template, nor all the steps to create what is needed from an empty project. Thank you for the consideration I hope the community can support this additional template as it is a task to make what I am requesting from either template.

ghost commented 10 months ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

thabaum commented 8 months ago

Thank you for taking the time and effort to listen to this request along with all others related to produce some awesome templates to work with in .NET 8! I know this request is still worth reviewing.

I look forward to new templates that would include the .NET MAUI app combined with .NET BLazor Web App, but I am still hoping to see this one with a blank theme as well if it ever can be included as an option. "Homepage Only" option?

Thanks again @javiercn @mkArtakMSFT @MackinnonBuck and @danroth27 for all the hard work relating!

After reviewing things closer it is just a hello world page, with no theme. I love the new templates however good place to start. I will reopen this to let it marinate more as what I would like to see is a layout "theme" not just the hello world page, and