Skip to content

Commit e009bab

Browse files
authored
Merge pull request #34413 from dotnet/main
2 parents c09d3fc + 5c3c045 commit e009bab

File tree

16 files changed

+68
-72
lines changed

16 files changed

+68
-72
lines changed

.github/workflows/blazor-hybrid-issue-processing.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,9 @@ jobs:
1717
issue_number: context.issue.number,
1818
owner: context.repo.owner,
1919
repo: context.repo.repo,
20-
body: `### 🍂🎁 **_Happy Holidays!_** ❄️⛄
20+
body: `### 💃🕺🥳 **_Happy New Year!_** 🎈🎆🍾🥂🎉
2121
22-
This issue has been marked for triage on the Blazor Hybrid Docs GitHub project, and we'll respond as soon as we return from the holiday vacation after New Year's.
23-
24-
We only work on documentation on this repo. If you need product support, close this issue and seek assistance through one or more of the following support channels:
25-
26-
* [Stack Overflow (tagged: 'blazor')](https://stackoverflow.com/questions/tagged/blazor)
27-
* [General ASP.NET Core Slack Team](https://aspnetcore.slack.com/join/shared_invite/zt-1mv5487zb-EOZxJ1iqb0A0ajowEbxByQ#/shared-invite/email)
28-
* [Blazor Gitter](https://gitter.im/aspnet/Blazor)
29-
30-
If you think that you found a potential bug in the framework or have product feedback, close this issue and open a new issue for the ASP.NET Core product unit at [dotnet/aspnetcore issues](https://github.com/dotnet/aspnetcore/issues). Bug reports require a clear explanation of the problem, usually including a minimal repro project placed on GitHub for the product unit engineers to download and run. If you determine with the product unit that it isn't a bug but merely requires documentation, please re-open this docs issue and place a cross-link to your engineering issue discussion.
31-
32-
For problems or feedback on Visual Studio, close this issue and use the [**Report a Problem**](https://docs.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio) or [**Suggest a Feature**](https://docs.microsoft.com/visualstudio/ide/suggest-a-feature) processes from within VS, which open internal issues for the VS product unit. For more information, see [Visual Studio Feedback](https://developercommunity.visualstudio.com/home).
33-
34-
For problems with Visual Studio Code, close this issue and ask for support on community support forums. For bug reports and product feedback, open an issue on the [microsoft/vscode GitHub repo](https://github.com/microsoft/vscode/issues).
35-
36-
💃🕺🥳 **_Happy New Year!_** 🎈🎆🍾🥂🎉 **_See you in 2025!_**`
22+
A green dinosaur 🦖 will be along shortly to assist. *Stand-by ........*`
3723
})
3824
await github.rest.issues.addLabels({
3925
issue_number: context.issue.number,

.github/workflows/blazor-issue-processing.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,9 @@ jobs:
2222
issue_number: context.issue.number,
2323
owner: context.repo.owner,
2424
repo: context.repo.repo,
25-
body: `### 🍂🎁 **_Happy Holidays!_** ❄️⛄
25+
body: `### 💃🕺🥳 **_Happy New Year!_** 🎈🎆🍾🥂🎉
2626
27-
This issue has been marked for triage on the Blazor Docs GitHub project, and I'll respond as soon as I return from the holiday vacation after New Year's.
28-
29-
We only work on documentation on this repo. If you need product support, close this issue and seek assistance through one or more of the following support channels:
30-
31-
* [Stack Overflow (tagged: 'blazor')](https://stackoverflow.com/questions/tagged/blazor)
32-
* [General ASP.NET Core Slack Team](https://aspnetcore.slack.com/join/shared_invite/zt-1mv5487zb-EOZxJ1iqb0A0ajowEbxByQ#/shared-invite/email)
33-
* [Blazor Gitter](https://gitter.im/aspnet/Blazor)
34-
35-
If you think that you found a potential bug in the framework or have product feedback, close this issue and open a new issue for the ASP.NET Core product unit at [dotnet/aspnetcore issues](https://github.com/dotnet/aspnetcore/issues). Bug reports require a clear explanation of the problem, usually including a minimal repro project placed on GitHub for the product unit engineers to download and run. If you determine with the product unit that it isn't a bug but merely requires documentation, please re-open this docs issue and place a cross-link to your engineering issue discussion.
36-
37-
For problems or feedback on Visual Studio, close this issue and use the [**Report a Problem**](https://docs.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio) or [**Suggest a Feature**](https://docs.microsoft.com/visualstudio/ide/suggest-a-feature) processes from within VS, which open internal issues for the VS product unit. For more information, see [Visual Studio Feedback](https://developercommunity.visualstudio.com/home).
38-
39-
For problems with Visual Studio Code, close this issue and ask for support on community support forums. For bug reports and product feedback, open an issue on the [microsoft/vscode GitHub repo](https://github.com/microsoft/vscode/issues).
40-
41-
💃🕺🥳 **_Happy New Year!_** 🎈🎆🍾🥂🎉 **_See you in 2025!_**`
27+
*Stand-by!* ... A green dinosaur 🦖 will be along shortly to assist.`
4228
})
4329
await github.rest.issues.addLabels({
4430
issue_number: context.issue.number,

aspnetcore/blazor/forms/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ A form is defined using the Blazor framework's <xref:Microsoft.AspNetCore.Compon
114114

115115
In the preceding `Starship1` component:
116116

117-
* The <xref:Microsoft.AspNetCore.Components.Forms.EditForm> component is rendered where the `<EditForm>` element appears. The form is named with the [`@formname`](xref:mvc/views/razor#formname) directive attribute, which uniquely identifies the form to the Blazor framework.
117+
* The <xref:Microsoft.AspNetCore.Components.Forms.EditForm> component is rendered where the `<EditForm>` element appears. The form is named with the <xref:Microsoft.AspNetCore.Components.Forms.EditForm.FormName> property, which uniquely identifies the form to the Blazor framework.
118118
* The model is created in the component's `@code` block and held in a public property (`Model`). The property is assigned to the <xref:Microsoft.AspNetCore.Components.Forms.EditForm.Model?displayProperty=nameWithType> parameter. The `[SupplyParameterFromForm]` attribute indicates that the value of the associated property should be supplied from the form data. Data in the request that matches the property's name is bound to the property.
119119
* The <xref:Microsoft.AspNetCore.Components.Forms.InputText> component is an [input component](xref:blazor/forms/input-components) for editing string values. The `@bind-Value` directive attribute binds the `Model.Id` model property to the <xref:Microsoft.AspNetCore.Components.Forms.InputText> component's <xref:Microsoft.AspNetCore.Components.Forms.InputBase%601.Value%2A> property.
120120
* The `Submit` method is registered as a handler for the <xref:Microsoft.AspNetCore.Components.Forms.EditForm.OnSubmit> callback. The handler is called when the form is submitted by the user.
121121

122122
> [!IMPORTANT]
123-
> Always use the [`@formname`](xref:mvc/views/razor#formname) directive attribute with a unique form name.
123+
> Always use the <xref:Microsoft.AspNetCore.Components.Forms.EditForm.FormName> property with a unique form name.
124124
125125
Blazor enhances page navigation and form handling for <xref:Microsoft.AspNetCore.Components.Forms.EditForm> components. For more information, see <xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling>.
126126

aspnetcore/blazor/globalization-localization.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,6 @@ For information on ordering the Localization Middleware in the middleware pipeli
276276

277277
Use the `CultureExample1` component shown in the [Demonstration component](#demonstration-component) section to study how globalization works. Issue a request with United States English (`en-US`). Switch to Costa Rican Spanish (`es-CR`) in the browser's language settings. Request the webpage again.
278278

279-
> [!NOTE]
280-
> Some browsers force you to use the default language setting for both requests and the browser's own UI settings. This can make changing the language back to one that you understand difficult because all of the setting UI screens might end up in a language that you can't read. A browser such as [Opera](https://www.opera.com/download) is a good choice for testing because it permits you to set a default language for webpage requests but leave the browser's settings UI in your language.
281-
282279
When the culture is United States English (`en-US`), the rendered component uses month/day date formatting (`6/7`), 12-hour time (`AM`/`PM`), and comma separators in numbers with a dot for the decimal value (`1,999.69`):
283280

284281
* **Date**: 6/7/2021 6:45:22 AM

aspnetcore/blazor/hosting-models.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,18 @@ In a traditional server-rendered app, opening the same app in multiple browser s
5050

5151
![The browser interacts with Blazor (hosted inside of an ASP.NET Core app) on the server over a SignalR connection.](~/blazor/hosting-models/_static/blazor-server.png)
5252

53+
:::moniker range=">= aspnetcore-10.0"
54+
55+
On the client, the Blazor script establishes the SignalR connection with the server. The script is served as a static web asset with automatic compression and [fingerprinting](https://developer.mozilla.org/docs/Glossary/Fingerprinting).
56+
57+
:::moniker-end
58+
59+
:::moniker range="< aspnetcore-10.0"
60+
5361
On the client, the Blazor script establishes the SignalR connection with the server. The script is served from an embedded resource in the ASP.NET Core shared framework.
5462

63+
:::moniker-end
64+
5565
The Blazor Server hosting model offers several benefits:
5666

5767
* Download size is significantly smaller than when the Blazor WebAssembly hosting model is used, and the app loads much faster.
@@ -97,8 +107,8 @@ A Blazor WebAssembly app built as a [Progressive Web App (PWA)](xref:blazor/prog
97107

98108
The Blazor script handles:
99109

100-
* Downloading the .NET runtime, Razor components, and the component's dependencies.
101-
* Initialization of the runtime.
110+
* Downloading the .NET runtime, Razor components, and dependencies.
111+
* Runtime initialization.
102112

103113
The size of the published app, its *payload size*, is a critical performance factor for an app's usability. A large app takes a relatively long time to download to a browser, which diminishes the user experience. Blazor WebAssembly optimizes payload size to reduce download times:
104114

aspnetcore/blazor/includes/js-interop/js-collocation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ export function showPrompt2(message) {
152152
}
153153
```
154154

155+
> [!IMPORTANT]
156+
> Don't place a `<script>` tag for `JsCollocation2.razor.js` after the [Blazor script](xref:blazor/project-structure#location-of-the-blazor-script) because the module is loaded and cached automatically when the [dynamic `import()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/import) is invoked.
157+
155158
Use of scripts and modules for collocated JS in a Razor class library (RCL) is only supported for Blazor's JS interop mechanism based on the <xref:Microsoft.JSInterop.IJSRuntime> interface. If you're implementing [JavaScript `[JSImport]`/`[JSExport]` interop](xref:blazor/js-interop/import-export-interop), see <xref:blazor/js-interop/import-export-interop#razor-class-library-rcl-collocated-js-is-unsupported>.
156159

157160
For scripts or modules provided by a Razor class library (RCL) using <xref:Microsoft.JSInterop.IJSRuntime>-based JS interop, the following path is used:

aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ In the preceding example:
623623
* The path segment for the current directory (`./`) is required in order to create the correct static asset path to the JS file.
624624
* The `{SCRIPT PATH AND FILE NAME (.js)}` placeholder is the path and file name under `wwwroot`.
625625
* Disposes the <xref:Microsoft.JSInterop.IJSObjectReference> for [garbage collection](xref:blazor/components/lifecycle#asynchronous-iasyncdisposable) in <xref:System.IAsyncDisposable.DisposeAsync%2A?displayProperty=nameWithType>.
626+
* Don't place a `<script>` tag for the script after the [Blazor script](xref:blazor/project-structure#location-of-the-blazor-script) because the module is loaded and cached automatically when the [dynamic `import()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/import) is invoked.
626627

627628
Dynamically importing a module requires a network request, so it can only be achieved asynchronously by calling <xref:Microsoft.JSInterop.IJSRuntime.InvokeAsync%2A>.
628629

aspnetcore/blazor/javascript-interoperability/location-of-javascript.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Load JavaScript (JS) code using any of the following approaches:
3333

3434
:::moniker-end
3535

36+
Inline JavaScript isn't recommended for Blazor apps. We recommend using [JS collocation](#load-a-script-from-an-external-javascript-file-js-collocated-with-a-component) combined with [JS modules](#javascript-isolation-in-javascript-modules).
37+
3638
## Location of `<script>` tags
3739

3840
:::moniker range=">= aspnetcore-8.0"

aspnetcore/blazor/project-structure.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,18 @@ The project structure of the client-side app in a hosted Blazor Webassembly solu
536536

537537
## Location of the Blazor script
538538

539+
:::moniker range=">= aspnetcore-10.0"
540+
541+
The Blazor script is served as a static web asset with automatic compression and fingerprinting. For more information, see <xref:blazor/fundamentals/static-files>.
542+
543+
:::moniker-end
544+
545+
:::moniker range="< aspnetcore-10.0"
546+
539547
The Blazor script is served from an embedded resource in the ASP.NET Core shared framework.
540548

549+
:::moniker-end
550+
541551
:::moniker range=">= aspnetcore-8.0"
542552

543553
In a Blazor Web App, the Blazor script is located in the `Components/App.razor` file:

0 commit comments

Comments
 (0)