Skip to content

Commit 216c5d2

Browse files
New embedded apps and configuration for release 1.32.0 (#985)
* `st.popover` embedded apps * Add subtitle example for `st.video` * Move .streamlit/config.toml to root & update
1 parent 223d076 commit 216c5d2

File tree

6 files changed

+53
-6
lines changed

6 files changed

+53
-6
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ node_modules/
113113
out/
114114
public/pdf/pages/
115115
.idea/
116-
python/api-examples-source/.streamlit/secrets.toml
116+
secrets.toml

.streamlit/config.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[global]
2+
storeCachedForwardMessagesInMemory=false
3+
4+
[logger]
5+
level = "error"

python/api-examples-source/.streamlit/config.toml

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import streamlit as st
2+
3+
VIDEO_URL = "https://static.streamlit.io/examples/star.mp4"
4+
5+
SUBTITLES = """
6+
WEBVTT
7+
8+
0:00:01.000 --> 0:00:02.000
9+
Look!
10+
11+
0:00:03.000 --> 0:00:05.000
12+
Look at the pretty stars!
13+
"""
14+
15+
st.video(VIDEO_URL, subtitles=SUBTITLES)
16+
17+
st.write(
18+
"""
19+
#### Video credit:
20+
21+
Creator: User _fxxu_ from _Pixabay_.
22+
23+
License: Free for commercial use. No attribution required.
24+
https://pixabay.com/en/service/license/
25+
26+
URL:
27+
https://pixabay.com/en/videos/star-long-exposure-starry-sky-sky-6962/
28+
29+
"""
30+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import streamlit as st
2+
3+
with st.popover("Open popover"):
4+
st.markdown("Hello World 👋")
5+
name = st.text_input("What's your name?")
6+
7+
st.write("Your name:", name)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import streamlit as st
2+
3+
popover = st.popover("Filter items")
4+
red = popover.checkbox("Show red items.", True)
5+
blue = popover.checkbox("Show blue items.", True)
6+
7+
if red:
8+
st.write(":red[This is a red item.]")
9+
if blue:
10+
st.write(":blue[This is a blue item.]")

0 commit comments

Comments
 (0)