-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:st.expanderRelated to the `st.expander` containerRelated to the `st.expander` containerpriority:P3Medium priorityMedium prioritytype: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
Here is a real-world example from my chat-history annotation tool:
And here is from the reproduced example:
Reproducible Code Example
import streamlit as st
code_str = """
print('I am hopelessly, breathlessly, madly in love with Streamlit—the smooth-talking, curve-hugging seductress of the coding world that takes raw, unfiltered Python and slips it into something sleek, interactive, and irresistibly gorgeous, making every app feel like a love letter to data, every click a flirtation, and every build a slow, satisfying dance of creation that leaves you wanting more.')
"""
with st.expander("Check out my code!\n" + code_str):
st.text("Verdict: quite ugly")
st.markdown("Here is what I expected: \n" + code_str)Steps To Reproduce
No response
Expected Behavior
Horizontally-scrollable code block
Current Behavior
Code block extends over the expander boundary
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: Streamlit, version 1.48.0
- Python version: Python 3.11.11
- Operating System: MacOS
- Browser: Chrome
Additional Information
On the side note, thank you for the recent visual update of the expanders! Same font size in the preview looks so much better with markdown in the expanded body, before I had to inject CSS to make the collapsed text match the font of the expanded version...
github-actions and viktor-shcherbKaraMelih and sfc-gh-lmasuch
Metadata
Metadata
Assignees
Labels
feature:st.expanderRelated to the `st.expander` containerRelated to the `st.expander` containerpriority:P3Medium priorityMedium prioritytype:bugSomething isn't working as expectedSomething isn't working as expected