TangleSpace / hydralit

A library to create multi-page Streamlit applications with ease.
Apache License 2.0
202 stars 19 forks source link

How to change the default big loader? #26

Closed DucoBouter closed 2 years ago

DucoBouter commented 2 years ago

I'm making a streamlit app based on the hydralit-example: https://github.com/TangleSpace/hydralit-example

My app loads some data at first from database. While this is happening a rather large loading screen is present. image

How can I tame this loader and select a more compact one?

The structure of the code I use for the app-page: import hydralit as hy import pandas as pd import streamlit as st

create a wrapper class

class generate_app_page(hy.HydraHeadApp): def run(self): col1, col2 = hy.columns([2,4]) msr = col1.selectbox('some nice label', get_ids_from_db())

ryanblumenow commented 2 years ago

You could try the solution recommended to me by the author in this: https://github.com/TangleSpace/hydralit/issues/23

updaun commented 2 years ago

/opt/conda/lib/python3.8/site-packages/hydralit/loading_app.py

image

you can change this line!

I finally found it.

TangleSpace commented 2 years ago

version 1.0.13 added the use_loader=False parameter so you can just by-pass the loader app entirely. if you want to create a completely custom app transition experience, just create a custom loader as per the details in the example repo.

https://github.com/TangleSpace/hydralit-example

image