Skip to content

Conversation

@guardrex
Copy link
Collaborator

@guardrex guardrex commented Jan 26, 2026

Fixes #36683
Addresses #36448

Wade, Tom ... Just need one review to get this one in.

  • In navigation.md, I'm just removing the <div> because it isn't necessary to show it when discussing the links.
  • In Part 3 of the Blazor movie dB tutorial, I must version new markup for the guidance. I'm also fixing a small bug here per Copilot. The <nav> element class should have the nav property for 9.0 or later. I'm fixing that here, too.

BTW ... For the Copilot suggestion ...

Note: Both modified articles have substantial content changes but still use earlier ms.date values; these should be updated to the current date to reflect the new guidance.

You might want to instruct it to ignore the Blazor node for that instruction. Blazor articles are updated once per year on release day, unless the article is truly being overhauled midyear. This approach cuts down on the overhead of small article changes.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/fundamentals/navigation.md aspnetcore/blazor/fundamentals/navigation
aspnetcore/blazor/tutorials/movie-database-app/part-3.md aspnetcore/blazor/tutorials/movie-database-app/part-3

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Blazor NavMenu documentation and tutorial content for .NET 11 by removing the inline JavaScript event handler and introducing the new JS module-based pattern, with versioned guidance for pre-11.0 and 11.0+.

Changes:

  • In Part 3 of the Blazor movie database tutorial, versions the NavMenu component markup with >= aspnetcore-11.0 and < aspnetcore-11.0 monikers, adding the NavMenu.razor.js module reference and the id="nav-scrollable" container for .NET 11 while preserving the existing pattern for earlier versions.
  • In the Blazor navigation fundamentals article, updates the dynamically-generated NavLink example to drop the inline onclick handler from the NavMenu snippet by showing only the <nav> block instead of the full nav-scrollable wrapper.
  • Note: Both modified articles have substantial content changes but still use earlier ms.date values; these should be updated to the current date to reflect the new guidance.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
aspnetcore/blazor/tutorials/movie-database-app/part-3.md Versions the NavMenu tutorial markup for .NET 11, adding the @Assets["Components/Layout/NavMenu.razor.js"] script module and id="nav-scrollable" container in the >= aspnetcore-11.0 moniker while keeping the existing inline-onclick implementation for < aspnetcore-11.0.
aspnetcore/blazor/fundamentals/navigation.md Adjusts the “Dynamically-generated NavLink components via reflection” snippet so it no longer shows the nav-scrollable <div> with an inline onclick, instead focusing on the <nav> markup and the added @foreach block.

@guardrex guardrex removed the request for review from wadepickett January 26, 2026 17:11
@guardrex guardrex added the 11.0 .NET 11 label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11.0 .NET 11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[11.0 P1] Remove the inline JS event handler in the NavMenu

3 participants