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

Skip to content

Conversation

@mayagbarnes
Copy link
Collaborator

@mayagbarnes mayagbarnes commented Aug 8, 2025

Describe your changes

Ensure st.toast utilizes background color from custom theme configuration by removing explicit color values.
Note this does change the toast background color for default dark theme.

Before:
Screenshot 2025-08-07 at 6 25 42 p m

After:
Screenshot 2025-08-07 at 6 25 26 p m

GitHub Issue Link (if applicable)

Closes #11951

Testing Plan

  • E2E Tests: ✅ Added
  • Manual Testing: ✅ Added

@mayagbarnes mayagbarnes 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 Aug 8, 2025
@snyk-io
Copy link
Contributor

snyk-io bot commented Aug 8, 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
Contributor

github-actions bot commented Aug 8, 2025

✅ PR preview is ready!

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

@mayagbarnes mayagbarnes changed the title [FIx] st.toast handles custom theming [Fix] st.toast handles custom theming Aug 8, 2025
@mayagbarnes mayagbarnes marked this pull request as ready for review August 8, 2025 20:01
# Reload to apply the theme
app.reload()
wait_for_app_loaded(app)
app.wait_for_timeout(250)
Copy link
Contributor

Choose a reason for hiding this comment

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

The Streamlit E2E Tests guide explicitly prohibits using wait_for_timeout and recommends the wait_until utility instead. Replace app.wait_for_timeout(250) with a reliable condition-based wait using wait_until rather than an arbitrary timeout.

Spotted by Diamond (based on custom rule: E2E Playwright Tests)

Is this helpful? React 👍 or 👎 to let us know.

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.

LGTM 👍

@mayagbarnes mayagbarnes merged commit e017e0e into develop Aug 8, 2025
37 of 38 checks passed
@mayagbarnes mayagbarnes deleted the fix-toast branch August 8, 2025 23:48
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.

st.toast does not utilize theme

3 participants