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

Migrating documentation to .NET 8 - WASM mode #5091

Open
wants to merge 29 commits into
base: rel-1.4
Choose a base branch
from

Conversation

stsrki
Copy link
Collaborator

@stsrki stsrki commented Oct 20, 2023

This PR continues from #4998. I have separated it into a new PR so that we don't mess with the existing work.

It adds support for the new .NET 8 InteractiveAuto render mode. I'm still not sure if it's worth it. The problems that I see:

  • all our secrets would be visible to anyone once the WASM mode is activated
  • there are some bugs that prevent some JS scripts from loading. this might be fixed in the final .NET 8 release.

Overall, it works, but as I said, we need to consider carefully should we move forward with this mode.

@stsrki stsrki changed the title Convert Blazorise.Docs to WASM client Migrating documentation to .NET 8 - WASM mode Oct 20, 2023
@stsrki stsrki requested a review from David-Moreira October 25, 2023 09:33
Copy link
Contributor

@David-Moreira David-Moreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean there aren't too many changes in here... Maybe because it's already on top of a branch that has net8 changes...

If it's working properly, I don't see anything of note.

Build/Blazorise.Docs.props Show resolved Hide resolved
Documentation/Blazorise.Docs/App.razor Show resolved Hide resolved
@David-Moreira
Copy link
Contributor

This PR continues from #4998. I have separated it into a new PR so that we don't mess with the existing work.

It adds support for the new .NET 8 InteractiveAuto render mode. I'm still not sure if it's worth it. The problems that I see:

  • all our secrets would be visible to anyone once the WASM mode is activated
  • there are some bugs that prevent some JS scripts from loading. this might be fixed in the final .NET 8 release.

Overall, it works, but as I said, we need to consider carefully should we move forward with this mode.

I don't think our docs app warrants the need for this. It's a very simple app.
Thing is, if we want to use it just for the sake of being a way for us to get our feet wet on this feature, and also to have it deployed in production, see if we find any flaws.

As for the secrets problem, as any wasm app, they should be moved to server side if they are really sensitive, I don't think we have any, do we? Maybe we do for Blazorise Token? If we do, then that should be moved.

As for the js scripts being prvented of loading, does it still happen? We are in RC so very close to release, I really doubt a fix is coming unless it was reported recently...

@stsrki stsrki self-assigned this Nov 12, 2023
Base automatically changed from rel-1.2-net8-docs-v2 to rel-1.3 November 15, 2023 08:31
@David-Moreira
Copy link
Contributor

David-Moreira commented Jan 1, 2024

Actually on second though, I've changed my mind. Since it's a simple app, it's in fact easier to deploy this, and we can have a app working on interactive auto mode, it's a way for us to have a production app on auto which allows us to have more confidence that auto is working properly. Which is expected to work properly anyway.

There might be less resource usage on our server also, since people would start loading WASM instead.

@stsrki stsrki changed the base branch from rel-1.3 to rel-1.4 January 3, 2024 12:13
@stsrki
Copy link
Collaborator Author

stsrki commented Jan 24, 2024

I have merged the latest 1.4, and trying to finish this PR but I get the error, see below

image


Any chance you could help and see what might be wrong? @David-Moreira

@stsrki
Copy link
Collaborator Author

stsrki commented Jan 24, 2024

As for the secrets problem, as any wasm app, they should be moved to server side if they are really sensitive, I don't think we have any, do we? Maybe we do for Blazorise Token? If we do, then that should be moved.

I don't think we will be able to overcome this. The token will still be visible on wasm mode once it is downloaded. That is something we will need to live with.

That leaves us with only needing to hide secrets for sending emails.

@David-Moreira
Copy link
Contributor

I have merged the latest 1.4, and trying to finish this PR but I get the error, see below

image

Any chance you could help and see what might be wrong? @David-Moreira

That seems like some kind of weird checking, can you try deleting bin, obj, you know the drill... see if it helps.

@David-Moreira
Copy link
Contributor

As for the secrets problem, as any wasm app, they should be moved to server side if they are really sensitive, I don't think we have any, do we? Maybe we do for Blazorise Token? If we do, then that should be moved.

I don't think we will be able to overcome this. The token will still be visible on wasm mode once it is downloaded. That is something we will need to live with.

That leaves us with only needing to hide secrets for sending emails.

In the new mode, wasm mode only downloads the assemblies in the client project as far as I know. So anything from a dll perspective that should be obscured should remain in the server. Although I don't remember exactly what that Blazorise Token is? I'll have to take a look later.

@stsrki
Copy link
Collaborator Author

stsrki commented Jan 24, 2024

Already tried deleting obj and bin folders. I figured the error happens after all wasm files are downloaded and I navigate to another page. It works only on first visit when the app still runs in interactive mode.

@David-Moreira
Copy link
Contributor

David-Moreira commented Jan 30, 2024

@stsrki Any reason why these do not compile?

image

EDIT: Nvm, wrong brnach... that branch name...

@David-Moreira
Copy link
Contributor

@stsrki The issue should be fixed. But now you have to fix the DI for the WASM app. Let me know if you need additional help with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants