-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
priority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
There are 2 issues I have observed with st.logo in the Sidebar
- When resizing the sidebar, there is a minimum width that the Sidebar will render to. However, if you keep dragging the affordance to be even more narrow, the logo can completely disappear
- Once you're in that state, trying to resize the Sidebar to be wider leads to it constantly resetting back to its smaller state. At a point, it will eventually allow you to make it wider.
I assume in both of these cases, we are applying delta values and not properly maintaining an expected min-width in the logic.
Reproducible Code Example
import streamlit as st
st.logo("https://doc-logo.streamlit.app/~/+/media/c002e45a7485e9ce0653817a63b88d290c3eb4f7182c3cc870c2c7bc.png")Steps To Reproduce
- Utilize the above code sample
- Resize the Sidebar to its narrowest width
- Keep resizing it to be narrower. Observe that the logo disappears
- Now, try to resize the Sidebar to be wider. Observe that the sidebar keeps snapping back to its min width. Eventually, it will allow you to make it wider
Expected Behavior
- I would expect that if you attempt to resize the Sidebar narrower than its min, nothing would happen
- I would expect that if you attempt to resize the Sidebar to be wider, then it will apply that wider width (assuming it's within the max width bound)
Current Behavior
Screen.Recording.2025-04-09.at.10.19.47.AM.mov
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.44.1
- Python version: 3.13
- Operating System: MacOS
- Browser: Chrome
Additional Information
No response
github-actions
Metadata
Metadata
Assignees
Labels
priority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected