Skip to content

Blazor Hybrid WebViewRenderer no-ops per-component render modes#66616

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-webviewrenderer-per-page-render-modes
Closed

Blazor Hybrid WebViewRenderer no-ops per-component render modes#66616
Copilot wants to merge 2 commits intomainfrom
copilot/fix-webviewrenderer-per-page-render-modes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

Blazor Hybrid WebViewRenderer no-ops per-component render modes

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Support per-page/component render modes in Blazor Hybrid WebView

Description

maui-blazor-web shared components can declare per-page/component render modes (for example InteractiveAuto) that work on web but currently throw in Blazor Hybrid because WebViewRenderer inherits the base Renderer fallback that rejects unsupported modes. This change makes WebView treat render modes as no-ops, matching Hybrid’s always-interactive execution model.

  • Renderer behavior update

    • WebViewRenderer now overrides ResolveComponentForRenderMode(...) and always creates the requested component instance instead of throwing for render modes.
    • This aligns WebView behavior with Hybrid semantics and removes failures for components/pages using interactive render modes from shared RCLs.
  • Regression coverage

    • Added a WebView unit test that renders a child component with RenderMode.InteractiveAuto set at the component callsite and verifies render flow completes successfully.
protected override IComponent ResolveComponentForRenderMode(
    Type componentType,
    int? parentComponentId,
    IComponentActivator componentActivator,
    IComponentRenderMode renderMode)
    => componentActivator.CreateInstance(componentType);

@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label May 7, 2026
Copilot AI changed the title [WIP] Fix WebViewRenderer to support per-page/component render modes Blazor Hybrid WebViewRenderer no-ops per-component render modes May 7, 2026
Copilot finished work on behalf of lewing May 7, 2026 16:26
Copilot AI requested a review from lewing May 7, 2026 16:26
@lewing lewing requested a review from javiercn May 7, 2026 16:34
@javiercn
Copy link
Copy Markdown
Member

javiercn commented May 8, 2026

This is a duplicate of another PR that I created a while ago.

@javiercn
Copy link
Copy Markdown
Member

javiercn commented May 8, 2026

Closing as dupe of #65876

@javiercn javiercn closed this May 8, 2026
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview5 milestone May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blazor Hybrid (WebViewRenderer) should support per-page/component render modes as no-ops

3 participants