Version 0.81.0

Release date: Apr 29, 2021

Highlights

  • :memo: Introducing st.form and st.form_submit_button which allow for the creation of forms and submit button to batch submit input widgets. Check out our blog post
  • :abc: Introducing st.caption : A convenience API for for adding small text.
  • :art: Updates to Theming which allow for editing themes from a base theme configuration
  • :rocket: Improvements to deployment experience to Streamlit Sharing from the app menu

Other changes

  • Support for binary files in Custom Components (#3144)

Check out the release app for more details!

12 Likes

Also part of this release, Updates to Theming!!

Wanna add a hint of branding to Streamlit? Try replacing our signature pink color with your own! For e.g.

[theme]
base = "light"
primaryColor = "#1c83e1"  # Make it blue!

To learn more check out our theming docs

4 Likes

Hi,

I have been trying to run st.form and st.form_submit_button examples from the blog post.

form = st.form(key='my_form')
text_input = form.text_input(label='Enter some text')
submit_button = form.form_submit_button(label='Submit')

if submit_button:
    st.write(f'hello {text_input}')

The result is the following error message:

" Missing Submit Button
This form has no submit button, which means that user interactions will never be sent to your Streamlit app."

Thanks for your help!

Hi @Lior_D,

did you try to use the with-statement way of doing it and does it work with it?

with st.form('Form2'):

Cheers
Chris

Hi,

Thanks for your reply,
I have been trying both ways.
I am copy and pasting the examples directly from the blog.
Just now I have retried this:

with st.form(key='my_form'):
	text_input = st.text_input(label='Enter some text')
	submit_button = st.form_submit_button(label='Submit')

Which I copied from the blog post

Thanks,
L

Hi @Lior_D

Hmmmm…I just tried that code blob you posted right here, and it worked just fine. Are you sure you are on the latest Streamlit? Running streamlit version should let you know.

Hi,

I did some more digging and have found the issue.
When I run in a standard way, from terminal
$ streamlit run user_auth.py
It works as expected.

However, I develop using the bootstrap module like so:
(I’m using this launch method so I can debug my code better)

from streamlit import bootstrap
real_script = "user_auth.py"
bootstrap.run(real_script, f'run.py {real_script}', [] , {})

The issue is reproduced.

My env:
Ubuntu linux 21.04 (reproduced in windows 10), running pyCharm.
Python environment: anaconda, interpreter python 3.8.8
Streamlit version

(py38) lior@lior-ubuntu:~$ streamlit version 
Streamlit, version 0.81.0

Thanks,
Lior

Hi there,

The st.form is a really cool feature! Thanks for that.
Generally it is working fine, but I noticed that custom components do not show up within a form.
Is this just not implemented yet, is it a bug, or is it just me?

Thanks,
LeChuck

Hey @LeChuck !

I checked in with the team, and I believe it should show up just fine. Can you provide some example code to demonstrate the issue? I wonder if the custom component is not setting its height correctly.

Hi @kmcgrady,
Thanks for your reply.
While trying to make a minimal example, I noticed that there is an update 0.81.1.
After updating it is now working fine. Before it didn’t.
So, problem solved! :slight_smile:
Thanks anyway.
Cheers