diff --git a/src/gui/components/_legacy.py b/src/gui/components/_legacy.py index 28bf1a8..a23c2f5 100644 --- a/src/gui/components/_legacy.py +++ b/src/gui/components/_legacy.py @@ -781,8 +781,7 @@ a[data-testid="stPageLink"][href$="/close/"] { except Exception: pass - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( f""" """, - height=0, + height=1, ) @@ -881,7 +880,7 @@ def _render_sticky_footer_DISABLED() -> None: 1. ``st.markdown`` injects the CSS rules into the parent document. Class-targeted, so the rules apply once the footer DOM node exists regardless of where it lives. - 2. ``streamlit.components.v1.html`` renders a zero-height iframe + 2. ``st.iframe`` renders a zero-height iframe whose JS reaches ``window.parent.document`` and creates / moves a ``#datatools-sticky-footer`` div directly under ``
``. This bypasses every Streamlit container. @@ -951,8 +950,7 @@ def _render_sticky_footer_DISABLED() -> None: # reachable; if a sandbox config ever blocks that we fall back to # rendering inside the iframe itself (still visible, just sized # to the iframe rather than the viewport). - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( f""" """, - height=0, + height=1, ) @@ -1058,8 +1056,7 @@ def shutdown_app() -> None: threading.Thread(target=_hard_exit, daemon=True).start() - from streamlit.components.v1 import html as _components_html - _components_html(_farewell_script(), height=0) + st.iframe(_farewell_script(), height=1) st.success(_t("quit.shutting_down")) st.stop() diff --git a/src/gui/pages/1_Deduplicator.py b/src/gui/pages/1_Deduplicator.py index 1a75baa..f9399a9 100644 --- a/src/gui/pages/1_Deduplicator.py +++ b/src/gui/pages/1_Deduplicator.py @@ -414,8 +414,7 @@ else: # triggered by unrelated widgets in the Results section don't yank the # viewport back to the top of Results. if st.session_state.pop("_dedup_scroll_to_results", False): - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( """ """, - height=0, + height=1, ) diff --git a/src/gui/pages/2_Text_Cleaner.py b/src/gui/pages/2_Text_Cleaner.py index a3248cb..9810c8c 100644 --- a/src/gui/pages/2_Text_Cleaner.py +++ b/src/gui/pages/2_Text_Cleaner.py @@ -400,8 +400,7 @@ with dl_c: # unrelated widgets in the Results section (e.g., the Show-hidden # toggle) don't yank the viewport back to the top of Results. if st.session_state.pop("_textclean_scroll_to_results", False): - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( """ """, - height=0, + height=1, ) diff --git a/src/gui/pages/3_Format_Standardizer.py b/src/gui/pages/3_Format_Standardizer.py index eb2960c..dcaf139 100644 --- a/src/gui/pages/3_Format_Standardizer.py +++ b/src/gui/pages/3_Format_Standardizer.py @@ -670,8 +670,7 @@ with dl_c: # unrelated widgets in the Results section don't yank the viewport back # to the top of Results. if st.session_state.pop("_fmtstd_scroll_to_results", False): - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( """ """, - height=0, + height=1, ) diff --git a/src/gui/pages/4_Missing_Values.py b/src/gui/pages/4_Missing_Values.py index ba7dd06..91e5180 100644 --- a/src/gui/pages/4_Missing_Values.py +++ b/src/gui/pages/4_Missing_Values.py @@ -433,8 +433,7 @@ with dl_c: # unrelated widgets in the Results section don't yank the viewport # back to the top of Results. if st.session_state.pop("_missing_scroll_to_results", False): - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( """ """, - height=0, + height=1, ) diff --git a/src/gui/pages/5_Column_Mapper.py b/src/gui/pages/5_Column_Mapper.py index 20c9412..28667d0 100644 --- a/src/gui/pages/5_Column_Mapper.py +++ b/src/gui/pages/5_Column_Mapper.py @@ -476,8 +476,7 @@ with dl_c: # unrelated widgets in the Results section don't yank the viewport back # to the top of Results. if st.session_state.pop("_colmap_scroll_to_results", False): - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( """ """, - height=0, + height=1, ) diff --git a/src/gui/pages/9_Pipeline_Runner.py b/src/gui/pages/9_Pipeline_Runner.py index 09a87d5..fd02dfd 100644 --- a/src/gui/pages/9_Pipeline_Runner.py +++ b/src/gui/pages/9_Pipeline_Runner.py @@ -434,8 +434,7 @@ with dl_c: # unrelated widgets in the Results section don't yank the viewport # back to the top of Results. if st.session_state.pop("_pipeline_scroll_to_results", False): - from streamlit.components.v1 import html as _components_html - _components_html( + st.iframe( """ """, - height=0, + height=1, )