Skip to content

[11.0 P6] Blazor Preview 6 coverage#37322

Draft
guardrex wants to merge 5 commits into
mainfrom
guardrex/blazor-preview-6
Draft

[11.0 P6] Blazor Preview 6 coverage#37322
guardrex wants to merge 5 commits into
mainfrom
guardrex/blazor-preview-6

Conversation

@guardrex

@guardrex guardrex commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Addresses #37274

🚧👷‍♀️ WIP 👷‍♂️🏗️

Dan, the introductory union coverage in the Components overview article currently assigns a C#-built RenderFragment, which works 🎉 ...

<Slot Content="@renderFrag" />

@code {
    private SlotContent renderFrag;

    protected override void OnInitialized()
    {
        renderFrag = new SlotContent((RenderFragment)(b =>
        {
            ...
        }));
    }

...
}

However, I was expecting (hoping for) a Razor markup approach to work ...

<Slot>
    <button @onclick="Increment">@currentCount</button>
</Slot>

... but I couldn't get that to work (even if I named the SlotContent type in the Slot component to "ChildContent").

If there's a Razor markup way to pass that SlotContent, I think we should show it. If it can't be done, then perhaps we should warn devs off of trying it. Otherwise, they'll waste a lot of time trying to get it to work.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/components/dynamiccomponent.md aspnetcore/blazor/components/dynamiccomponent
aspnetcore/blazor/components/index.md aspnetcore/blazor/components/index
aspnetcore/blazor/fundamentals/navigation.md aspnetcore/blazor/fundamentals/navigation
aspnetcore/blazor/fundamentals/routing.md aspnetcore/blazor/fundamentals/routing
aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript.md aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript
aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet
aspnetcore/blazor/state-management/prerendered-state-persistence.md aspnetcore/blazor/state-management/prerendered-state-persistence
aspnetcore/mvc/models/model-binding.md aspnetcore/mvc/models/model-binding
aspnetcore/signalr/hubs.md aspnetcore/signalr/hubs

@guardrex guardrex self-assigned this Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates ASP.NET Core documentation for .NET 11 Preview 6, focusing on C# union types coverage across Blazor, SignalR, MVC, and Minimal APIs, and aligning union-type links with current C# reference material.

Changes:

  • Update several union-type references to point to the C# union type language reference.
  • Add/expand Blazor guidance for union types (component parameters, DynamicComponent boxing, JS interop support note, and a PCS/serialization caveat).
  • Refresh article metadata dates where substantial content was added/updated.

Reviewed changes

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

Show a summary per file
File Description
aspnetcore/signalr/hubs.md Updates the union types link used in the SignalR JsonHubProtocol note.
aspnetcore/release-notes/aspnetcore-11/includes/csharp-unions-preview-6.md Adds a language-reference cross-link for union types in the .NET 11 Preview 6 release notes include.
aspnetcore/mvc/models/model-binding.md Updates union types link in the model-binding note about [FromBody] support.
aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md Updates union types link in Minimal API parameter binding note.
aspnetcore/blazor/state-management/prerendered-state-persistence.md Adds a .NET 11 note about JsonSerializerContext not flowing into union deserialization; updates metadata date.
aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md Adds a .NET 11 note that union types are supported; updates metadata date.
aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript.md Adds a .NET 11 note that union types are supported; updates metadata date.
aspnetcore/blazor/fundamentals/routing.md Updates union types link in the note about route parameters not supporting unions.
aspnetcore/blazor/fundamentals/navigation.md Updates union types link in the note about [SupplyParameterFromQuery]/[SupplyParameterFromForm] not supporting unions.
aspnetcore/blazor/components/index.md Adds union-typed component parameter guidance + examples and updates metadata (including ai-usage).
aspnetcore/blazor/components/dynamiccomponent.md Adds guidance and examples for boxing union-typed parameters passed via DynamicComponent dictionaries; updates metadata date.

Comment thread aspnetcore/blazor/components/index.md Outdated
Comment thread aspnetcore/blazor/components/index.md Outdated
Comment thread aspnetcore/blazor/components/index.md Outdated
Comment thread aspnetcore/blazor/state-management/prerendered-state-persistence.md
Comment thread aspnetcore/blazor/components/dynamiccomponent.md
guardrex and others added 2 commits July 9, 2026 13:39
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@wadepickett

Copy link
Copy Markdown
Contributor

@guardrex, just a heads up I will be unavailable from 7/10 Friday (tomorrow), all through next week until 7/21. So look to @tdykstra for any reviews you need here or on the samples repo, etc. @tdykstra is also handling the What's New. I'll start a draft today but he will be responsible for updates to keep in sync with any release note updates.

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.

3 participants