Thanks to visit codestin.com
Credit goes to github.com

Skip to content

st.logo with sidebar resize interactions issues #11062

@sfc-gh-bnisco

Description

@sfc-gh-bnisco

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

  1. 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
  2. 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")

Open in Streamlit Cloud

Steps To Reproduce

  1. Utilize the above code sample
  2. Resize the Sidebar to its narrowest width
  3. Keep resizing it to be narrower. Observe that the logo disappears
  4. 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

  1. I would expect that if you attempt to resize the Sidebar narrower than its min, nothing would happen
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P3Medium prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions