Skip to content

Commit 76038c1

Browse files
authored
Merge branch 'release/8.0' into stevesa/fix-wrong-streaming-output
2 parents 2cfda72 + cbfc558 commit 76038c1

30 files changed

+553
-125
lines changed

eng/Version.Details.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@
99
-->
1010
<Dependencies>
1111
<ProductDependencies>
12-
<Dependency Name="dotnet-ef" Version="8.0.0-rtm.23512.5">
12+
<Dependency Name="dotnet-ef" Version="8.0.0-rtm.23512.21">
1313
<Uri>https://github.com/dotnet/efcore</Uri>
14-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
14+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
1515
</Dependency>
16-
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0-rtm.23512.5">
16+
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0-rtm.23512.21">
1717
<Uri>https://github.com/dotnet/efcore</Uri>
18-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
18+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
1919
</Dependency>
20-
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0-rtm.23512.5">
20+
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0-rtm.23512.21">
2121
<Uri>https://github.com/dotnet/efcore</Uri>
22-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
22+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
2323
</Dependency>
24-
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rtm.23512.5">
24+
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rtm.23512.21">
2525
<Uri>https://github.com/dotnet/efcore</Uri>
26-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
26+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
2727
</Dependency>
28-
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rtm.23512.5">
28+
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rtm.23512.21">
2929
<Uri>https://github.com/dotnet/efcore</Uri>
30-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
30+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
3131
</Dependency>
32-
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-rtm.23512.5">
32+
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0-rtm.23512.21">
3333
<Uri>https://github.com/dotnet/efcore</Uri>
34-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
34+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
3535
</Dependency>
36-
<Dependency Name="Microsoft.EntityFrameworkCore" Version="8.0.0-rtm.23512.5">
36+
<Dependency Name="Microsoft.EntityFrameworkCore" Version="8.0.0-rtm.23512.21">
3737
<Uri>https://github.com/dotnet/efcore</Uri>
38-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
38+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
3939
</Dependency>
40-
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="8.0.0-rtm.23512.5">
40+
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="8.0.0-rtm.23512.21">
4141
<Uri>https://github.com/dotnet/efcore</Uri>
42-
<Sha>33a597dcf7215756321f9aa84d70fb2a759815f3</Sha>
42+
<Sha>d0055a4f6b0c974ac2b24f36003d117210bd5323</Sha>
4343
</Dependency>
4444
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0-rtm.23511.16">
4545
<Uri>https://github.com/dotnet/runtime</Uri>
@@ -397,13 +397,13 @@
397397
<Uri>https://github.com/dotnet/arcade</Uri>
398398
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
399399
</Dependency>
400-
<Dependency Name="Microsoft.Extensions.Diagnostics.Testing" Version="8.0.0-rtm.23510.3">
400+
<Dependency Name="Microsoft.Extensions.Diagnostics.Testing" Version="8.0.0-rtm.23511.3">
401401
<Uri>https://github.com/dotnet/extensions</Uri>
402-
<Sha>b271fee0e6035d99ce19714b9579736172260758</Sha>
402+
<Sha>fbe530f75bd8cdc484a6d9badd6a90461c8aac64</Sha>
403403
</Dependency>
404-
<Dependency Name="Microsoft.Extensions.TimeProvider.Testing" Version="8.0.0-rtm.23510.3">
404+
<Dependency Name="Microsoft.Extensions.TimeProvider.Testing" Version="8.0.0-rtm.23511.3">
405405
<Uri>https://github.com/dotnet/extensions</Uri>
406-
<Sha>b271fee0e6035d99ce19714b9579736172260758</Sha>
406+
<Sha>fbe530f75bd8cdc484a6d9badd6a90461c8aac64</Sha>
407407
</Dependency>
408408
<Dependency Name="NuGet.Frameworks" Version="6.2.4">
409409
<Uri>https://github.com/nuget/nuget.client</Uri>

