-
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
Blazor Web template updates #49801
Blazor Web template updates #49801
Conversation
</div> | ||
</div> | ||
|
||
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu"> | ||
<input type="checkbox" title="Navigation menu" class="navbar-toggler" /> |
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 is visually the same as the toggler we had before, but now it doesn't require .NET (it's reduced to CSS and a single JS onclick
on line 9) and still works correctly with keyboard/focus/tooltips for accessibility.
It's always been confusing because it is actually the entire side of the screen, not just the nav menu. You couldn't just swap it out with some other "nav menu" because that would break the page layout. It has the top-left quadrant as well as the bottom-left. I think it's easier to understand the role of this component when it clarifies this. As an alternative I could try putting more of this component's content into |
Definitely happy to discuss this. However, I find the idea of putting the root component under |
@@ -62,7 +62,8 @@ | |||
<GeneratedContent Include="WebApi-FSharp.fsproj.in" OutputPath="content/WebApi-FSharp/Company.WebApplication1.fsproj" /> | |||
<GeneratedContent Include="Worker-CSharp.csproj.in" OutputPath="content/Worker-CSharp/Company.Application1.csproj" /> | |||
<GeneratedContent Include="Worker-FSharp.fsproj.in" OutputPath="content/Worker-FSharp/Company.Application1.fsproj" /> | |||
<GeneratedContent Include="Components-CSharp.csproj.in" OutputPath="content/Components-CSharp/Components-CSharp.csproj" /> | |||
<GeneratedContent Include="BlazorWeb-CSharp.csproj.in" OutputPath="content/BlazorWeb-CSharp/BlazorWeb-CSharp/BlazorWeb-CSharp.csproj" /> | |||
<GeneratedContent Include="BlazorWeb-CSharp.Client.csproj.in" OutputPath="content/BlazorWeb-CSharp/BlazorWeb-CSharp.Client/BlazorWeb-CSharp.Client.csproj" /> |
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.
The other template that we have is components-webassembly
could we have consistent naming between the two? (Either BlazorWebassembly
or ComponentsWeb`)
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.
Yeah, I'd like to change the other template's name to BlazorWebAssembly
(to match everything else about its branding) and eliminate the "empty" variant in favour of a flag on BlazorWebAssembly
. Just not trying to do that as part of this PR.
"UseWebAssembly": { | ||
"longName": "use-wasm", | ||
"longName": "use-wasm" | ||
}, | ||
"Empty": { | ||
"longName": "empty" | ||
}, | ||
"IncludeSampleContent": { |
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.
Do not block on this, but we were talking in the past of making blazor web
bring in server and webassembly by default.
The reason we did opt-in as opposed to opt-out was that we didn't have the underlying features in place. Do we want to keep that model (opt-in) or do we want to switch to opt-out.
/cc: @danroth27
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.
Dan and I did discuss this and came to the conclusion that server-on-by-default, wasm-off-by-default was the preferred balance for .NET 8. We're certainly free to change that in the future if we so choose.
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.
@javiercn I want interactivity to work by default, but I'm concerned about the complexity that WebAssembly currently adds. I'm thinking about the getting started experience here for new users. Granted, the downside of having WebAssembly off by default is that if you later want to add it, it's not easy to do.
Fixes #49556
Fixes #49299
Fixes #49056
Fixes #49053
Fixes #48983
Fixes #49412
This is a hopefully complete implementation.
I'll update the template tests tomorrow, but it should be possible to review already.Update: tests updated.Almost all the restructuring here has already been discussed and agreed with @danroth27. Hope I didn't forget any of the changes.