-
Notifications
You must be signed in to change notification settings - Fork 615
Release 1.51.0 #1365
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
Release 1.51.0 #1365
Conversation
* Fix Tailwind example CSS * Custom components with Typescript * Custom component API reference
components/blocks/autofunction.js
Outdated
| const name = | ||
| isInterface || isTypeAlias | ||
| ? functionObject.name | ||
| : functionObject.signature | ||
| ? `${functionObject.signature}` | ||
| .split("(")[0] | ||
| .replace("streamlit", "st") | ||
| : ""; |
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.
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. |
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.
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()); |
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.
question: Was the removal of .toLowerCase() intentional?
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.
This is to allow component (Python) and Component (TypeScript) in the menu, otherwise one overwrites the other.
📚 Context
Release of Streamlit 1.51.0
🧠 Description of Changes
st.spaceContribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.