jrieke / streamlit-pills

💊 A Streamlit component to show clickable pills/badges

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove external render blocking dependencies?

voidel opened this issue · comments

commented

Currently using Streamlit in an air-gapped system (no external network access).

The component takes a long time to render (~10s), Streamlit flags that the component is taking a while to load. Eventually the component loads and a few errors are shot into the browser console.

The following resource cannot be loaded:

  • http://fonts.googleapis.com/css?family=Source+Sans+Pro

Further investigating, this resource is listed in the file streamlit_pills/frontend/public/index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>streamlit-pills</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta name="description" content="streamlit-pills" />
    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'> <----
    <link rel="stylesheet" type="text/css" href="./styles.css" />
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
  </body>
</html>

Is this external dependency required? Can the component not just utilise the locally bundled Source Sans Pro within Streamlit?