Skip to content
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

Feature: st.logo #8554

Merged
merged 25 commits into from May 7, 2024
Merged

Feature: st.logo #8554

merged 25 commits into from May 7, 2024

Conversation

mayagbarnes
Copy link
Collaborator

@mayagbarnes mayagbarnes commented Apr 23, 2024

Describe your changes

Add a new command st.logo to display a logo in the top left of main page & sidebar

Testing Plan

Please note: this PR has SO MANY snapshot updates as a result of changing Streamlit's headerHeight - this was a Design decision to ensure the header's toolbar buttons align with the logo image & the open/close sidebar buttons. Essentially every sidebar/full screen snapshot is impacted by these changes.

  • Unit Tests (JS and/or Python) - ✅
  • E2E Tests - ✅
  • Manual Testing - ✅

@mayagbarnes mayagbarnes marked this pull request as ready for review April 29, 2024 07:13
Copy link
Collaborator

@kmcgrady kmcgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. I have some questions and some places where clarity can be written.

@mayagbarnes mayagbarnes requested a review from a team as a code owner May 1, 2024 00:49
Copy link
Collaborator

@LukasMasuch LukasMasuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proto changes LGTM 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: A couple of the caption test snapshots are a bit cut off (probably overlayed by the header). But I think this might be solved once we update the caption tests to playwright.

lib/streamlit/commands/logo.py Outdated Show resolved Hide resolved
lib/streamlit/commands/logo.py Outdated Show resolved Hide resolved
lib/streamlit/commands/logo.py Outdated Show resolved Hide resolved
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it might be a good idea to add a print-test where there is a logo (with sidebar opened and closed).

@sfc-gh-braethlein
Copy link

In general I think it'd be great if we put screenshots into the PR descriptions with a before/after comparison to allow for a quick visual overview for the reviewer of what exactly has changed in a PR

@mayagbarnes mayagbarnes merged commit 3fa988a into develop May 7, 2024
34 checks passed
@mayagbarnes mayagbarnes deleted the st-logo branch May 7, 2024 02:19
raethlein added a commit that referenced this pull request May 10, 2024
## Describe your changes

The app header bar height changed in
#8554 and now the heading can
be overlayed by it when clicking on the anchor. This PR fixes this by
using the correct height.

## GitHub Issue Link (if applicable)

## Testing Plan

- manual tests

---

**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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants