feat: on_hover - #111
Conversation
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (40)
📝 WalkthroughWalkthroughHover handlers are added across tooltip configuration, plot registration, client-side JavaScript wiring, and HTML rendering. Interactive mappings now recognize ChangesHover Handler Support
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Ggplot
participant InteractivePlot
participant TooltipConfig
participant PlotParserInit
participant PlotParserHover
participant HTMLTemplate
Ggplot->>InteractivePlot: provide on_hover mapping
InteractivePlot->>TooltipConfig: register hover_handlers
TooltipConfig->>InteractivePlot: return hover handler payload
InteractivePlot->>HTMLTemplate: provide hover handler JavaScript
PlotParserInit->>PlotParserHover: pass hoverHandlers
PlotParserHover->>PlotParserHover: resolve and attach mouseover handler
HTMLTemplate->>HTMLTemplate: render hover handler script
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ninejs/main.py (1)
200-218: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winWire
hover_handlersinto the hover runtime.ninejs/static/PlotParserHover.jsonly resolvesglobalThis.ninejs.clickHandlers, so theglobalThis.ninejs.hoverHandlersblock emitted from_extract_handler_javascript(..., "hover")is never used andon_hovercallbacks won’t fire.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ninejs/main.py` around lines 200 - 218, Update the hover runtime in PlotParserHover.js to resolve callbacks from globalThis.ninejs.hoverHandlers, matching the hover handler block generated by _set_html via _extract_handler_javascript(..., "hover"). Keep click handling bound to globalThis.ninejs.clickHandlers and ensure resolved hover callbacks invoke on_hover.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 14: Update the README description to hyphenate the event modifiers,
changing “on click/hover events” to “on-click/on-hover events” while leaving the
surrounding wording unchanged.
---
Outside diff comments:
In `@ninejs/main.py`:
- Around line 200-218: Update the hover runtime in PlotParserHover.js to resolve
callbacks from globalThis.ninejs.hoverHandlers, matching the hover handler block
generated by _set_html via _extract_handler_javascript(..., "hover"). Keep click
handling bound to globalThis.ninejs.clickHandlers and ensure resolved hover
callbacks invoke on_hover.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fd93dd7c-c33b-4c5e-a83d-26312f79b527
📒 Files selected for processing (5)
.prettierignoreREADME.mdninejs/main.pyninejs/static/template.htmlninejs/utils.py
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ninejs/static/PlotParserHover.js`:
- Around line 80-81: Fix getHoverHandler to look up the requested id in
hover_handlers using its hover-handler parameter, then return the function or
null as currently intended; remove the out-of-scope click_handlers/click_handler
references copied from getClickHandler.
- Around line 393-394: Correct the misspelled setHoverEffectHanlder call to
setHoverEffectHandler, then update the hover setup around setHoverEffect and
setHoverEffectHandler so both behaviors execute through the existing mouseover
callback without registering competing mouseover listeners on plot_element.
In `@ninejs/static/PlotParserInit.js`:
- Around line 109-118: Update the hover configuration initialization near the
clickHandlers setup to populate hover_config.hoverHandlers from
config_data["hover_handlers"]. Preserve the existing setHoverEffectHandler and
setHoverEffect flows so they receive the configured hover callbacks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3c4154a6-a9b4-4c9f-8829-d2e1294e980a
⛔ Files ignored due to path filters (1)
ninejs/static/PlotParser.min.jsis excluded by!**/*.min.js
📒 Files selected for processing (4)
docs/javascript-reference.mdjustfileninejs/static/PlotParserHover.jsninejs/static/PlotParserInit.js
No description provided.