Skip to content

Conversation

@sfc-gh-dmatthews
Copy link
Contributor

📚 Context

Release of Streamlit 1.51.0

🧠 Description of Changes

  • Custom components v2 (API reference and platform updates to handle Typescript references)
  • st.space
  • Dark and light themes
  • Reusable themes
  • Streamlit run defaults
  • Cheat sheet, What's new, release notes
  • Bump apps to latest

Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-dmatthews sfc-gh-dmatthews requested a review from a team as a code owner October 30, 2025 21:44
@sfc-gh-dmatthews sfc-gh-dmatthews requested review from sfc-gh-bnisco and removed request for a team October 30, 2025 21:47
Comment on lines 229 to 236
const name =
isInterface || isTypeAlias
? functionObject.name
: functionObject.signature
? `${functionObject.signature}`
.split("(")[0]
.replace("streamlit", "st")
: "";
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (non-blocking): For readability it is preferred to not have nested ternaries, so might make sense to move this into its own extraction function.


# Custom components

Streamlit custom components allow you to create and integrate custom UI elements that extend beyond Streamlit's built-in widgets. There are two versions available: V2 components offer a modern, streamlined approach with TypeScript support, while V1 components use iframe isolation for custom elements built with HTML and JavaScript.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: V1 also supports typescript. Our example apps for V1 use typescript and we ship an npm package that is in typescript.

I think the delineation should be more around that V2 is not isolated in an iframe, supports multiple python callbacks, and is more performant.

// Move to the depth we need
for (const depth in category) {
const menu_key = slugify(category[depth].trim().toLowerCase());
const menu_key = slugify(category[depth].trim());
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Was the removal of .toLowerCase() intentional?

Copy link
Contributor Author

@sfc-gh-dmatthews sfc-gh-dmatthews Oct 31, 2025

Choose a reason for hiding this comment

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

This is to allow component (Python) and Component (TypeScript) in the menu, otherwise one overwrites the other.

@sfc-gh-dmatthews sfc-gh-dmatthews merged commit 0fe07a6 into main Oct 31, 2025
4 checks passed
@sfc-gh-dmatthews sfc-gh-dmatthews deleted the release branch October 31, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants