Skip to content

[Components] Feedback & Reconnect Logic (broken if state is lost) & Internationalization #9737

@schmitch

Description

@schmitch

Hello, currently I'm toying around with Razor Components Server-Side and found the following things when using it with Razor Pages:

  1. If the Server looses a Connection all Messages will be in englisch, currently there should be a way to change that.
  2. reconnect will actually make the whole page unusable, mostly only certain "widgets" should be made unusable. i.e. only the RenderComponentAsync might be unavailable so the rest of the page can still be visible.
  3. reconnect does not work if the state on the signalr is completly lost, the reconnect button just does not work. (if that would be configurable, one could decide to just throw away everything and re-render, this is ok, if the page just contains a small widget that isn't so necessary, or if it is a Datepicker, i.e. the state might be not that necessary)
  4. automatic reconnect is not possible (https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.0#improved-signalr-connection-lifetime-handling) withAutomaticReconnect is not available.

I Basically created a small Home Razor Page and tried to run it from Razor Pages (Home.cshtml + Home.cshtml.cs and added endpoints.MapRazorPages()):

Hase

@(await Html.RenderComponentAsync<Counter>())

<script src="_framework/blazor.server.js" autostart="false"></script>
<script>
  Blazor.start({
    configureSignalR: function (builder) {
      builder.configureLogging(2); // LogLevel.Information
      // builder.withAutomaticReconnect(); // this breaks the site
    }
  });
</script>

Most stuff is working, it's just these "small" issues.
Besides that it's just awesome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions