diff --git a/finance_tracker/web/app.py b/finance_tracker/web/app.py index ec2b9e5..80b95a7 100644 --- a/finance_tracker/web/app.py +++ b/finance_tracker/web/app.py @@ -11,9 +11,7 @@ financial assets. """ import html as _html -import json import streamlit as st -import streamlit.components.v1 as st_components import os from finance_tracker.web.db import get_session, get_db_path, get_engine from finance_tracker.web.navigation import build_pages @@ -119,71 +117,34 @@ def render_db_manager(): st.rerun() - # Animated ↖ arrow hinting at the sidebar toggle after 20 s of inactivity. + # Animated ↖ arrow pointing at the sidebar toggle, shown only while the + # sidebar is collapsed and after 20 s of inactivity. Pure CSS — no JS, no + # iframe (st.components.v1.html is deprecated and its timers die on every + # Streamlit re-render, which is why earlier JS versions never appeared). # - # Architecture note: both st.html() and st.components.v1.html() render - # inside an iframe. Code in an iframe cannot reliably set long-lived timers - # because the iframe may be destroyed on Streamlit re-renders. The solution - # is to inject a """, height=0) # Show documentation (needs no DB) so users aren't stranded on a blank page from finance_tracker.web.views.documentation import render as doc_render