jrieke / streamlit-pills

💊 A Streamlit component to show clickable pills/badges
Apache License 2.0
83 stars 19 forks source link

Remove external render blocking dependencies? #7

Open voidel opened 1 year ago

voidel commented 1 year ago

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:

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?