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

Add empty option for the Blazor Web App template #48913

Closed
danroth27 opened this issue Jun 20, 2023 · 3 comments
Closed

Add empty option for the Blazor Web App template #48913

danroth27 opened this issue Jun 20, 2023 · 3 comments
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-templates

Comments

@danroth27
Copy link
Member

The Blazor Web App template currently contains sample content including sample pages and Bootstrap. We need to have a way to create an empty Blazor Web App template that doesn't have this sample content.

Previously we've done this by having separate empty Blazor templates. Can we instead have an option on the Blazor Web App template for adding sample content that you can unselect?

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Jun 20, 2023
@mkArtakMSFT mkArtakMSFT added enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-templates labels Jun 20, 2023
@mkArtakMSFT mkArtakMSFT added this to the 8.0-preview7 milestone Jun 20, 2023
@danroth27
Copy link
Member Author

Looking at how our existing templates are used, it appears that the empty templates are not used as much as the ones with sample content. So, it looks like the default should be to include the sample content and then have an --empty option to generate an empty template. This option would surface in VS and would be sticky. One benefit of this approach is all the other template options wouldn't need to be duplicated.

The empty version of the template would have a basic Home page, but no Counter or Weather pages. It would include a simple MainLayout without a NavMenu. It wouldn't include Bootstrap. Just like the existing empty templates.

We'd need to figure out how this would interact with the authentication options, like the proposed Blazor default identity UI (#48786). Since the Bootstrap styling wouldn't be available, users would need to style the Identity UI along with the rest of the app. @halter73 Do you foresee any problems with this?

@danroth27
Copy link
Member Author

I discussed the following options with @halter73 for how to handle --empty with individual user accounts:

  1. We could author the template to remove any Bootstrap specific stuff from the default identity UI if you specify --empty
  2. We could generate the identity UI with the Bootstrap classes, which will just get ignored.
  3. We could add Bootstrap if you add the auth UI
  4. We could not support the default identity UI with --empty

I think we should go with the third option, which basically says that our default identity comes with styling that depends on Bootstrap.

@mkArtakMSFT If there are no additional questions, I think this is ready to assign to engineering.

@SteveSandersonMS
Copy link
Member

This was done a while ago

@ghost ghost locked as resolved and limited conversation to collaborators Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-templates
Projects
None yet
Development

No branches or pull requests

4 participants