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

Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Dec 4, 2025

Describe your changes

Fixes an issue with st.logo resizing/shrinking to unexpected sizes if top navigation is used.

GitHub Issue Link (if applicable)

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.

Copilot AI review requested due to automatic review settings December 4, 2025 22:43
@snyk-io
Copy link
Contributor

snyk-io bot commented Dec 4, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR change:bugfix PR contains bug fix implementation impact:users PR changes affect end users labels Dec 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-13226/streamlit-1.52.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-13226.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Contributor

Copilot AI left a 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: 0 CSS 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

@lukasmasuch lukasmasuch merged commit 6e20357 into develop Dec 5, 2025
43 checks passed
@lukasmasuch lukasmasuch deleted the fix/logo-shrinking-with-top-nav branch December 5, 2025 00:00
github-actions bot pushed a commit that referenced this pull request Dec 5, 2025
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:bugfix PR contains bug fix implementation impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collapsed app logo has wrong size

3 participants