Skip to content

Sync Blazor templates with aspnetcore net11-pre4#35265

Open
mattleibow wants to merge 1 commit intonet11.0from
mattleibow/blazor-template-sync-net11-pre4
Open

Sync Blazor templates with aspnetcore net11-pre4#35265
mattleibow wants to merge 1 commit intonet11.0from
mattleibow/blazor-template-sync-net11-pre4

Conversation

@mattleibow
Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description

Syncs both MAUI Blazor templates (maui-blazor and maui-blazor-web) with upstream changes from dotnet/aspnetcore BlazorWeb-CSharp template (release/10.0main/net11-pre4).

Changes

Both templates

  • NavMenu.razor: Replace inline onclick handler with id="nav-scrollable" + JS module (CSP compliance)
  • NEW NavMenu.razor.js: Co-located JS click handler for nav toggle
  • template.json: Add **/*.razor.js to copyOnly so template engine emits co-located JS files

maui-blazor (standalone)

  • index.html: Add <script> reference for NavMenu.razor.js

maui-blazor-solution (multi-project)

  • App.razor: <base href="/" /><BasePath /> component
  • ReconnectModal.razor: Resume button ordering + resume-failed-visible class
  • ReconnectModal.razor.js: Resume failure shows state instead of force-reload
  • ReconnectModal.razor.css: Fix &[open] CSS nesting indentation
  • Error.razor: [PersistentState] on RequestId, public, ??= assignment
  • _Imports.razor (Web): Add @using Microsoft.AspNetCore.Components.Endpoints
  • template.json: Add onlyIf localhost constraint on port replacers
  • Web.Client Program.cs/Main.cs: PersistentAuthenticationStateProviderAddAuthenticationStateDeserialization()
  • index.html: Add NavMenu.razor.js script reference

Not synced (intentional)

  • Account/Identity pages (not in MAUI templates)
  • Data/migrations (not in MAUI templates)
  • Localize files (auto-generated)

Copilot AI review requested due to automatic review settings April 30, 2026 19:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35265

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35265"

Copy link
Copy Markdown
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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Apply upstream changes from dotnet/aspnetcore BlazorWeb-CSharp template
(release/10.0 → main/net11-pre4) to both maui-blazor and
maui-blazor-solution templates:

- ReconnectModal.razor: Resume button ordering + resume-failed class
- ReconnectModal.razor.js: Show resume-failed state instead of reload
- ReconnectModal.razor.css: Fix &[open] CSS nesting indentation
- Web.Client Program.cs/Main.cs: Use AddAuthenticationStateDeserialization()
- template.json: Add onlyIf localhost constraint on port replacers
- template.json: Add *.razor.js to copyOnly for co-located JS files
- index.html: Add SampleContent-guarded NavMenu.razor.js script refs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow force-pushed the mattleibow/blazor-template-sync-net11-pre4 branch from 72b817b to ce11f67 Compare May 7, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants