Conversation
Move examples from docs to docstring
🎉 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!
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates documentation for Streamlit release 1.49.0, enhancing docstrings and examples across multiple components to improve clarity and consistency.
Key Changes
- Enhanced docstrings with better formatting, clearer parameter descriptions, and consistent terminology
- Added new examples for directory upload, sparklines in metrics, and toast message functionality
- Standardized width/height parameter documentation across chart and data display elements
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
file_uploader.py |
Updated docstring for directory upload feature with new examples |
data_editor.py |
Standardized width/height parameter documentation and moved deprecation notice |
chat.py |
Clarified file acceptance parameters for directory uploads |
toast.py |
Enhanced examples section with multiple toast scenarios |
pyplot.py |
Standardized width parameter documentation and moved deprecation notice |
pdf.py |
Added installation requirements and improved parameter descriptions |
metric.py |
Enhanced sparkline documentation with new example |
markdown.py |
Reordered color list to alphabetical order |
column_types.py |
Improved parameter descriptions for SelectboxColumn and ListColumn |
image.py |
Standardized width parameter documentation and moved deprecation notice |
heading.py |
Clarified divider parameter behavior |
dialog_decorator.py |
Improved width parameter documentation formatting |
bokeh_chart.py |
Updated deprecation notice with version requirements |
arrow.py |
Enhanced cell selection documentation and standardized width/height parameters |
| (default), Streamlit will decide: indices are disabled and data columns | ||
| are not. |
There was a problem hiding this comment.
If this is
None(default), Streamlit will decide: indices are disabled and data columns are not.
This might not be the case at the moment. I think index columns are editable by default. However, in the case of ListColumn, this probably doesn't work (e.g. throws an exception) since I don't think you can easily write a list into an index value. So, we might need to look into disabling it in this case.
There was a problem hiding this comment.
Relatedly, I was going to ask you about required, we say it's False by default, but as I was reading through for consistency, I saw we changed them to None.
There was a problem hiding this comment.
disabled: ...
None(default), Streamlit will make the column editable unless this results in an error like in some cases involving index columns.
There was a problem hiding this comment.
Relatedly, I was going to ask you about required, we say it's False by default, but as I was reading through for consistency, I saw we changed them to None.
For technical reasons, column config parameters on the Python side have no default values other than None. However, the logical default for all columns is that they are configured as not required. We can specify here that using None configures the column as not required.
|
Performance checks failed. Retrying. |
## Describe your changes Docstrings for release 1.49.0 * Directory upload with new example * Sparklines for st.metric with new example * More widths and heights for advanced layouts * Dataframe cell selection with updated example * st.pdf! * yellow color in Markdown * Editable ListColumn ## Testing Plan n/a --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Describe your changes
Docstrings for release 1.49.0
Testing Plan
n/a
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.