-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix unexpected shrinking of logo with top nav #13226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where st.logo would unexpectedly shrink when used with top navigation in Streamlit apps.
- Adds
flexShrink: 0CSS property to prevent the logo container from shrinking when the top navigation overflow container expands - Adds comprehensive e2e visual regression test to validate the fix across different viewport sizes
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
frontend/app/src/components/Header/styled-components.ts |
Added flexShrink: 0 to StyledHeaderLeftSection to prevent logo from shrinking when used with top navigation |
e2e_playwright/multipage_apps_v2/mpa_v2_top_nav_test.py |
Added test_top_nav_with_logo_visual_regression test to verify logo maintains correct size with top navigation across viewport changes |
## Describe your changes Fixes an issue with `st.logo` resizing/shrinking to unexpected sizes if top navigation is used. ## GitHub Issue Link (if applicable) - Closes #13225 ## Testing Plan - Added e2e test. --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Describe your changes
Fixes an issue with
st.logoresizing/shrinking to unexpected sizes if top navigation is used.GitHub Issue Link (if applicable)
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.