eng/Versions.props

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@
139139
<SystemIOHashingVersion>8.0.0-rtm.23511.16</SystemIOHashingVersion>
140140
<SystemRuntimeCachingVersion>8.0.0-rtm.23511.16</SystemRuntimeCachingVersion>
141141
<!-- Packages from dotnet/extensions -->
142-
<MicrosoftExtensionsDiagnosticsTestingVersion>8.0.0-rtm.23510.3</MicrosoftExtensionsDiagnosticsTestingVersion>
143-
<MicrosoftExtensionsTimeProviderTestingVersion>8.0.0-rtm.23510.3</MicrosoftExtensionsTimeProviderTestingVersion>
142+
<MicrosoftExtensionsDiagnosticsTestingVersion>8.0.0-rtm.23511.3</MicrosoftExtensionsDiagnosticsTestingVersion>
143+
<MicrosoftExtensionsTimeProviderTestingVersion>8.0.0-rtm.23511.3</MicrosoftExtensionsTimeProviderTestingVersion>
144144
<!-- Packages from dotnet/efcore -->
145-
<dotnetefVersion>8.0.0-rtm.23512.5</dotnetefVersion>
146-
<MicrosoftEntityFrameworkCoreInMemoryVersion>8.0.0-rtm.23512.5</MicrosoftEntityFrameworkCoreInMemoryVersion>
147-
<MicrosoftEntityFrameworkCoreRelationalVersion>8.0.0-rtm.23512.5</MicrosoftEntityFrameworkCoreRelationalVersion>
148-
<MicrosoftEntityFrameworkCoreSqliteVersion>8.0.0-rtm.23512.5</MicrosoftEntityFrameworkCoreSqliteVersion>
149-
<MicrosoftEntityFrameworkCoreSqlServerVersion>8.0.0-rtm.23512.5</MicrosoftEntityFrameworkCoreSqlServerVersion>
150-
<MicrosoftEntityFrameworkCoreToolsVersion>8.0.0-rtm.23512.5</MicrosoftEntityFrameworkCoreToolsVersion>
151-
<MicrosoftEntityFrameworkCoreVersion>8.0.0-rtm.23512.5</MicrosoftEntityFrameworkCoreVersion>
152-
<MicrosoftEntityFrameworkCoreDesignVersion>8.0.0-rtm.23512.5</MicrosoftEntityFrameworkCoreDesignVersion>
145+
<dotnetefVersion>8.0.0-rtm.23512.21</dotnetefVersion>
146+
<MicrosoftEntityFrameworkCoreInMemoryVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreInMemoryVersion>
147+
<MicrosoftEntityFrameworkCoreRelationalVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreRelationalVersion>
148+
<MicrosoftEntityFrameworkCoreSqliteVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreSqliteVersion>
149+
<MicrosoftEntityFrameworkCoreSqlServerVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreSqlServerVersion>
150+
<MicrosoftEntityFrameworkCoreToolsVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreToolsVersion>
151+
<MicrosoftEntityFrameworkCoreVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreVersion>
152+
<MicrosoftEntityFrameworkCoreDesignVersion>8.0.0-rtm.23512.21</MicrosoftEntityFrameworkCoreDesignVersion>
153153
<!-- Packages from dotnet/roslyn -->
154154
<MicrosoftCodeAnalysisCommonVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisCommonVersion>
155155
<MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.7.0-3.23314.3</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>

src/Components/Server/src/Circuits/RemoteNavigationInterception.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public async Task EnableNavigationInterceptionAsync()
3535
"attempted during prerendering or while the client is disconnected.");
3636
}
3737

38-
await _jsRuntime.InvokeAsync<object>(Interop.EnableNavigationInterception);
38+
await _jsRuntime.InvokeAsync<object>(Interop.EnableNavigationInterception, WebRendererId.Server);
3939
}
4040
}

