Empty Blazor WebAssembly Project Template#42215
Conversation
TanayParikh
left a comment
There was a problem hiding this comment.
Looking great so far; left a few comments.
Also, we can remove the database:
src/ProjectTemplates/Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Server/app.db
|
|
||
| .blazor-error-boundary::after { | ||
| content: "An error has occurred." | ||
| } |
There was a problem hiding this comment.
If we're having the error styling, should we also have minimal styling for forms validation errors?
.valid.modified:not([type=checkbox]) {
outline: 1px solid #26b050;
}
.invalid {
outline: 1px solid red;
}
.validation-message {
color: red;
}There was a problem hiding this comment.
I believe we wanted to eliminate as much CSS styling as possible, and the error styling was only kept as it was being used in \Client\wwwroot\index.html. The form validation styling was removed since it wasn't used in any of the existing code, but it can be added back to both templates.
| <p role="alert">Sorry, there's nothing at this address.</p> | ||
| </LayoutView> | ||
| </NotFound> | ||
| </Router> |
There was a problem hiding this comment.
Is the intent to support auth with this template? I don't personally mind either way about that, but if we are supporting auth, then I think there will also need to be an auth-enabled version of this file which uses AuthorizeRouteView. The non-empty template contains an example of this.
There was a problem hiding this comment.
Is the intent to support auth with this template?
Spoke with Dan regarding this earlier, and the conclusion was the empty template does not need to support auth.
|
@cerasamson This is looking really great! I'm definitely looking forward to having this template. No doubt customers will appreciate it a lot too. Minor question: I noticed there's a file And are we missing |
|
Here's a slightly controversial thought: we don't really need to have any "layout" in this template. We could just eliminate the @danroth27 Interested to know if you have a view on this. In your experience, do people need layout components, and do you think they would struggle to add a "layout" component later if the project template didn't start with one? Update Actually on further consideration, having this one extra very simple |
|
@SteveSandersonMS Thank you for the feedback! 😄
The |
| { | ||
| "$schema": "http://json.schemastore.org/dotnetcli.host", | ||
| "symbolInfo": { | ||
| "skipRestore": { |
There was a problem hiding this comment.
Just confirming whether you've had a chance to test out these options on the CLI? Notably, the Hosted option is working appropriately (ie. creating empty blazor hosted vs empty blazor standalone).
…on/aspnetcore into t-samsoncera/empty-wasm
…ntsWebAssembly-CSharp/Client/wwwroot/manifest.json Co-authored-by: Tanay Parikh <TanayParikh@users.noreply.github.com>
Caused /Server build to fail
This creates an empty Blazor WebAssembly project template that contains minimal HTML/CSS formatting and no demo code or authentication options.
Screenshot of the current template:

Fixes #32832