chore: migrate use_container_width → width (Streamlit deprecation)

``use_container_width`` is being removed after 2025-12-31. Streamlit
log was flooding the terminal with the deprecation notice on every
rerun. Mechanical sweep:

  use_container_width=True   →  width="stretch"
  use_container_width=False  →  width="content"

51 call sites across 11 page files + ``app_demo.py``. Also renamed
the ``local_download_button`` helper's ``use_container_width`` kwarg
to ``width`` (default ``"stretch"``); it has no external callers
passing the old name, so this is a safe rename.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-18 22:43:52 +00:00
parent e011c0b6e6
commit 61e63913cb
12 changed files with 54 additions and 54 deletions

View File

@@ -119,7 +119,7 @@ with st.expander(f"Preview: {uploaded.name}", expanded=not _has_result):
if preview_show_hidden:
render_hidden_aware_preview(df, n_rows=10)
else:
st.dataframe(df.head(10), use_container_width=True)
st.dataframe(df.head(10), width="stretch")
st.divider()
@@ -213,7 +213,7 @@ with st.expander("Options", expanded=not _has_result):
st.divider()
if st.button("Clean Text", type="primary", use_container_width=True):
if st.button("Clean Text", type="primary", width="stretch"):
with st.spinner("Cleaning..."):
try:
result = clean_dataframe(df, options)
@@ -280,7 +280,7 @@ if result.cells_changed:
st.markdown("**Changes by column**")
st.dataframe(
counts.rename("cells_changed").to_frame(),
use_container_width=True,
width="stretch",
)
st.markdown("**Examples (first 25 changes)**")
@@ -326,7 +326,7 @@ if result.cells_changed:
unsafe_allow_html=True,
)
else:
st.dataframe(examples, use_container_width=True, hide_index=True)
st.dataframe(examples, width="stretch", hide_index=True)
st.markdown("**Cleaned preview (first 10 rows)**")
# Reuse the same toggle the Examples table uses so the user controls both
@@ -334,7 +334,7 @@ st.markdown("**Cleaned preview (first 10 rows)**")
if show_hidden:
render_hidden_aware_preview(result.cleaned_df, n_rows=10)
else:
st.dataframe(result.cleaned_df.head(10), use_container_width=True)
st.dataframe(result.cleaned_df.head(10), width="stretch")
# ---------------------------------------------------------------------------
# Downloads