Skip to content

[AdvancedLayouts] Adds a width parameter to st.title, st.subheader, and st.header#11490

Merged
sfc-gh-lwilby merged 6 commits intodevelopfrom
feature/add-width-headings
Jun 5, 2025
Merged

[AdvancedLayouts] Adds a width parameter to st.title, st.subheader, and st.header#11490
sfc-gh-lwilby merged 6 commits intodevelopfrom
feature/add-width-headings

Conversation

@sfc-gh-lwilby
Copy link
Copy Markdown
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby commented May 31, 2025

Describe your changes

This PR is part of the [AdvancedLayouts] project and introduces a new width parameter to heading elements.

Screenshot 2025-06-02 at 4 16 01 PM

GitHub Issue Link (if applicable)

#8197

Testing Plan

Unit Tests (JS and/or Python) ✅
E2E 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.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented May 31, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 31, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-11490/streamlit-1.45.1-py3-none-any.whl
🕹️ Preview app pr-11490.streamlit.app (☁️ Deploy here if not accessible)

@sfc-gh-lwilby sfc-gh-lwilby added security-assessment-completed change:feature PR contains new feature or enhancement implementation impact:users PR changes affect end users labels May 31, 2025
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is not expected, but I am assuming there is some subtle shift in this snapshot because there is an st.header element above it. I don't see a noticeable difference.

@sfc-gh-lwilby sfc-gh-lwilby marked this pull request as ready for review June 5, 2025 10:42
@sfc-gh-lwilby sfc-gh-lwilby changed the title [WIP] [AdvancedLayouts] Adds a width parameter to st.title, st.subheader, and st.header [AdvancedLayouts] Adds a width parameter to st.title, st.subheader, and st.header Jun 5, 2025


def test_heading_widths_snapshot(
themed_app: Page, assert_snapshot: ImageCompareFunction
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: I think we can also use app here to lower the number of snapshots since the tested logic in this case shouldn't be influenced by the theme.

Copy link
Copy Markdown
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.

LGTM 👍 Maybe one aspect to check is if everything also works fine if the header has a tooltip (via help). Probably enough to verify this manually or add help to one of the existing command calls.

@sfc-gh-lwilby
Copy link
Copy Markdown
Collaborator Author

LGTM 👍 Maybe one aspect to check is if everything also works fine if the header has a tooltip (via help). Probably enough to verify this manually or add help to one of the existing command calls.

Checked this.

@sfc-gh-lwilby sfc-gh-lwilby merged commit f05e9f3 into develop Jun 5, 2025
39 of 48 checks passed
@sfc-gh-lwilby sfc-gh-lwilby deleted the feature/add-width-headings branch June 5, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:feature PR contains new feature or enhancement implementation impact:users PR changes affect end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants