Skip to content

Docs for Custom Components V2#12877

Merged
sfc-gh-dmatthews merged 5 commits intodevelopfrom
docs/ccv2
Oct 28, 2025
Merged

Docs for Custom Components V2#12877
sfc-gh-dmatthews merged 5 commits intodevelopfrom
docs/ccv2

Conversation

@sfc-gh-dmatthews
Copy link
Copy Markdown
Contributor

@sfc-gh-dmatthews sfc-gh-dmatthews commented Oct 28, 2025

Describe your changes

The PR updates the docstrings for Custom Components V2.

GitHub Issue Link (if applicable)

Testing Plan

n/a docs only


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

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Oct 28, 2025

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

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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 docstrings for Custom Components V2 to improve documentation. The changes focus on expanding and clarifying the documentation for component registration, mounting, and type definitions without modifying any functional code.

Key Changes

  • Enhanced docstrings with detailed parameter descriptions, usage guidelines, and comprehensive examples
  • Added extensive documentation for both Python and TypeScript interfaces
  • Included practical examples demonstrating component creation patterns and common use cases

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
lib/streamlit/components/v2/types.py Expanded BidiComponentCallable docstring with detailed parameter descriptions, usage notes, and two complete examples
lib/streamlit/components/v2/bidi_component/state.py Improved BidiComponentResult docstring to clarify its purpose and structure, moved parameter docs to __init__ method
lib/streamlit/components/v2/init.py Extensively documented the component function with detailed parameter descriptions, important notes, and three practical examples
frontend/component-v2-lib/src/types.ts Enhanced TypeScript type documentation with detailed JSDoc comments, usage guidelines, and a complete typed example

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 28, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12877/streamlit-1.50.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-12877.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Copy Markdown
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco left a comment

Choose a reason for hiding this comment

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

Really great docs, thank you so much! A couple of comments/suggestions inline.

@sfc-gh-bnisco sfc-gh-bnisco added security-assessment-completed impact:users PR changes affect end users change:docs PR contains documentation change labels Oct 28, 2025
@sfc-gh-dmatthews sfc-gh-dmatthews merged commit a5d1721 into develop Oct 28, 2025
37 checks passed
@sfc-gh-dmatthews sfc-gh-dmatthews deleted the docs/ccv2 branch October 28, 2025 23:54
github-actions bot pushed a commit that referenced this pull request Oct 29, 2025
## Describe your changes
The PR updates the docstrings for Custom Components V2.

## GitHub Issue Link (if applicable)

## Testing Plan
n/a docs only

---

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

---------

Co-authored-by: Copilot <[email protected]>
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