Skip to content

Docs for auto-extracting icons#14458

Merged
lukasmasuch merged 2 commits intostreamlit:developfrom
MathCatsAnd:docs-auto-extract-leading-emoji
Mar 23, 2026
Merged

Docs for auto-extracting icons#14458
lukasmasuch merged 2 commits intostreamlit:developfrom
MathCatsAnd:docs-auto-extract-leading-emoji

Conversation

@MathCatsAnd
Copy link
Copy Markdown
Contributor

Describe your changes

This PR explains the behavior of auto-extracting icons in status elements and how to override it (which might be needed when there are multiple icons in the body/label).

Per testing, this change doesn't seem to apply to toast yet, so that's not included.


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 March 22, 2026 23:15
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for contributing to Streamlit! 🎈

Please make sure you have read our Contributing Guide. You can find additional information about Streamlit development in the wiki.

The review process:

  1. Initial triage: A maintainer will apply labels, approve CI to run, and trigger AI-assisted reviews. Your PR may be flagged with status:needs-product-approval if the feature requires product team sign-off.

  2. Code review: A core maintainer will start reviewing your PR once:

    • It is marked as 'ready for review', not 'draft'
    • It has status:product-approved (or doesn't need it)
    • All CI checks pass
    • All AI review comments are addressed

We're receiving many contributions and have limited review bandwidth — please expect some delay. We appreciate your patience! 🙏

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Mar 22, 2026

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

Status Scan Engine 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.

@MathCatsAnd
Copy link
Copy Markdown
Contributor Author

I thought about adding a note to st.segmented_control and st.pills, but the effect is much more subtle, so I think only Thiago-like people would notice.

image

Copy link
Copy Markdown
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 updates the public API docstrings for Streamlit alert elements (st.error, st.warning, st.info, st.success) to explain the “auto-extract leading icon from body” behavior and how users can override it.

Changes:

  • Documented how leading emoji / Material icon shortcodes can be auto-extracted from body when icon=None.
  • Added guidance for overriding auto-extraction when the body contains multiple icons.
  • Tweaked the documented icon parameter type notation.

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 👍

@lukasmasuch lukasmasuch added impact:users PR changes affect end users change:docs PR contains documentation change labels Mar 23, 2026
@lukasmasuch lukasmasuch enabled auto-merge (squash) March 23, 2026 10:22
@lukasmasuch lukasmasuch merged commit 8ae5ed1 into streamlit:develop Mar 23, 2026
64 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:docs PR contains documentation change impact:users PR changes affect end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants