-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Change priority of re-execution handling and allow router to stream NotFound
contents
#62178
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
base: main
Are you sure you want to change the base?
Change priority of re-execution handling and allow router to stream NotFound
contents
#62178
Conversation
…o shared project + redefine test cases.
src/Components/test/E2ETest/ServerRenderingTests/NoInteractivityTest.cs
Outdated
Show resolved
Hide resolved
src/Components/test/E2ETest/ServerRenderingTests/NoInteractivityTest.cs
Outdated
Show resolved
Hide resolved
Adding |
Failures connected with Router's streaming inferencing with enhanced navigation, e.g.:
Starting investigation on why the whole page, including constant elements, changes on streaming. |
In
and we trigger SendStreamingUpdatesAsync that, in contrast to EmitInitializersIfNecessary , starts the response. It's important in the context of how we handle the navigation. With Router that streams we fall into a _httpContext.Response.HasStarted=true path of processing navigation:https://github.com/dotnet/aspnetcore/blob/1415d9bbe18c8ba97e9eb5a9618b5c149a261e3e/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.EventDispatch.cs#L105C1-L116C10 Using Edit:
fixes it but that's not a way to do it. It would break the scenarios where we really want to stream-in the changes. |
oldTree as ampty array (why? Under investigation...) so logically, it builds the new view from scratch.edit: this behavior is not influenced by Router streaming settings.
|
Functional test failures are connected with empty streaming markers added to the response, e.g.
|
Topics for to discuss in a follow-up:
|
Contributes to #62153.
Description
NotFound
contents.Router
, then in all the cases we should renderNotFoundPage
contents and if page is not available, then we can renderNotFound
fragment if streaming has not started.NotFound
contents.NotFound
contents but prevent the url change. This will happen on JS-initiated navigations. If enhanced navigation is off or the navigation is initiated by the browser (e.g. mistype in the url bar) then we redirect toNotFound
, which includes url change.NotFound
url when streaming:Router
hasNotFoundPage
type passed, it's getting rendered, otherwise we rely on the url passed to re-execution middleware.NotFound
fragment cannot be rendered this way.Components.Shared.csproj
was needed because we want the same components to be tested in global interactivity application (InteractivityTests.cs
that is runningComponents.WasmMinimal.csproj
) and per-component interactivity application (NoInteractivityTests.cs
that is runningComponents.TestServer.csproj
that is not loadingWasmMinimal
assembly). The neatest solution was to put the common components is an external razor library. We could also start loadingWasmMinimal
in non-interactive tests but I decided it makes it too messy.PageThatSetsNotFound
andStreamingSetNotFound
components were doing the same job as new tests but the new version is doing it in amore unified way, taking into consideration both POST and GET request, with and without enhanced navigation.