-
Notifications
You must be signed in to change notification settings - Fork 4k
[Fix] st.toast handles custom theming
#12160
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.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
✅ PR preview is ready!
|
st.toast handles custom themingst.toast handles custom theming
| # Reload to apply the theme | ||
| app.reload() | ||
| wait_for_app_loaded(app) | ||
| app.wait_for_timeout(250) |
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.
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.
lukasmasuch
left a comment
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.
LGTM 👍
Describe your changes
Ensure
st.toastutilizes background color from custom theme configuration by removing explicit color values.Note this does change the toast background color for default dark theme.
Before:

After:

GitHub Issue Link (if applicable)
Closes #11951
Testing Plan