Skip to content

Commit

Permalink
Release 1.40.0 (#1180)
Browse files Browse the repository at this point in the history
* Only deprecate the first mentioned parameter in a notice.

* Add API pages

* Update streamlit.json

* API reference cards

* Audio input GA

* Update streamlit.json

* Update streamlit.json

* Update streamlit.json

* st.text example typo

* Update streamlit.json

* Update navigation example for style

* Release notes

* Update streamlit.json

* What's new

* Cheat sheet

* Bump app versions
  • Loading branch information
sfc-gh-dmatthews authored Nov 6, 2024
1 parent 08877cc commit 3a33452
Show file tree
Hide file tree
Showing 31 changed files with 10,847 additions and 170 deletions.
54 changes: 40 additions & 14 deletions content/develop/api-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,19 +779,6 @@ Display a download button widget.
st.download_button("Download file", file)
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.feedback">

<Image pure alt="screenshot" src="/images/api/feedback.jpg" />

<h4>Feedback</h4>

Display a rating or sentiment button group.

```python
st.feedback("stars")
```

</RefCard>
<RefCard href="/develop/api-reference/execution-flow/st.form_submit_button">

Expand Down Expand Up @@ -858,6 +845,19 @@ Display a color picker widget.
color = st.color_picker("Pick a color")
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.feedback">

<Image pure alt="screenshot" src="/images/api/feedback.jpg" />

<h4>Feedback</h4>

Display a rating or sentiment button group.

```python
st.feedback("stars")
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.multiselect">

Expand All @@ -871,6 +871,19 @@ Display a multiselect widget. The multiselect widget starts as empty.
choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.pills">

<Image pure alt="screenshot" src="/images/api/pills.jpg" />

<h4>Pills</h4>

Display a pill-button selection widget.

```python
st.pills("Tags", ["Sports", "AI", "Politics"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.radio">

Expand All @@ -884,6 +897,19 @@ Display a radio button widget.
choice = st.radio("Pick one", ["cats", "dogs"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.segmented_control">

<Image pure alt="screenshot" src="/images/api/segmented_control.jpg" />

<h4>Segmented control</h4>

Display a segmented-button selection widget.

```python
st.segmented_control("Filter", ["Open", "Closed", "All"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.selectbox">

Expand Down Expand Up @@ -1026,7 +1052,7 @@ name = st.text_input("First name")
Display a widget that allows users to record with their microphone.

```python
speech = st.experimental_audio_input("Record a voice message")
speech = st.audio_input("Record a voice message")
```

</RefCard>
Expand Down
2 changes: 0 additions & 2 deletions content/develop/api-reference/text/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ description: st.text writes fixed-width and preformatted text.
---

<Autofunction function="streamlit.text" />

<Image src="/images/api/st.text.png" clean />
105 changes: 65 additions & 40 deletions content/develop/api-reference/widgets/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,6 @@ st.download_button("Download file", file)

</RefCard>

<RefCard href="/develop/api-reference/widgets/st.feedback">

<Image pure alt="screenshot" src="/images/api/feedback.jpg" />

<h4>Feedback</h4>

Display a rating or sentiment button group.

```python
st.feedback("stars")
```

</RefCard>

<RefCard href="/develop/api-reference/execution-flow/st.form_submit_button">

<Image pure alt="screenshot" src="/images/api/form_submit_button.svg" />
Expand Down Expand Up @@ -114,55 +100,81 @@ selected = st.checkbox("I agree")
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.toggle">
<RefCard href="/develop/api-reference/widgets/st.color_picker">

<Image pure alt="screenshot" src="/images/api/toggle.jpg" />
<Image pure alt="screenshot" src="/images/api/color_picker.jpg" />

<h4>Toggle</h4>
<h4>Color picker</h4>

Display a toggle widget.
Display a color picker widget.

```python
activated = st.toggle("Activate")
color = st.color_picker("Pick a color")
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.radio">
<RefCard href="/develop/api-reference/widgets/st.feedback">

<Image pure alt="screenshot" src="/images/api/radio.jpg" />
<Image pure alt="screenshot" src="/images/api/feedback.jpg" />

<h4>Radio</h4>
<h4>Feedback</h4>

Display a radio button widget.
Display a rating or sentiment button group.

```python
choice = st.radio("Pick one", ["cats", "dogs"])
st.feedback("stars")
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.selectbox">
<RefCard href="/develop/api-reference/widgets/st.multiselect">

<Image pure alt="screenshot" src="/images/api/selectbox.jpg" />
<Image pure alt="screenshot" src="/images/api/multiselect.jpg" />

<h4>Selectbox</h4>
<h4>Multiselect</h4>

Display a select widget.
Display a multiselect widget. The multiselect widget starts as empty.

```python
choice = st.selectbox("Pick one", ["cats", "dogs"])
choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.multiselect">
<RefCard href="/develop/api-reference/widgets/st.pills">

<Image pure alt="screenshot" src="/images/api/multiselect.jpg" />
<Image pure alt="screenshot" src="/images/api/pills.jpg" />

<h4>Multiselect</h4>
<h4>Pills</h4>

Display a multiselect widget. The multiselect widget starts as empty.
Display a pill-button selection widget.

```python
choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])
st.pills("Tags", ["Sports", "AI", "Politics"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.radio">

<Image pure alt="screenshot" src="/images/api/radio.jpg" />

<h4>Radio</h4>

Display a radio button widget.

```python
choice = st.radio("Pick one", ["cats", "dogs"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.segmented_control">

<Image pure alt="screenshot" src="/images/api/segmented_control.jpg" />

<h4>Segmented control</h4>

Display a segmented-button selection widget.

```python
st.segmented_control("Filter", ["Open", "Closed", "All"])
```

</RefCard>
Expand All @@ -179,16 +191,29 @@ size = st.select_slider("Pick a size", ["S", "M", "L"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.color_picker">
<RefCard href="/develop/api-reference/widgets/st.selectbox">

<Image pure alt="screenshot" src="/images/api/color_picker.jpg" />
<Image pure alt="screenshot" src="/images/api/selectbox.jpg" />

<h4>Color picker</h4>
<h4>Selectbox</h4>

Display a color picker widget.
Display a select widget.

```python
color = st.color_picker("Pick a color")
choice = st.selectbox("Pick one", ["cats", "dogs"])
```

</RefCard>
<RefCard href="/develop/api-reference/widgets/st.toggle">

<Image pure alt="screenshot" src="/images/api/toggle.jpg" />

<h4>Toggle</h4>

Display a toggle widget.

```python
activated = st.toggle("Activate")
```

</RefCard>
Expand Down Expand Up @@ -320,7 +345,7 @@ if prompt:
Display a widget that allows users to record with their microphone.

```python
speech = st.experimental_audio_input("Record a voice message")
speech = st.audio_input("Record a voice message")
```

</RefCard>
Expand Down
2 changes: 1 addition & 1 deletion content/develop/api-reference/widgets/audio_input.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ slug: /develop/api-reference/widgets/st.audio_input
description: st.audio_input displays a widget to upload audio from a microphone
---

<Autofunction function="streamlit.experimental_audio_input" />
<Autofunction function="streamlit.audio_input" oldName="streamlit.experimental_audio_input" />
7 changes: 7 additions & 0 deletions content/develop/api-reference/widgets/pills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: st.pills
slug: /develop/api-reference/widgets/st.pills
description: st.pills displays a select widget where options display as pill buttons.
---

<Autofunction function="streamlit.pills" />
7 changes: 7 additions & 0 deletions content/develop/api-reference/widgets/segmented_control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: st.segmented_control
slug: /develop/api-reference/widgets/st.segmented_control
description: st.segmented_control displays a select widget where options display in a segmented button.
---

<Autofunction function="streamlit.segmented_control" />
16 changes: 9 additions & 7 deletions content/develop/quick-references/api-cheat-sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: /develop/quick-reference/cheat-sheet

# Streamlit API cheat sheet

This is a summary of the docs for the latest version of Streamlit, [v1.39.0](https://pypi.org/project/streamlit/1.39.0/).
This is a summary of the docs for the latest version of Streamlit, [v1.40.0](https://pypi.org/project/streamlit/1.40.0/).

<Masonry>

Expand Down Expand Up @@ -64,7 +64,7 @@ streamlit --version
```python
# Magic commands implicitly
# call st.write().
"_This_ is some **Markdown***"
"_This_ is some **Markdown**"
my_variable
"dataframe:", my_data_frame

Expand All @@ -78,12 +78,12 @@ my_variable

```python
st.write("Most objects") # df, err, func, keras!
st.write(["st", "is <", 3]) # see *
st.write(["st", "is <", 3])
st.write_stream(my_generator)
st.write_stream(my_llm_stream)

st.text("Fixed width text")
st.markdown("_Markdown_") # see *
st.markdown("_Markdown_")
st.latex(r""" e^{i\pi} + 1 = 0 """)
st.title("My title")
st.header("My header")
Expand Down Expand Up @@ -284,13 +284,15 @@ fragment_function()
```python
st.button("Click me")
st.download_button("Download file", data)
st.feedback("thumbs")
st.link_button("Go to gallery", url)
st.page_link("app.py", label="Home")
st.data_editor("Edit data", data)
st.checkbox("I agree")
st.toggle("Enable")
st.feedback("thumbs")
st.pills("Tags", ["Sports", "Politics"])
st.radio("Pick one", ["cats", "dogs"])
st.segmented_control("Filter", ["Open", "Closed"])
st.toggle("Enable")
st.selectbox("Pick one", ["cats", "dogs"])
st.multiselect("Buy", ["milk", "apples", "potatoes"])
st.slider("Pick a number", 0, 100)
Expand All @@ -301,7 +303,7 @@ st.text_area("Text to translate")
st.date_input("Your birthday")
st.time_input("Meeting time")
st.file_uploader("Upload a CSV")
st.experimental_audio_input("Record a voice message")
st.audio_input("Record a voice message")
st.camera_input("Take a picture")
st.color_picker("Pick a color")

Expand Down
38 changes: 38 additions & 0 deletions content/develop/quick-references/release-notes/2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@ keywords: changelog, release notes, version history

This page contains release notes for Streamlit versions released in 2024. For the latest version of Streamlit, see [Release notes](/develop/quick-reference/release-notes).

## **Version 1.40.0**

_Release date: November 6, 2024_

**Highlights**

- 💊 Introducing [`st.pills`](/develop/api-reference/widgets/st.pills) to create a single- or multi-select group of pill-buttons.
- 🎛️ Introducing [`st.segmented_control`](/develop/api-reference/widgets/st.segmented_control) to create a segmented button or button group.
- 🎤 Announcing the general availability of [`st.audio_input`](), a widget to let users record sound with their microphones.

**Notable Changes**

- ➡️ Markdown renders a limited set of typographical symbols (arrows and comparators).
- <img src="/logo.svg" style={{ display: "inline-block", width: "1em" }} /> You can use `:streamlit:` to render the Streamlit logo in [Markdown](/develop/api-reference/text/st.markdown).
- 🐍 [`st.text`](/develop/api-reference/text/st.text) wraps text and no longer uses monospace font.
- 🪣 You can set `use_container_width` for [`st.image`](/develop/api-reference/media/st.image). `use_column_width` is deprecated.
- 📅 [`st.date_input`](/develop/api-reference/widgets/st.date_input) infers the first day of the week from the user’s locale ([#9706](https://github.com/streamlit/streamlit/pull/9706), [#5215](https://github.com/streamlit/streamlit/issues/5215)).

**Other Changes**

- 🎶 Streamlit’s CLI tool accepts array values for configuration options ([#9577](https://github.com/streamlit/streamlit/pull/9577)).
- ⛓️ Static file serving supports symlinks ([#9147](https://github.com/streamlit/streamlit/pull/9147), [#9146](https://github.com/streamlit/streamlit/issues/9146)). Thanks, [link89](https://github.com/link89)!
- 🚀 Streamlit provides helpful links for deployment when an app is running locally ([#9681](https://github.com/streamlit/streamlit/pull/9681)).
- ↕️ The fullscreen button for charts matches with the dataframe toolbar ([#9721](https://github.com/streamlit/streamlit/pull/9721)).
- 🏃 The running-man icon has a brief delay before rendering to avoid an unnecessary flicker for fast running apps ([#9732](https://github.com/streamlit/streamlit/pull/9732)).
- 🖇️ The `ComponentRequestHandler` allows symlinks ([#9588](https://github.com/streamlit/streamlit/pull/9588)).
- 👆 Streamlit works with `pillow` version 11 ([#9742](https://github.com/streamlit/streamlit/pull/9742)). Thanks, [hauntsaninja](https://github.com/hauntsaninja)!
- 🗺️ Deck.gl was upgraded to version 9.0.33 ([#9636](https://github.com/streamlit/streamlit/pull/9636)).
- 🦠 Bug fix: `st.latex` stays center-aligned when using the `help` keyword argument ([#9698](https://github.com/streamlit/streamlit/pull/9698), [#9682](https://github.com/streamlit/streamlit/issues/9682)). Thanks, [emmagarr](https://github.com/emmagarr)!
- 🪰 Bug fix: Apps correctly access local storage on Android ([#9744](https://github.com/streamlit/streamlit/pull/9744), [#9740](https://github.com/streamlit/streamlit/issues/9740)).
- 🕷️ Bug fix: Cached class methods can be cleared ([#9642](https://github.com/streamlit/streamlit/pull/9642), [#9633](https://github.com/streamlit/streamlit/issues/9633)).
- 🐞 Bug fix: Streamlit clears fragment auto-reruns when a user changes pages. This prevents an invalid index ([#9617](https://github.com/streamlit/streamlit/pull/9617)).
- 🐝 Bug fix: `st.page_link` margins are correct ([#9625](https://github.com/streamlit/streamlit/pull/9625)).
- 🐜 Bug fix: Form widgets show submission instructions when in focus ([#9576](https://github.com/streamlit/streamlit/pull/9576), [#7079](https://github.com/streamlit/streamlit/issues/7079)).
- 🪲 Bug fix: `st.navigation` correctly reconciles `client.showSidebarNavigation` ([#9589](https://github.com/streamlit/streamlit/pull/9589), [#9581](https://github.com/streamlit/streamlit/issues/9581)).
- 🐛 Bug fix: `st.text_area` requires a minimum height of 68px which fits two lines ([#9561](https://github.com/streamlit/streamlit/pull/9561), [#9217](https://github.com/streamlit/streamlit/issues/9217)).
- 💅 Bug fix: Various styling fixes ([#9529](https://github.com/streamlit/streamlit/pull/9529), [#8131](https://github.com/streamlit/streamlit/issues/8131), [#9555](https://github.com/streamlit/streamlit/pull/9555), [#9496](https://github.com/streamlit/streamlit/issues/9496), [#9554](https://github.com/streamlit/streamlit/pull/9554), [#9349](https://github.com/streamlit/streamlit/issues/9349), [#7739](https://github.com/streamlit/streamlit/issues/7739)).

## **Version 1.39.0**

_Release date: October 1, 2024_
Expand Down
Loading

0 comments on commit 3a33452

Please sign in to comment.