Version 1.13.0

Notable Changes

  • :label: Widgets can customize how to hide their labels with the label_visibility parameter.
  • :mag: st.map adds zoom buttons to the map by default.
  • ↔️ st.dataframe supports the use_container_width parameter to stretch across the full container width.
  • :magic_wand: Improvements to st.dataframe sizing: Column width calculation respects column headers, supports double click between column headers to autosize, better fullscreen support, and fixes the issue with the width parameter.

Other Changes

  • :keyboard: st.time_input allows for keyboard-only input (#5194).
  • :cd: st.experimental_memo will warn the user when using ttl and persist keyword argument together (#5032).
  • :1234: st.number_input returns consistent type after rerun (#5359).
  • :fire_engine: st.sidebar UI fixes including a fix for scrollbars in Firefox browsers (#5157, #5324).
  • :woman_technologist: Improvements to usage metrics to guide API development.
  • :writing_hand: More type hints! (#5191, #5192, #5242, #5243, #5244, #5245, #5246) Thanks harahu!
15 Likes

Thanks @kmcgrady! :rocket: :rocket: :rocket:

Will the official Streamlit roadmap be updated too? IMO having visibility of upcoming features and improvements is critical. Helps us developers decide if Streamlit is the right framework for an app idea, if it’s worth developing a custom component vs. waiting for the Streamlit-native feature already in the roadmap (e.g., st.dataframe improvements) vs. create a feature request, etc. Thanks again!

4 Likes

The best news :heart::heart::heart:

I’m unable to load the release notes app linked to from the docs. My Safari web console shows a bunch of errors.

Nice update. I got a lot of warning logs like below:
“label got an empty value. This is discouraged for accessibility reasons and may be disallowed in the future by raising an exception. Please provide a non-empty label and hide it with label_visibility if needed.”

But it is hard for me to locate which widget missed the label arg. There are too many widget to be checked. It would be great if the log specifies the widget names which need the ‘label’ arg. Thanks.

6 Likes

label_visibility='collapse' is one of those small touches that makes a big difference. Nice.

1 Like

Hi Tony,
I’ve just upgraded my streamlit version and received this warning message too. Like you, I’ve too many widgets to check and using Jupyter notebook doesn’t help either.
Could you advise me as to how you went about your investigation to find the widget in question? thanks.

I’ve finally found the source of the problem. I assigned (intentionally) a null value to the selectbox label (in this case, text) as such:

option = st.sidebar.selectbox(text,some_list,index=0)
(where text = ‘’)
The latest streamlit version does not like null value, so to get past its warning message, I assign ’ ’ (a space in between the quotes) to my text label. That works and resolves my problem.

2 Likes

@finavatar Actually it is not straightforward to locate which widget causes this warning from the app side, not to mention when you use some 3rd party streamlit libraries. My suggestion is to add the widget name info in Streamlit logs.

3 Likes

I have found this error too and spend sometime figure out how to fix.

I found out that these kind of code will result in that error and we can quickly find and fix it.

choice = st.radio(“”, [‘a’,‘b’,‘c’])

fixed to
choice = st.radio(“options”, [‘a’,‘b’,‘c’], label_visibility=‘collapsed’)

note that “options” will not display as we set label_visibility=‘collapsed’

Hi, I wonder how to add the widget name info in Streamlit logs?

1 Like

yes or a line number!

1 Like

Since today I have been getting the

label got an empty value. This is discouraged for accessibility reasons’

error.

I have checked all all my input widgets have the “label” parameter

Any idea?

Thanks!

Fabio

Hi @Fabio ,

I’ve just run into the same issue as I’m working on a fork of the streamlit’s CSV wrangler app example.
In my case, the one widget that seems to trigger it is the st.file_uploader, that presents the error as I do a streamlit run app.py:

    uploaded_file = st.file_uploader(
        "",
        key="1",
        help="To activate 'wide mode', go to the hamburger menu > Settings > turn on 'wide mode'",
    )

It seems like the absence of label in the double quote generates the error.

For now the 2 possible workarounds I found are:

Option A (cleaner I think) - as mentioned earlier by @ryanlampkin :

    uploaded_file = st.file_uploader(
        label=" ",
        label_visibility='collapsed',
        key="1",
        help="To activate 'wide mode', go to the hamburger menu > Settings > turn on 'wide mode'",    
    )

Note: “hidden” works as well instead of “collapsed” but seems to introduce extra space for me between the title of the app and the drag/drop widget…

Option B: a whitespace as the label value, no label_visibility property…:

    uploaded_file = st.file_uploader(
        label=" ",
        key="1",
        help="To activate 'wide mode', go to the hamburger menu > Settings > turn on 'wide mode'",
    )

Either way I can’t seem to be able to get away with a strictly empty string…
If anyone has a cleaner, smarter solution and root cause explanation, I’m willing to read about it :slight_smile:

Cheers

Hi Alice,

Thanks!

In fact this does not solve my issue. I have specified a label in all my widgets (at least I think so) like so

and I get a ton of warning messages.

I can check again if I missed any widgets but judging by the number of warning messages I do not think so.

Thanks so much!

Fabio

Of course, an exception would be raised otherwise. But you will keep getting warnings if any label is empty.

Hi,

I promise all my labels are not empty :slight_smile:

I checked the one by one…

Fabio

Programs are better at that than people. You might want a second pair of eyeballs to check.

Will check again. :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.