question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blazor index.html should mimic the top level site

See original GitHub issue

Rather than

<div id="app">Loading...</div>

the index.html should have

<div id="app">
    <div class="page" b-vehgu10x1i>
        <div class="sidebar" b-vehgu10x1i>
            <div class="top-row pl-4 navbar navbar-dark" b-sjoxlt10a7></div>
        </div>
        <div class="main" b-vehgu10x1i>
            <div class="top-row px-4" b-vehgu10x1i></div>
            <div class="content px-4" b-vehgu10x1i>Loading...</div>
        </div>
    </div>
</div>

I was going to make a change to the template; however with the scoped css https://github.com/dotnet/aspnetcore/pull/24380 it additionally needs the specific attribute for the css to work (e.g. b-vehgu10x1i and b-sjoxlt10a7 above); which I’m not sure how to do.

This change means while the page is loading assets rather than starting as

image

It instead starts at

image

Which is both less bleak and a less jarring transition to

image

It also makes the experience perceptively seem to load faster

/cc @javiercn @SteveSandersonMS @mkArtakMSFT

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
khalidabuhakmehcommented, Aug 14, 2020

May I suggest a spinner instead of ...? https://getbootstrap.com/docs/4.4/components/spinners/

<div id="app">
    <div class="page" b-vehgu10x1i>
        <div class="sidebar" b-vehgu10x1i>
            <div class="top-row pl-4 navbar navbar-dark" b-sjoxlt10a7></div>
        </div>
        <div class="main" b-vehgu10x1i>
            <div class="top-row px-4" b-vehgu10x1i></div>
            <div class="content px-4" b-vehgu10x1i>
                <div class="spinner-border text-primary" role="status">
                    <span class="sr-only">Loading...</span>
                </div>
            </div>
        </div>
    </div>
</div>
0reactions
TanayParikhcommented, Jun 6, 2022

Thanks all for the input, I’m going to close this out in favor of https://github.com/dotnet/aspnetcore/issues/37199 which covers the Blazor WASM initial loading story.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is there a <base href="/" /> in Blazor's index.html or ...
From here. The app base path is the app's root URL path. Consider the following ASP.NET Core app and Blazor sub-app: The ASP....
Read more >
ASP.NET Core Blazor routing and navigation
Learn how to manage Blazor app request routing and how to use the ... component sets the focus to the page's top-level header...
Read more >
Improve Default Blazor WASM Loading Experience #37199
Currently, when opening a Blazor Wasm app, the user sees Loading... till ... Blazor index.html should mimic the top level site #24910.
Read more >
Cant directly go to a different blazor page : r/dotnet
I have a blazor webassembly app (hosted on github pages) that I resolved this issue in. You need to: Add this to your...
Read more >
How to fix Blazor WASM base path problems - elmah.io Blog
But Blazor WASM applications are still Single Page Applications (SPAs) at ... that suggest setting the base path in wwwwroot/index.html .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found