Docstrings for release 1.55.0#14185
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
There was a problem hiding this comment.
Pull request overview
This PR updates Streamlit’s public-facing docstrings for the 1.55.0 release, primarily to standardize Markdown/label behavior descriptions, unify key and query-parameter binding documentation across widgets/elements, and expand docs for dynamic containers (st.tabs, st.expander, st.popover) including their .open state.
Changes:
- Expanded and standardized Markdown support descriptions (including custom CSS colors in
st.markdown, and label auto-escaping behavior). - Unified/expanded
keyandbind="query-params"documentation across multiple widgets and chart elements. - Added/expanded docstrings and examples for dynamic container return types (
TabContainer,ExpanderContainer,PopoverContainer) and stateful lazy execution via.open.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/streamlit/navigation/page.py | Clarifies Markdown support for page titles/labels and adds a note for hidden-page URL access behavior. |
| lib/streamlit/commands/navigation.py | Points section-label Markdown support to the st.Page title rules. |
| lib/streamlit/elements/markdown.py | Expands Markdown docs with custom CSS color support and clarifies width="auto" behavior. |
| lib/streamlit/elements/layouts.py | Updates docs for st.tabs, st.expander, st.popover (lazy execution/state tracking, examples, and return container descriptions). |
| lib/streamlit/elements/lib/mutable_tab_container.py | Expands TabContainer docstring (incl. .open semantics and examples). |
| lib/streamlit/elements/lib/mutable_expander_container.py | Expands ExpanderContainer docstring (incl. .open semantics and examples). |
| lib/streamlit/elements/lib/mutable_popover_container.py | Expands PopoverContainer docstring (incl. .open semantics and examples). |
| lib/streamlit/elements/widgets/*.py | Standardizes label Markdown escaping wording and expands key + bind="query-params" documentation across many widgets. |
| lib/streamlit/elements/vega_charts.py | Updates chart key docs and selection guidance text. |
| lib/streamlit/elements/plotly_chart.py | Updates chart key docs to include widget-behavior link and CSS class note. |
| lib/streamlit/elements/deck_gl_json_chart.py | Updates chart key docs to include widget-behavior link and CSS class note. |
| lib/streamlit/elements/arrow.py | Updates dataframe key docs to include widget-behavior link and CSS class note. |
| lib/streamlit/elements/table.py | Clarifies sticky index-column behavior vs width/overflow. |
| lib/streamlit/elements/image.py | Tweaks link parameter wording/examples. |
| lib/streamlit/connections/snowpark_connection.py | Switches deprecation wording to a .. deprecated:: block. |
| lib/streamlit/config.py | Clarifies theme option descriptions for metric font size/weight. |
SummaryThis PR is a comprehensive docstring and documentation refresh across ~37 Python files in the Streamlit library for the 1.55.0 release. All modifications are documentation-only — no functional code is changed. Key improvements include:
Code QualityThe docstrings are well-written and follow the NumPy-style conventions documented in
Test CoverageBoth reviewers agreed: no tests are needed for this PR since all changes are documentation-only. No functional behavior was modified. Backwards CompatibilityBoth reviewers agreed: no backwards compatibility concerns. All changes are confined to docstrings with no changes to function signatures, behavior, or return types. Security & RiskBoth reviewers agreed: no security concerns. Regression risk is low because the changes do not modify runtime logic. AccessibilityBoth reviewers agreed: no frontend changes are included, so accessibility is not affected. Reviewer Agreement & DisagreementAgreement:
Disagreement:
Resolution: The copy-paste error in the expander Recommendations
VerdictCHANGES REQUESTED: The documentation updates are thorough and high quality overall, but the expander Consolidated review by 📋 Review by `gpt-5.3-codex-high`SummaryThis PR is a broad docstring/documentation refresh across Streamlit's Python API surface for 1.55.0. The changes mainly standardize parameter wording (especially Code QualityThe changes are consistent with the docstring conventions in Test CoverageNo unit or e2e tests were added or modified. Given the PR scope is docstrings and descriptive text (no runtime behavior changes in the touched APIs), this is acceptable. Backwards CompatibilityNo breaking API behavior changes were identified in the PR diff. Functionality appears backwards compatible; changes are explanatory and editorial. Security & RiskNo security-impacting changes were found. Regression risk is low because the changes do not modify runtime logic for widgets/elements. AccessibilityNo frontend rendering or interaction behavior was changed. Accessibility risk from this PR is negligible. Recommendations
VerdictAPPROVED: The PR is documentation-focused, consistent with repository conventions, low risk, and ready to merge. This is an automated AI review by 📋 Review by `opus-4.6-thinking`SummaryThis PR updates docstrings across 37 Python files in the Streamlit library for the 1.55.0 release. No functional code is changed — all modifications are to docstrings and inline documentation. Key improvements include:
Code QualityThe docstrings are well-written, consistent, and follow the NumPy-style conventions documented in
Test CoverageNo tests are needed for this PR since all changes are documentation-only (docstrings). No functional behavior was modified. Backwards CompatibilityNo backwards compatibility concerns. All changes are confined to docstrings and documentation strings, with no changes to function signatures, behavior, or return types. Security & RiskNo security concerns. The changes are documentation-only and don't introduce any new code paths, dependencies, or configuration options. AccessibilityNo frontend changes are included in this PR, so accessibility is not affected. Recommendations
VerdictCHANGES REQUESTED: The docstring updates are thorough and high quality overall, but the expander This is an automated AI review by |
Consolidated Code ReviewSummaryThis is a documentation-only PR that updates and unifies Python API docstrings across the Streamlit library for the 1.55.0 release. The changes span navigation, layouts, widgets, container return types, config option descriptions, and a deprecation marker for Key improvements include:
Code QualityBoth reviewers found the docstrings well-structured, consistent, and following NumPy-style conventions. The following specific issues were identified (verified against the codebase):
Reviewer Agreement
No disagreements between reviewers. Test CoverageNo unit or e2e tests were added or modified. This is appropriate for a documentation-only PR with no behavioral changes. Backwards CompatibilityNo breaking API or behavior changes. Function signatures and runtime paths remain unchanged. Security & RiskNo security concerns. Risk is low and limited to documentation rendering/accuracy. AccessibilityNo frontend changes; no accessibility impact. Recommendations
VerdictAPPROVED: Both reviewers approve. This is a thorough, high-quality documentation update that significantly improves consistency across the Streamlit API. The five items noted above are minor, non-blocking improvements. Consolidated review by 📋 Review by `gpt-5.3-codex-high`SummaryThis PR updates Python API docstrings for the 1.55 release across navigation, layouts, widgets, and container return types, plus small wording updates in config option descriptions and a deprecation marker for Code QualityDocstring updates are broadly consistent with existing Numpydoc/reStructuredText patterns in Test CoverageNo unit or e2e tests were added or modified in this PR. Given that the diff is documentation-only (no behavioral/path logic changes), this is acceptable. Backwards CompatibilityNo breaking API or behavior changes were identified. Function signatures and runtime paths remain unchanged in the reviewed diff scope. Security & RiskNo security concerns were identified. AccessibilityNo frontend implementation changes are included, so there is no direct accessibility impact from this PR. Recommendations
VerdictAPPROVED: Documentation updates are consistent, low risk, and ready to merge. This is an automated AI review by 📋 Review by `opus-4.6-thinking`SummaryThis is a documentation-only PR that updates and unifies docstrings across the Streamlit Python library for the 1.55.0 release. No behavioral code changes are included. The main improvements are:
Code QualityThe docstrings are well-structured, consistent, and follow NumPy-style conventions. The unified patterns for
Test CoverageThis is a documentation-only PR with no behavioral changes, so no new tests are needed. The existing test suite remains valid since no runtime behavior was modified. Backwards CompatibilityNo backwards compatibility concerns. All changes are confined to docstrings and do not affect runtime behavior, function signatures, or return types. Security & RiskNo security concerns. The changes are purely documentation updates with no code execution impact. AccessibilityNot applicable — the changes are limited to Python docstrings and do not affect the frontend UI or rendered HTML. Recommendations
VerdictAPPROVED: A thorough, high-quality documentation update that significantly improves consistency across the Streamlit API. The four items noted above are minor and non-blocking. This is an automated AI review by |
| st.image("https://static.streamlit.io/examples/dog.jpg", width=200) | ||
| with tab3: | ||
| st.header("An owl") | ||
| st.image("https://static.streamlit.io/examples/owl.jpg", width=200) |
There was a problem hiding this comment.
Does it make sense to also add an example with lazy loaded tabs?
There was a problem hiding this comment.
seems like there are some examples on the tab/popover/expander container itself
There was a problem hiding this comment.
Yes, I put the examples that use the property on the DG subclass itself.
lukasmasuch
left a comment
There was a problem hiding this comment.
LGTM 👍 You might to update the branch to get the CI working again
## Describe your changes * Added custom CSS colors to Markdown support * Added auto-escaping to limited Markdown fields like widget labels * Added limited Mardown support to `st.Page`, `st.navigation`, * Added Markdown support to * Unified and expanded the description of `key` * Unified and clarified query parameter in widgets (that have been released so far) * Added support for hidden pages * Unified docstrings for dynamic containers `st.tabs`, `st.expander`, and `st.popover` * Added DeltaGenerator subclasses for dynamic containers (without mentioning DeltaGenerator) with six new embedded examples for dynamic containers ## Screenshot or video (only for visual changes) ## GitHub Issue Link (if applicable) ## Testing Plan - Explanation of why no additional tests are needed - Unit Tests (JS and/or Python) - E2E Tests - Any manual testing needed? --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license. --------- Co-authored-by: Lukas Masuch <[email protected]>
* Added custom CSS colors to Markdown support * Added auto-escaping to limited Markdown fields like widget labels * Added limited Mardown support to `st.Page`, `st.navigation`, * Added Markdown support to * Unified and expanded the description of `key` * Unified and clarified query parameter in widgets (that have been released so far) * Added support for hidden pages * Unified docstrings for dynamic containers `st.tabs`, `st.expander`, and `st.popover` * Added DeltaGenerator subclasses for dynamic containers (without mentioning DeltaGenerator) with six new embedded examples for dynamic containers - Explanation of why no additional tests are needed - Unit Tests (JS and/or Python) - E2E Tests - Any manual testing needed? --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license. --------- Co-authored-by: Lukas Masuch <[email protected]>
Describe your changes
st.Page,st.navigation,keyst.tabs,st.expander, andst.popoverScreenshot or video (only for visual changes)
GitHub Issue Link (if applicable)
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.