Skip to content

fix(visualiser): remove external Google Fonts @import for offline environments - #3476

Open
reginaldalfret wants to merge 1 commit into
spotify:masterfrom
reginaldalfret:fix/issue-3347-adminlte-offline-font-family
Open

reginaldalfret wants to merge 1 commit into
spotify:masterfrom
reginaldalfret:fix/issue-3347-adminlte-offline-font-family

Conversation

@reginaldalfret

Copy link
Copy Markdown

Description

\luigi/static/visualiser/lib/AdminLTE/css/AdminLTE.min.css\ started with an @import url(https://fonts.googleapis.com/...);\ directive. In offline, firewalled, or air-gapped environments without external internet connectivity, browser rendering of the Luigi task visualiser interface stalls for a long period while waiting for the remote font request to time out.

Solution

Remove the remote @import url(https://fonts.googleapis.com/...)\ stylesheet from AdminLTE.min.css. AdminLTE already specifies a fallback typography stack ('Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif), allowing the page to render instantly without external network dependencies.

Fixes #3347.

AdminLTE.min.css included an @import url(https://fonts.googleapis.com/...) stylesheet dependency. In isolated/offline environments without direct internet access or in firewalled internal enterprise clusters, the browser hangs attempting to load the Google Fonts stylesheet before timing out, causing severe delays loading the visualizer web interface.

AdminLTE's body rule already specifies a resilient system font fallback stack ('Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif). Removing this external network request allows the visualizer to load immediately in air-gapped and offline setups.

Fixes spotify#3347

Signed-off-by: reginaldalfret <reginaldalfret@gmail.com>

@Manishram-ai Manishram-ai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good. Every place in this file that uses Source Sans Pro already falls back to a system font, so removing the import doesn't break anything. The page will just use the system font when Source Sans Pro isn't installed, and I think that's fine if it means the page doesn't hang offline.

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.

Disable Google fonts download for offline use

2 participants