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:
@@ -215,7 +215,7 @@ def _render_diagnostics_sidebar() -> None:
|
||||
"📂 Open log folder",
|
||||
key="_diag_open_logs",
|
||||
type="secondary",
|
||||
use_container_width=True,
|
||||
width="stretch",
|
||||
):
|
||||
opened = _open_in_file_manager(audit_log_dir(), select=log_path)
|
||||
if not opened:
|
||||
@@ -448,7 +448,7 @@ def local_download_button(
|
||||
mime: str = "application/octet-stream", # noqa: ARG001 — kept for API compat
|
||||
disabled: bool = False,
|
||||
help: str | None = None,
|
||||
use_container_width: bool = True,
|
||||
width: str = "stretch",
|
||||
) -> None:
|
||||
"""Save bytes directly to the user's Downloads folder.
|
||||
|
||||
@@ -497,7 +497,7 @@ def local_download_button(
|
||||
disabled=disabled,
|
||||
help=help,
|
||||
type="secondary",
|
||||
use_container_width=use_container_width,
|
||||
width=width,
|
||||
)
|
||||
|
||||
if clicked:
|
||||
@@ -1412,7 +1412,7 @@ def match_group_card(
|
||||
return styles
|
||||
|
||||
styled = compare_df.style.apply(_highlight_diffs, axis=0)
|
||||
st.dataframe(styled, use_container_width=True)
|
||||
st.dataframe(styled, width="stretch")
|
||||
|
||||
if len(keep_indices) == n_rows:
|
||||
st.info("Decision: Kept All")
|
||||
@@ -1470,7 +1470,7 @@ def match_group_card(
|
||||
editor_df,
|
||||
column_config=col_config,
|
||||
disabled=disabled_cols,
|
||||
use_container_width=True,
|
||||
width="stretch",
|
||||
hide_index=True,
|
||||
key=f"editor_{gid}",
|
||||
)
|
||||
@@ -1514,7 +1514,7 @@ def match_group_card(
|
||||
columns=["Keep"],
|
||||
).reset_index(drop=True)
|
||||
st.markdown("**Surviving rows preview:**")
|
||||
st.dataframe(preview, use_container_width=True, hide_index=True)
|
||||
st.dataframe(preview, width="stretch", hide_index=True)
|
||||
|
||||
# Confirm
|
||||
def _on_confirm(
|
||||
@@ -1848,7 +1848,7 @@ def render_findings_panel(
|
||||
_t("findings.open_tool", tool=name),
|
||||
key=f"_findings_open_{tool_id}_{ns}",
|
||||
type="primary",
|
||||
use_container_width=False,
|
||||
width="content",
|
||||
):
|
||||
st.switch_page(page_slug)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user