Repository navigation
feat(aggregator): expand + zoom/pan controls on every /aa chart (#3298) - #4154
Conversation
- Six explorer charts (xpl-c1..c6) get server-rendered Expand / zoom-in / zoom-out / reset buttons beside their existing controls - Band scatters built client-side (renderRecs / renderBandComparisons) get the same tools injected by the enhancer, so no chart on /aa is left without them - Zoom/pan is pure viewBox manipulation (buttons, wheel-at-pointer, drag-pan while zoomed) with per-chart state tracked across redraws; a draw that resets the viewBox drops stale zoom instead of misapplying it - Expand toggles a fixed overlay on the chart card; Esc or the Close button exits; drag-pan suppresses the click it would otherwise fire on chart points - Filters, perspective switcher, downloads and data rendering unchanged; PNG export now reflects the visible (possibly zoomed) region - Tests: tool set present for all six charts; enhancer ships for dynamic charts and the emitted script still parses
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit details
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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b61ea61d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- P1: defer pointer capture until a pan gesture is actually detected, so ordinary clicks still reach point/bar selection handlers - P2: renderRecs re-runs enhanceCharts() after its own redraws, so recommendation-input changes no longer strip band-chart controls - P2: bare band scatters in the shared #xpl-recs/#xpl-bandgroups containers get a dedicated .chart-mini wrapper, so Expand isolates one chart
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88920b4a06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| svg.addEventListener("pointermove", function (e) { | ||
| if (!drag) return; | ||
| var dx = e.clientX - drag.lx, dy = e.clientY - drag.ly; |
There was a problem hiding this comment.
Clear pending drags when the pointer is released outside the SVG
On a zoomed chart, pressing near its edge, leaving before pointer capture starts, and releasing outside leaves drag populated because the SVG never receives pointerup. Moving back over the chart then pans it without any button pressed: this handler treats the stale drag as active, and the failed capture is silently swallowed. Clear pending drags on outside release/cancellation, or check e.buttons before continuing a mouse drag.
Useful? React with 👍 / 👎.
| var r = svg.getBoundingClientRect(); | ||
| if (!r.width || !r.height) return; | ||
| st.cur[0] -= dx * st.cur[2] / r.width; | ||
| st.cur[1] -= dy * st.cur[3] / r.height; |
There was a problem hiding this comment.
Transform pointer coordinates using the rendered SVG scale
When an expanded chart hits the new CSS max-height limit on a wide viewport, its SVG element remains full-width but the viewBox is rendered with horizontal letterboxing. Dividing by the element's bounding-box width therefore understates horizontal pan distances; the wheel handler's bounding-box fractions likewise zoom toward the wrong position instead of the point under the cursor. Convert pointer positions and deltas through the SVG screen transformation matrix, or account for the actual rendered viewBox rectangle, so expanded charts track the pointer correctly.
Useful? React with 👍 / 👎.
Summary
Implements #3298 (Drew's order, queue task 4886): every chart on the aggregator /aa page gets an expand button and zoom/pan controls.
What landed
Tests
Remaining acceptance step
Live verification on https://amd-6.raptor-pumpkinseed.ts.net/aa follows the normal deploy from the laptop primary clone after merge; task 4886 tracks it.
Need help on this PR? Tag
@codesmith-botwith what you need.