Skip to content

Docs for 1.52.0#13192

Merged
sfc-gh-dmatthews merged 22 commits intodevelopfrom
docs/1.52.0
Dec 3, 2025
Merged

Docs for 1.52.0#13192
sfc-gh-dmatthews merged 22 commits intodevelopfrom
docs/1.52.0

Conversation

@sfc-gh-dmatthews
Copy link
Copy Markdown
Contributor

Describe your changes

Update docstrings and embedded examples.

Testing Plan

n/a docs only


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

Copilot AI review requested due to automatic review settings December 3, 2025 06:38
@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Dec 3, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 3, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-13192/streamlit-1.51.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-13192.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates docstrings and embedded examples for Streamlit version 1.52.0, improving clarity, consistency, and completeness across Python and TypeScript documentation.

Key changes:

  • Enhanced parameter documentation for widgets including date/time inputs, buttons, and chat components with clearer descriptions and formatting
  • Added new examples for keyboard shortcuts, query parameters, and component cleanup functions
  • Standardized documentation style across elements with improved descriptions of width/height parameters and text alignment

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
lib/streamlit/navigation/page.py Clarifies that spinner icons only appear in navigation menu, not as favicon
lib/streamlit/elements/widgets/time_widgets.py Improves parameter descriptions for time_input, datetime_input, and date_input with better formatting and additional examples
lib/streamlit/elements/widgets/data_editor.py Reorders height parameter options for consistency and clarifies placeholder parameter
lib/streamlit/elements/widgets/chat.py Enhances audio recording documentation and restructures return value descriptions
lib/streamlit/elements/widgets/button.py Expands keyboard shortcut documentation with detailed lists of supported keys and modifiers, adds new example
lib/streamlit/elements/widgets/audio_input.py Improves sample_rate parameter documentation with clearer descriptions
lib/streamlit/elements/vega_charts.py Adds deprecation notice for **kwargs parameter
lib/streamlit/elements/text.py Adds note about text alignment visibility requirements
lib/streamlit/elements/plotly_chart.py Improves height parameter documentation with more detailed descriptions
lib/streamlit/elements/metric.py Restructures delta_arrow parameter documentation for better clarity
lib/streamlit/elements/markdown.py Standardizes text alignment descriptions across markdown, caption, and badge functions
lib/streamlit/elements/html.py Adds missing unsafe_allow_javascript parameter documentation
lib/streamlit/elements/heading.py Adds text alignment notes to header, subheader, and title functions
lib/streamlit/elements/form.py Updates form_submit_button shortcut parameter documentation
lib/streamlit/elements/arrow.py Reorders height parameter options and clarifies placeholder parameter
lib/streamlit/components/v2/init.py Adds new example demonstrating component cleanup function usage
lib/streamlit/commands/execution_control.py Adds second example showing query parameter usage with st.navigation
frontend/component-v2-lib/src/types.ts Enhances TypeScript documentation with @import annotations and clearer descriptions

>>> "`A`" if st.button("A", width=100, shortcut="Shift+A") else "` `"
>>> "`S`" if st.button("S", width=100, shortcut="Ctrl+S") else "` `"
>>> "`D`" if st.button("D", width=100, shortcut="Cmd+D") else "` `"
>>> "`F`" if st.button("F", width=100, shortcut="Mod+F") else "` `"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we add one example here using three keys: Mod+Alt+F to show that this is also possible

Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sfc-gh-dmatthews sfc-gh-dmatthews enabled auto-merge (squash) December 3, 2025 09:17
@sfc-gh-dmatthews sfc-gh-dmatthews merged commit 7741c36 into develop Dec 3, 2025
43 of 45 checks passed
@sfc-gh-dmatthews sfc-gh-dmatthews deleted the docs/1.52.0 branch December 3, 2025 09:49
sfc-gh-dmatthews added a commit that referenced this pull request Dec 3, 2025
Update docstrings and embedded examples.

n/a docs only

---

**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: Copilot <[email protected]>
Option, Shift.

- Ctrl, Cmd, Meta, and Mod are interchangeable and will display to
the user to match their platform.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I'm sorry to intervene here directly but this looks wrong 👀:
The Ctrl & Cmd keys are different keys on Mac computers, I don't understand why they would be considered the same way..
Or are you saying that Ctrl cannot be mapped at all on Macs and it'll always use Cmd instead?

Copy link
Copy Markdown
Contributor Author

@sfc-gh-dmatthews sfc-gh-dmatthews Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or are you saying that Ctrl cannot be mapped at all on Macs and it'll always use Cmd instead?

Yes.

Hi! 👋🏻 In Streamlit, those four keys will all map to the same key on any given system. The embedded example tries to show this. Take a look at https://doc-button-shortcuts.streamlit.app/

Even though the code used Cmd, Ctrl, and Mod, you will only see one of them depending on your system. I'm looking at the app on a Mac, and the last three buttons all have the Cmd symbol. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the internal implementation that shows how we map them all to the same value:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bew while there is a ctrl key on Mac, it's not supposed to be used for custom keyboard shortcuts. Cmd on Mac is the primary modifier key, and it's common that ctrl gets mapped to ctrl on Windows/Linux and cmd on Mac.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks for the replies 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:docs PR contains documentation change impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants