-
Notifications
You must be signed in to change notification settings - Fork 2
[feat] Add CCv2 support #40
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
59294b7 to
477e5fc
Compare
fe4bf7c to
777ff4c
Compare
477e5fc to
f80cff3
Compare
777ff4c to
b97af96
Compare
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.
Pull Request Overview
This PR adds support for Streamlit's Custom Component v2 API (CCv2) to the Bokeh component. The implementation includes version detection to conditionally use the v2 API when Streamlit >= 1.51.0 is available, while maintaining backward compatibility with v1. The v2 implementation features improved theme handling with Streamlit theme integration, responsive sizing support, and robust script loading utilities. The CCv2 feature is currently disabled via a flag pending full rollout in a future PR.
Key changes:
- Added v2 component implementation with theme-aware rendering and state management
- Created utility functions for idempotent Bokeh script loading
- Implemented version detection to switch between CCv1 and CCv2 APIs
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| streamlit_bokeh/pyproject.toml | Added project metadata and CCv2 component configuration |
| streamlit_bokeh/frontend/src/v2/streamlit-theme.ts | Implements Streamlit-to-Bokeh theme translation |
| streamlit_bokeh/frontend/src/v2/loaders.ts | Provides idempotent Bokeh script loading utilities |
| streamlit_bokeh/frontend/src/v2/index.ts | Main v2 component implementation with state management |
| streamlit_bokeh/frontend/src/v2/index.test.ts | Unit tests for theme and dimension calculation functions |
| streamlit_bokeh/init.py | Added version detection and dual v1/v2 registration |
| e2e_playwright/bokeh_chart_basics.py | Updated test to include keys for multiple chart instances |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sfc-gh-nbellante
left a comment
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.
LGTM 👍
b97af96 to
e263f37
Compare
f80cff3 to
96140c3
Compare
e263f37 to
d0cfb30
Compare
96140c3 to
ea36266
Compare
d0cfb30 to
26a1518
Compare
ea36266 to
19a4b62
Compare
Merge activity
|
19a4b62 to
804aeee
Compare

TL;DR
Added support for Streamlit's Custom Component v2 API to the Bokeh component.
What changed?