src/Components/Server/src/Circuits/RemoteNavigationManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private async Task SetHasLocationChangingListenersAsync(bool value)
157157
{
158158
try
159159
{
160-
await _jsRuntime.InvokeVoidAsync(Interop.SetHasLocationChangingListeners, value);
160+
await _jsRuntime.InvokeVoidAsync(Interop.SetHasLocationChangingListeners, WebRendererId.Server, value);
161161
}
162162
catch (JSDisconnectedException)
163163
{

src/Components/Web.JS/dist/Release/blazor.server.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.webview.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/src/Boot.Server.Common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { DefaultReconnectionHandler } from './Platform/Circuits/DefaultReconnect
1010
import { discoverServerPersistedState, ServerComponentDescriptor } from './Services/ComponentDescriptorDiscovery';
1111
import { fetchAndInvokeInitializers } from './JSInitializers/JSInitializers.Server';
1212
import { RootComponentManager } from './Services/RootComponentManager';
13+
import { WebRendererId } from './Rendering/WebRendererId';
1314

1415
let initializersPromise: Promise<void> | undefined;
1516
let appState: string;
@@ -74,7 +75,7 @@ async function startServerCore(components: RootComponentManager<ServerComponentD
7475
options.reconnectionHandler = options.reconnectionHandler || Blazor.defaultReconnectionHandler;
7576

7677
// Configure navigation via SignalR
77-
Blazor._internal.navigationManager.listenForNavigationEvents((uri: string, state: string | undefined, intercepted: boolean): Promise<void> => {
78+
Blazor._internal.navigationManager.listenForNavigationEvents(WebRendererId.Server, (uri: string, state: string | undefined, intercepted: boolean): Promise<void> => {
7879
return circuit.sendLocationChanged(uri, state, intercepted);
7980
}, (callId: number, uri: string, state: string | undefined, intercepted: boolean): Promise<void> => {
8081
return circuit.sendLocationChanging(callId, uri, state, intercepted);

src/Components/Web.JS/src/Boot.WebAssembly.Common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { receiveDotNetDataStream } from './StreamingInterop';
1616
import { WebAssemblyComponentAttacher } from './Platform/WebAssemblyComponentAttacher';
1717
import { MonoConfig } from 'dotnet';
1818
import { RootComponentManager } from './Services/RootComponentManager';
19+
import { WebRendererId } from './Rendering/WebRendererId';
1920

2021
let options: Partial<WebAssemblyStartOptions> | undefined;
2122
let initializersPromise: Promise<void>;
@@ -127,7 +128,7 @@ async function startCore(components: RootComponentManager<WebAssemblyComponentDe
127128
}
128129
};
129130

130-
Blazor._internal.navigationManager.listenForNavigationEvents(async (uri: string, state: string | undefined, intercepted: boolean): Promise<void> => {
131+
Blazor._internal.navigationManager.listenForNavigationEvents(WebRendererId.WebAssembly, async (uri: string, state: string | undefined, intercepted: boolean): Promise<void> => {
131132
await dispatcher.invokeDotNetStaticMethodAsync(
132133
'Microsoft.AspNetCore.Components.WebAssembly',
133134
'NotifyLocationChanged',

src/Components/Web.JS/src/Boot.WebView.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { startIpcReceiver } from './Platform/WebView/WebViewIpcReceiver';
99
import { sendAttachPage, sendBeginInvokeDotNetFromJS, sendEndInvokeJSFromDotNet, sendByteArray, sendLocationChanged, sendLocationChanging } from './Platform/WebView/WebViewIpcSender';
1010
import { fetchAndInvokeInitializers } from './JSInitializers/JSInitializers.WebView';
1111
import { receiveDotNetDataStream } from './StreamingInterop';
12+
import { WebRendererId } from './Rendering/WebRendererId';
1213

1314
let started = false;
1415

@@ -32,8 +33,8 @@ async function boot(): Promise<void> {
3233

3334
Blazor._internal.receiveWebViewDotNetDataStream = receiveWebViewDotNetDataStream;
3435

35-
navigationManagerFunctions.enableNavigationInterception();
36-
navigationManagerFunctions.listenForNavigationEvents(sendLocationChanged, sendLocationChanging);
36+
navigationManagerFunctions.enableNavigationInterception(WebRendererId.WebView);
37+
navigationManagerFunctions.listenForNavigationEvents(WebRendererId.WebView, sendLocationChanged, sendLocationChanging);
3738

3839
sendAttachPage(navigationManagerFunctions.getBaseURI(), navigationManagerFunctions.getLocationHref());
3940
await jsInitializer.invokeAfterStartedCallbacks(Blazor);

src/Components/Web.JS/src/Platform/WebView/WebViewIpcReceiver.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export function startIpcReceiver(): void {
4343

4444
'Refresh': navigationManagerFunctions.refresh,
4545

46-
'SetHasLocationChangingListeners': navigationManagerFunctions.setHasLocationChangingListeners,
46+
'SetHasLocationChangingListeners': (hasListeners: boolean) => {
47+
navigationManagerFunctions.setHasLocationChangingListeners(WebRendererId.WebView, hasListeners);
48+
},
4749

4850
'EndLocationChanging': navigationManagerFunctions.endLocationChanging,
4951
};

src/Components/Web.JS/src/Rendering/StreamingRendering.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class BlazorStreamingUpdate extends HTMLElement {
6060
// The URL was already updated on the original link click. Replace so that 'back' goes to the pre-redirection location.
6161
history.replaceState(null, '', destinationUrl);
6262
}
63-
performEnhancedPageLoad(destinationUrl);
63+
performEnhancedPageLoad(destinationUrl, /* interceptedLink */ false);
6464
} else {
6565
// Same reason for varying as above
6666
if (isFormPost) {

src/Components/Web.JS/src/Services/NavigationEnhancement.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
import { synchronizeDomContent } from '../Rendering/DomMerging/DomSync';
5-
import { attachProgrammaticEnhancedNavigationHandler, handleClickForNavigationInterception, hasInteractiveRouter } from './NavigationUtils';
5+
import { attachProgrammaticEnhancedNavigationHandler, handleClickForNavigationInterception, hasInteractiveRouter, notifyEnhancedNavigationListners } from './NavigationUtils';
66

77
/*
88
In effect, we have two separate client-side navigation mechanisms:
@@ -74,7 +74,7 @@ function performProgrammaticEnhancedNavigation(absoluteInternalHref: string, rep
7474
history.pushState(null, /* ignored title */ '', absoluteInternalHref);
7575
}
7676

77-
performEnhancedPageLoad(absoluteInternalHref);
77+
performEnhancedPageLoad(absoluteInternalHref, /* interceptedLink */ false);
7878
}
7979

8080
function onDocumentClick(event: MouseEvent) {
@@ -88,7 +88,7 @@ function onDocumentClick(event: MouseEvent) {
8888

8989
handleClickForNavigationInterception(event, absoluteInternalHref => {
9090
history.pushState(null, /* ignored title */ '', absoluteInternalHref);
91-
performEnhancedPageLoad(absoluteInternalHref);
91+
performEnhancedPageLoad(absoluteInternalHref, /* interceptedLink */ true);
9292
});
9393
}
9494

@@ -97,7 +97,7 @@ function onPopState(state: PopStateEvent) {
9797
return;
9898
}
9999

100-
performEnhancedPageLoad(location.href);
100+
performEnhancedPageLoad(location.href, /* interceptedLink */ false);
101101
}
102102

103103
function onDocumentSubmit(event: SubmitEvent) {
@@ -139,16 +139,19 @@ function onDocumentSubmit(event: SubmitEvent) {
139139
fetchOptions.body = formData;
140140
}
141141

142-
performEnhancedPageLoad(url.toString(), fetchOptions);
142+
performEnhancedPageLoad(url.toString(), /* interceptedLink */ false, fetchOptions);
143143
}
144144
}
145145

146-
export async function performEnhancedPageLoad(internalDestinationHref: string, fetchOptions?: RequestInit) {
146+
export async function performEnhancedPageLoad(internalDestinationHref: string, interceptedLink: boolean, fetchOptions?: RequestInit) {
147147
performingEnhancedPageLoad = true;
148148

149149
// First, stop any preceding enhanced page load
150150
currentEnhancedNavigationAbortController?.abort();
151151

152+
// Notify any interactive runtimes that an enhanced navigation is starting
153+
notifyEnhancedNavigationListners(internalDestinationHref, interceptedLink);
154+
152155
// Now request the new page via fetch, and a special header that tells the server we want it to inject
153156
// framing boundaries to distinguish the initial document and each subsequent streaming SSR update.
154157
currentEnhancedNavigationAbortController = new AbortController();

0 commit comments

Comments
 (0)