Skip to content

[release/8.0] [Blazor] Dispatch inbound activity handlers in Blazor Web apps #53313

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

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

MackinnonBuck
Copy link
Member

Dispatch inbound activity handlers in Blazor Web apps

Fixes an issue where inbound activity handlers were not getting invoked in Blazor Web apps.

Description

Inbound activity handlers were a new feature introduced in .NET 8 to allow Blazor Server apps to monitor circuit activity and make services available to Blazor components that wouldn't otherwise be accessible. However, we also introduced a new "Blazor Web" app model that didn't incorporate this new feature correctly.

This PR fixes the issue by:

  • Building the inbound activity pipeline in Blazor Web apps just after circuit handlers are retrieved
  • Invoking inbound activity handlers in web root component updates

Fixes #51934

Customer Impact

Multiple customers have indicated being affected by this issue. Since this is a new feature in .NET 8, customers expect it to work in Blazor Web apps, which we recommend for new projects. Without this fix, the functionality only works in traditional Blazor Server apps.

Regression?

  • Yes
  • No

This is a new feature in .NET 8.

Risk

  • High
  • Medium
  • Low

The fix is simple and applies to a well-tested area of the framework, so our E2E tests are likely to catch issues with this change.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@MackinnonBuck MackinnonBuck added Servicing-consider Shiproom approval is required for the issue area-blazor Includes: Blazor, Razor Components labels Jan 11, 2024
@MackinnonBuck MackinnonBuck requested a review from a team as a code owner January 11, 2024 19:54
@ghost
Copy link

ghost commented Jan 11, 2024

Hi @MackinnonBuck. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@ghost ghost added this to the 8.0.x milestone Jan 11, 2024
@ghost
Copy link

ghost commented Jan 11, 2024

Hi @MackinnonBuck. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@mkArtakMSFT mkArtakMSFT added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jan 12, 2024
@ghost
Copy link

ghost commented Jan 12, 2024

Hi @MackinnonBuck. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@mkArtakMSFT mkArtakMSFT merged commit d4b8ba6 into release/8.0 Jan 16, 2024
@mkArtakMSFT mkArtakMSFT deleted the mbuck/backport-53185-to-8.0 branch January 16, 2024 21:57
@ghost ghost modified the milestones: 8.0.x, 8.0.2 Jan 16, 2024
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 Servicing-approved Shiproom has approved the issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants