Skip to content

Remove external Google Fonts dependency from Blazor host page#92

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/remove-google-fonts-request
Closed

Remove external Google Fonts dependency from Blazor host page#92
Copilot wants to merge 2 commits into
mainfrom
copilot/remove-google-fonts-request

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Removes the render-blocking Google Fonts stylesheet from the Blazor host page and uses platform-local fonts for the Blazor UI.

  • What changed

    • Removed the Google Fonts stylesheet link from JournalApp/wwwroot/index.html
    • Switched the splash/loading text to a platform font stack in JournalApp/wwwroot/app.css
    • Set MudBlazor's default typography to the same platform font stack in JournalApp/Pages/MainLayout.razor
  • Why

    • Avoids a startup network dependency on fonts.googleapis.com / fonts.gstatic.com
    • Avoids blocking early WebView rendering on a remote stylesheet request
    • Keeps the optimization honest: MAUI AddFont registers Roboto-Regular.ttf for MAUI controls, but it does not expose that font as a CSS web font inside Blazor's wwwroot
  • Validation

    • dotnet test F:\source\repos\JournalApp\JournalApp.sln --no-restore
      • Passed: 188
      • Skipped: 1
      • Failed: 0

Refs #91.

Copilot AI changed the title Remove external Google Fonts request Remove external Google Fonts dependency from Blazor host page Jun 16, 2026
Copilot AI requested a review from danielchalmers June 16, 2026 20:20

Copy link
Copy Markdown
Owner

After reconsidering this in the context of #91 and the product requirement that the app should use Roboto on all platforms, I do not think we should merge this PR as the startup optimization.

Why:

  • The Android launch logs point to much larger measured startup costs in database preparation and seeding, especially the EF pending migration check and category/debug seed paths.
  • This font change is speculative by comparison; we do not have evidence from the launch logs that Google Fonts is a material part of the multi-second splash delay.
  • On Android specifically, Roboto is already the platform font, so removing the Google Fonts request is unlikely to be the change that materially fixes Android startup responsiveness.
  • On non-Android platforms, removing the Google Fonts stylesheet without adding a web-visible local @font-face means the Blazor WebView no longer reliably uses Roboto. My follow-up system-font-stack commit makes that behavior explicit, but it conflicts with the stated goal of using Roboto everywhere.

Recommendation: close this PR without merging. If we later want to remove the network dependency while preserving Roboto across all platforms, that should be a separate self-hosted-font PR that adds the needed Roboto web font assets under wwwroot and wires them with @font-face. For #91, the next optimization work should stay focused on the measured startup database costs.

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