Skip to content
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

docs: fix - web-components.min.js must be added for Windows Forms/BlazorWebView/RCL combination #631

Closed
hml-coder opened this issue Aug 20, 2023 · 2 comments
Labels
closed:not-actionable There is no action to be taken in response to this issue.

Comments

@hml-coder
Copy link

hml-coder commented Aug 20, 2023

🙋 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>

@vnbaaij
Copy link
Collaborator

vnbaaij commented Aug 21, 2023

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.

Hope this clears up some confusion..,

@vnbaaij vnbaaij added the closed:not-actionable There is no action to be taken in response to this issue. label Aug 21, 2023
@vnbaaij
Copy link
Collaborator

vnbaaij commented Aug 21, 2023

@vnbaaij vnbaaij closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:not-actionable There is no action to be taken in response to this issue.
Projects
None yet
Development

No branches or pull requests

2 participants