-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Empty Blazor WebAssembly Project Template #42215
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great so far; left a few comments.
Also, we can remove the database:
src/ProjectTemplates/Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Server/app.db
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/template.json
Outdated
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/template.json
Outdated
Show resolved
Hide resolved
...ctTemplates/Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Client/Program.cs
Outdated
Show resolved
Hide resolved
...ctTemplates/Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Server/Program.cs
Outdated
Show resolved
Hide resolved
....ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/ComponentsWebAssembly-CSharp.sln
Outdated
Show resolved
Hide resolved
...mplates/content/EmptyComponentsWebAssembly-CSharp/Client/wwwroot/service-worker.published.js
Outdated
Show resolved
Hide resolved
...mplates/content/EmptyComponentsWebAssembly-CSharp/Client/wwwroot/service-worker.published.js
Outdated
Show resolved
Hide resolved
...ctTemplates/Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Server/Program.cs
Outdated
Show resolved
Hide resolved
...ates/Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Client/Pages/Index.razor
Outdated
Show resolved
Hide resolved
|
||
.blazor-error-boundary::after { | ||
content: "An error has occurred." | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
...lates/Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Client/MainLayout.razor
Outdated
Show resolved
Hide resolved
<p role="alert">Sorry, there's nothing at this address.</p> | ||
</LayoutView> | ||
</NotFound> | ||
</Router> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/ide.host.json
Outdated
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/template.json
Outdated
Show resolved
Hide resolved
.../content/EmptyComponentsWebAssembly-CSharp/.template.config/localize/templatestrings.cs.json
Outdated
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/ide.host.json
Outdated
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/ide.host.json
Outdated
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/template.json
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/ide.host.json
Outdated
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/ide.host.json
Outdated
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/template.json
Show resolved
Hide resolved
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/ide.host.json
Show resolved
Hide resolved
src/ProjectTemplates/test/Templates.Tests/template-baselines.json
Outdated
Show resolved
Hide resolved
.../Web.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/Client/wwwroot/manifest.json
Outdated
Show resolved
Hide resolved
…ntsWebAssembly-CSharp/Client/wwwroot/manifest.json Co-authored-by: Tanay Parikh <TanayParikh@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🚢 it!
...eb.ProjectTemplates/content/EmptyComponentsWebAssembly-CSharp/.template.config/template.json
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now. Thanks!
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