Data-bound chart components 7/8: demo app on the new API - #467
Data-bound chart components 7/8: demo app on the new API#467FarhanAliRaza wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Greptile SummaryThe PR ports the Reflex showcase to the data-bound chart API while retaining the figure, streaming, inline, and static tiers where appropriate.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the prior unbounded allocation issue is closed because the only event-driven assignment clamps the point count before the data builder allocates its arrays.
|
| Filename | Overview |
|---|---|
| examples/reflex/xy_reflex_demo/xy_reflex_demo.py | Ports the demo to typed data-bound components, adds conditional small multiples, and closes the previously reported unbounded allocation path with server-side clamping. |
| scripts/reflex_ws_smoke.py | Extends the live-browser smoke probe to cover the additional subscriptions, bound chart, and conditional foreach mounts. |
| tests/test_example_apps.py | Updates source and composition assertions to cover the new data-bound API examples and renamed inline handles. |
| spec/design/reflex-integration.md | Documents composite-token hydration, bounded resynchronization, and the updated Reflex example inventory. |
| README.md | Adds a state-driven data-bound chart example using typed column data. |
| examples/reflex/README.md | Updates the showcase guide and interaction checks for the nine-section data-bound demo. |
Reviews (4): Last reviewed commit: "fix(reflex): clamp demo slider events se..." | Re-trigger Greptile
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
dfcf3fd to
f48df99
Compare
f48df99 to
24569d2
Compare
|
Review addressed in 24569d2: the §2 Also, the /kinds page (stacked on top in 8/8) now has browser render coverage: |
24569d2 to
86e8772
Compare
Ports examples/reflex to the tier the stack built, so the showcase is the API we recommend rather than the one it replaces: a composed 1M drillable scatter, an on_view_change data var republishing in-view columns into a fixed histogram plan, a flat scatter whose slider republishes columns under a stable handle, and an rx.cond toggle between a composed board and rx.foreach small multiples over a list[DataHandle] var. The escape hatch stays represented on purpose — the cross-filtered histogram whose *structure* reads state keeps @reflex_xy.figure — alongside both fixed-data tiers and the FastAPI cross-host A/B, so the example shows where each tier is the right answer rather than implying the new one subsumes them. reflex_ws_smoke.py drives the ported app; test_example_apps.py compiles it. Spec: reflex-integration.md file map (examples/reflex inventory).
Slider min/max are UI hints, not a security boundary: the §2 bins and §8 bound_points events size server allocations, so the demo now validates the event's list shape and clamps the number to the slider's range before assignment (_clamped_slider_value). Also corrects the section count in the module docstring.
86e8772 to
7c555e4
Compare
Stacked on #466. Base is
stack/6-compile-probe. Top of the stack — check this branch out to see the whole feature.Change
Ports
examples/reflexto the tier the stack built, so the showcase is the API we recommend rather than the one it replaces:on_view_changedata var republishing in-view columns into a fixed histogram plan;rx.condtoggle between a composed board andrx.foreachsmall multiples over alist[DataHandle]var.The escape hatch stays represented on purpose. The cross-filtered histogram whose structure reads state keeps
@reflex_xy.figure, alongside both fixed-data tiers and the FastAPI cross-host A/B — so the example shows where each tier is the right answer rather than implying the new one subsumes them.reflex_ws_smoke.pydrives the ported app;test_example_apps.pycompiles it.Spec
reflex-integration.mdfile map (examples/reflex inventory).Test plan
uv run pytest tests/reflex_adapter tests/test_validation_timing.py tests/test_example_apps.py— 250 passed, 1 skippedpre-commit run --all-files,ruff check,ruff format --check,ty check— cleanscripts/reflex_ws_smoke.py) against the running demo not re-run in this session — worth doing before merge.