-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Update Blazor WebAssembly template #50554
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
Update Blazor WebAssembly template #50554
Conversation
@@ -1,3 +1,4 @@ | |||
/*#if (SampleContent)*/ |
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.
This if block doesn't work. For empty and non-empty blazor wasm template this comment stays in place.
I checked for Blazor Web template app.css and it works there.
@SteveSandersonMS, do you know why this happens?
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.
@MackinnonBuck maybe you know?
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 think it's because of this block in template.json
:
"copyOnly": [
"**/wwwroot/css/**"
],
You'll need to change it to something like:
"copyOnly": [
"**/wwwroot/css/bootstrap/**"
],
... so that app.css
is not included in copyOnly
.
@danroth27, which one is better for empty template with auth? Currently it is without a link This can be achieved by adding |
] | ||
}, | ||
{ | ||
"condition": "(IndividualLocalAuth)", |
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.
LoginDisplay.IndividualMsalAuth.razor and LoginDisplay.IndividualLocalAuth.razor were identical. I replaced them with one LoginDisplay.razor
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.
Good catch!
Including the LoginDisplay in the Layout seems reasonable. It seems likely that the LoginDisplay will need to eventually go somewhere in the layout. |
@@ -4,6 +4,9 @@ | |||
"description": "Šablona projektu pro vytvoření aplikace Blazor, která běží ve WebAssembly. Tato šablona se dá využít pro webové aplikace s propracovanými dynamickými uživatelskými rozhraními (UI).", | |||
"symbols/Framework/description": "Cílová architektura pro projekt", | |||
"symbols/Framework/choices/net8.0/description": "Cílový net8.0", | |||
"symbols/IncludeSampleContent/displayName": "_Include sample pages", |
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.
How do these eventually get translated?
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.
There's a system. Eventually the system will make a PR that updates the newly-added strings to translated values. Nothing else has to be done for it in this PR.
@@ -4,6 +4,9 @@ | |||
"description": "Eine Projektvorlage für das Erstellen einer Blazor-App, die in WebAssembly ausgeführt wird. Diese Vorlage kann für Web-Apps mit umfangreichen dynamischen Benutzeroberflächen verwendet werden.", | |||
"symbols/Framework/description": "Das Zielframework für das Projekt.", | |||
"symbols/Framework/choices/net8.0/description": "Ziel net8.0", | |||
"symbols/IncludeSampleContent/displayName": "_Include sample pages", |
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.
How do these eventually get translated?
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
Do we still have You can check |
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.
Excellent!
There are a lot of combinations of options so I can't promise I've interpreted all the conditions exhaustively but everything I can see looks right.
If it's possible to also remove bootstrap-icons (commented elsewhere) that would complete the process of making it consistent with BlazorWeb-CSharp as far as I know.
Besides that, looks perfect!
Update Blazor WebAssembly template
Renamed from "Blazor WebAssembly App" to "Blazor WebAssembly Standalone App"
and added "Include sample pages" option to ide (checked by default) as well as "--empty" option for creating empty template "dotnet new blazorwasm --empty"
Empty template without auth files:

Looks like this:
Empty template with auth files:
Looks like this:
Fixes #50195
Fixes #50292