enable single-click selection for reactive Plotly charts#8782
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Enables single-click selection reactivity for additional Plotly trace types by extracting click payloads into the same selection shape used by box/lasso selection, and updates related frontend/docs.
Changes:
- Added shared Plotly selection utilities (
extractClickSelection,extractPoints,extractIndices) and wiredonClickto produce selection payloads for supported traces. - Updated Plotly plugin selection handling to use the shared helpers for both click and box/lasso selection flows.
- Adjusted Slider input behavior/tests and updated Plotly docs to mention histogram support.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/plugins/impl/plotly/selection.ts | New helper module for extracting click-selection payloads and normalizing point/index data. |
| frontend/src/plugins/impl/plotly/PlotlyPlugin.tsx | Uses the new helpers to support click-based selection and to normalize indices for selection events. |
| frontend/src/plugins/impl/SliderPlugin.tsx | Changes NumberField path to always call setValue (regardless of debounce). |
| frontend/src/plugins/impl/tests/SliderPlugin.test.tsx | Adds/updates slider tests around debounce and editable input behavior. |
| docs/api/plotting.md | Updates docs to mention histogram support in reactive Plotly selections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@axsseldz sorry we missed the review on this. is this good for a review still? |
hey @mscolnick ill resolve the conflicts and let you know asap(: |
marimo-team#8682) When `debounce=True` and `include_input=True` are set on a slider, editing the numeric input does not trigger cell execution. This fixes the issue by forcing the NumberField's onChange to immediately setValue regardless of if the parent slider is configured with debounce, since numeric input edit events are explicitly requested by the user. Fixes marimo-team#8677 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
e0337f6 to
0ea7306
Compare
0ea7306 to
9678b59
Compare
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.22.1-dev28 |
📝 Summary
Follow-up to #8490 and #8489
Add single-click selection support for Plotly scatter, scattergl, and histogram charts.
🔍 Description of Changes
📋 Checklist
CC: @mscolnick @nojaf