You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation is not accurate for a Windows Forms project (net7.0-windows) that hosts a razor component -- from an RCL -- in a BlazorWebView.
"The hart [sic] of this library is formed by the Fluent UI Web Components and the accompanying web-components.min.js file. From version 2.3 onwards, the script is included in the library itself and no longer needs to be added to your index.html or _Layout.cshtml. In fact, doing this might lead to unpredictable results."
💁 Possible Solution
A reference to the web-components.min.js file must be included in the wwwroot/index.html file of a Windows Forms project when hosting Razor components from a Razor Component Library (RCL) in a BlazorWebView. If the javascript file is not included, the FluentUI styling is not applied.
Styles are not applied for 2.4.2 whether web-components.min.js is included or not.
However, styles are applied to FluentUI 2.4.2 when web-components-v2.5.16.min.js is included, but styles will no longer load for 2.3.*, 2.4.1 and 3.0.0-RC.1.
See #633 (comment) on why the script is not being included automatically
On the web-components script file...
Starting with version 2.4.2, we added a version part to the (automatically loaded) web components script. So it will show up, in DevTools for example <script type="module" src="_content/Microsoft.Fast.Components.FluentUI/js/web-components-v2.5.16.min.js"></script>
Versions before will still have <script type="module" src="_content/Microsoft.Fast.Components.FluentUI/js/web-components.min.js"></script>
In v3 we will also add this version part to the script BUT that has not been done yet for the RC1 version/package. Any newer versions will have the version appended.
🙋 Documentation Request
The documentation is not accurate for a Windows Forms project (net7.0-windows) that hosts a razor component -- from an RCL -- in a BlazorWebView.
"The hart [sic] of this library is formed by the Fluent UI Web Components and the accompanying web-components.min.js file. From version 2.3 onwards, the script is included in the library itself and no longer needs to be added to your index.html or _Layout.cshtml. In fact, doing this might lead to unpredictable results."
💁 Possible Solution
A reference to the web-components.min.js file must be included in the wwwroot/index.html file of a Windows Forms project when hosting Razor components from a Razor Component Library (RCL) in a BlazorWebView. If the javascript file is not included, the FluentUI styling is not applied.
<script type="module" src="_content/Microsoft.Fast.Components.FluentUI/js/web-components.min.js"></script>
Tested 2.3.*, 2.4.1, 2.4.2 and 3.0.0-RC.1
Styles are not applied for 2.4.2 whether web-components.min.js is included or not.
However, styles are applied to FluentUI 2.4.2 when web-components-v2.5.16.min.js is included, but styles will no longer load for 2.3.*, 2.4.1 and 3.0.0-RC.1.
<script type="module" src="_content/Microsoft.Fast.Components.FluentUI/js/web-components-v2.5.16.min.js"></script>
The text was updated successfully, but these errors were encountered: