Today you can put Streamlit in "wide mode" via the Settings dialog in the UI. However, it would be great if the wide mode setting were sticky.
Option 1: just make Wide Mode sticky by persisting it in local storage!
Option 2: Provide a config option that toggles wide mode:
[browser]
wideMode = True
(for this we'd have to replicate much of the code used to propagate settings like browser.gatherUsageStats to the browser)
Right now I favor Option 1 because it's so much simpler -- and we'll probably be rethinking wide mode anyway, as soon as we add support for horizontal layout (Issue #241) . This is because at that point we may want to shift control over the app's width onto the developer, rather than having it as a viewer setting.
Hello, well, as a developer I would like to have control over the default app width (and maybe keep the option in the menu as now, to allow users override it).
And it should be the app option (i.e., not set in the global Streamlit config file). It could be provided on the command line (or allow to specify an per-app config file on the command line).
as a developer I would like to have control over the default app width (and maybe keep the option in the menu as now, to allow users override it).
That's a good point.
Option (2) is not particularly hard, just slightly more work than (1), so even if we're going to change a few of these things soon it may still be worth it for someone to implement (2) as a temporary measure.
Option two it's better in my view.
this way we could just add this line to our application:
st.set_option('wideMode' , True)
I would like it too.
Are there any updates or workarounds to this problem yet?
@TimMazhari this workaround has worked fine for me
Are there any updates ?
The workaround suggested above is not safe (as explained here).
After talking this in the standup we decided to move this to our backlog.
Are there any updates ?
@arraydude @tvst
Are there any updates ?
@arraydude @tvst
Are there any updates ?
@arraydude @tvst
Hey @zsz00 , This is being prioritized within our backlog you are gonna be receiving news soon!
Thanks for contacting
Are there any updates ?
@arraydude @karriebear @tvst
Are there any updates ?
@arraydude @karriebear @tvst
Are there any updates?
Thanks
Fabio
Any updates please ?
We've settled on a slightly different proposal to achieve the same goals:
st.set_page_config( # Alternate names: setup_page, page, layout
layout="centered", # Can be "centered" or "wide". In the future also "dashboard", etc.
initial_sidebar_state="auto", # Can be "auto", "expanded", "collapsed"
page_title=None, # String or None. Strings get appended with "• Streamlit".
page_icon=None, # String, anything supported by st.image, or None.
)
I'd expect us to get to this relatively soon now that the product spec is finished! Removing "good first issue" because this will likely be handled by a Streamlit core member
Any update on this?
I'm going to be tackling this enhancement in the coming days. I've created a new issue at #1770 to track that since the proposal includes other work areas as well; please follow along there for updates.
(Still debating whether to mark this thread as a dupe; primary reason not to would be that there are lots of upvotes and people following this current topic.)
If you're still working on this, perhaps give us an option of having the images in wide mode but not the text. So it could be like a cover image that's end-to-end on the top of the page. Thanks.
If you're still working on this, perhaps give us an option of having the images in wide mode but not the text. So it could be like a cover image that's end-to-end on the top of the page. Thanks.
@adityashukzy A cover image is a neat idea, but would be out of scope for either this and also the wider #1770 proposal; we'd have to think more carefully through how the API and layout for that would look. I'd hope that cover images would be supported when we work on Custom Layouts, an initiative that should begin later this year, but in the meantime feel free to open another issue we can reference 😃
Most helpful comment
Option two it's better in my view.
this way we could just add this line to our application:
st.set_option('wideMode' , True)