Remove Hamburger Menu from Desktop App
The desktop app deployment is pretty slick. I'm currently using this code to hide the hamburger menu in my streamlit app:
hide_menu_style = """
<style>
#MainMenu {visibility: hidden;}
</style>
"""
st.markdown(hide_menu_style, unsafe_allow_html=True)
However, I've noticed that while stlite is loading, the hamburger menu still displays until the loading is finished. Is there any work around for this? It would make the deployed app look a lot cleaner. For that matter a custom loading screen would be nice in general.
I hope this will be solved at the Streamlit core as this comment in the issue requests 9 days ago: https://github.com/streamlit/streamlit/issues/5141#issuecomment-1269111426 So let us keep looking at what is going on in the issue for a while. The frontend of stlite is a fork of the upstream Streamlit repository, so I want to keep the diff as small as possible. If there will be no progress, I will consider implementing it at the stlite level again.
FYI, there are 2 issues at the Streamlit repository being opened while the officially announced solution is what you posted above 😢.
- https://github.com/streamlit/streamlit/issues/395
- https://github.com/streamlit/streamlit/issues/5141
Dev note:
Adding the embed=true URL query param to this (https://github.com/whitphx/stlite/blob/2b00b4075df8fd824ef50b3051941ee1f6b8b5cd/packages/desktop/electron/main.ts#L30-L31) works.
So we will add a config field to enable it.