From 909476da875cd1e74af33a9626d46cc7a33582aa Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 19 Sep 2023 13:12:52 -0500 Subject: [PATCH 1/3] Handle obsolete InterceptorsPreview with .NET 8 RC2 SDK (#50797) --- src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj b/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj index 991c08e76922..04bec898ed84 100644 --- a/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj +++ b/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj @@ -9,7 +9,9 @@ false true true + $(Features);InterceptorsPreview + $(InterceptorsPreviewNamespaces);Microsoft.AspNetCore.Http.Generated From acdb4fda4d7ef5d2392a6877e9ef2283689ca13c Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 20 Sep 2023 02:27:33 +0100 Subject: [PATCH 2/3] Quarantine (actually comment out) one of the CanRenderComponentWithPersistedState cases (#50811) See https://github.com/dotnet/aspnetcore/issues/50810 --- src/Components/test/E2ETest/Tests/StatePersistenceTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/test/E2ETest/Tests/StatePersistenceTest.cs b/src/Components/test/E2ETest/Tests/StatePersistenceTest.cs index 9a7dd208bae6..5f169f548e8e 100644 --- a/src/Components/test/E2ETest/Tests/StatePersistenceTest.cs +++ b/src/Components/test/E2ETest/Tests/StatePersistenceTest.cs @@ -51,7 +51,7 @@ public override Task InitializeAsync() [InlineData(false, typeof(InteractiveWebAssemblyRenderMode), (string)null)] [InlineData(false, typeof(InteractiveWebAssemblyRenderMode), "WebAssemblyStreaming")] [InlineData(false, typeof(InteractiveAutoRenderMode), (string)null)] - [InlineData(false, typeof(InteractiveAutoRenderMode), "AutoStreaming")] + // [InlineData(false, typeof(InteractiveAutoRenderMode), "AutoStreaming")] https://github.com/dotnet/aspnetcore/issues/50810 public void CanRenderComponentWithPersistedState(bool suppressEnhancedNavigation, Type renderMode, string streaming) { var mode = renderMode switch From 79b23f42e3cd2363f2e99575003e9e88a716bd51 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 20 Sep 2023 10:22:09 +0100 Subject: [PATCH 3/3] Stop processing original response streaming content if user has started navigating away (#50814) * Reproduce #50733 as a failing E2E test * Don't process original request blazor-ssr content if the user has already navigated away * Quarantine (actually comment out) one of the CanRenderComponentWithPersistedState cases See https://github.com/dotnet/aspnetcore/issues/50810 * Update EventTest.cs * Disable another flaky test --- .../EndpointHtmlRenderer.Streaming.cs | 3 +- .../Web.JS/dist/Release/blazor.web.js | 2 +- .../src/Rendering/StreamingRendering.ts | 11 ++++- .../src/Services/NavigationEnhancement.ts | 4 ++ .../StreamingRenderingTest.cs | 46 +++++++++++++++++++ .../test/E2ETest/Tests/EventTest.cs | 4 +- .../E2ETest/Tests/StatePersistenceTest.cs | 2 +- 7 files changed, 65 insertions(+), 7 deletions(-) diff --git a/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs b/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs index 5a6d11e5b98d..31ef21b0ad57 100644 --- a/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs +++ b/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs @@ -118,6 +118,7 @@ private void SendBatchAsStreamingUpdate(in RenderBatch renderBatch, TextWriter w } // Now process the list, skipping any we've already visited in an earlier iteration + var isEnhancedNavigation = IsProgressivelyEnhancedNavigation(_httpContext.Request); for (var i = 0; i < componentIdsInDepthOrder.Length; i++) { var componentId = componentIdsInDepthOrder[i].ComponentId; @@ -132,7 +133,7 @@ private void SendBatchAsStreamingUpdate(in RenderBatch renderBatch, TextWriter w // as it is being written out. writer.Write($"