Skip to content

(wip) fix(apollo-react): introduce sankey diagram zoom and scale#278

Draft
preston-bao wants to merge 1 commit intomainfrom
fix/sankey-scale-zoom
Draft

(wip) fix(apollo-react): introduce sankey diagram zoom and scale#278
preston-bao wants to merge 1 commit intomainfrom
fix/sankey-scale-zoom

Conversation

@preston-bao
Copy link
Contributor

Summary

  • Add d3-zoom based zoom and pan to ApSankeyDiagram with Ctrl/Cmd+scroll filtering to avoid hijacking page scroll
  • Auto-size SVG dimensions based on data complexity via computeSankeyDimensions utility
  • Add zoom controls (zoom in/out, fit-to-view) with smart fit-to-view that respects user's manual zoom state
  • Fix gradient rendering with userSpaceOnUse using actual link coordinates
  • Fix JSDoc default values for minNodeHeight (36) and minColumnWidth (140)
  • Change container role="img" to role="figure" for proper a11y with interactive children
  • Expand showcase with larger multi-stage agent trace flow dataset

Test plan

  • Verify zoom in/out buttons work correctly
  • Verify fit-to-view resets zoom and centers content
  • Verify Ctrl+scroll zooms, plain scroll passes through to page
  • Verify drag-to-pan works without modifier keys
  • Verify link gradients render correctly from source to target color
  • Verify tooltips position correctly under zoom transforms
  • Verify container resize doesn't reset user's manual zoom
  • Verify new data prop triggers fit-to-view
  • Run computeSankeyDimensions unit tests pass

🤖 Generated with Claude Code

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Feb 27, 2026, 01:54:47 PM
apollo-ui-react 🟢 Ready Preview, Logs Feb 27, 2026, 01:53:26 PM
apollo-vertex 🟢 Ready Preview, Logs Feb 27, 2026, 01:52:58 PM
apollo-wind 🟢 Ready Preview, Logs Feb 27, 2026, 01:52:25 PM

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 2 package(s) with unknown licenses.
See the Details below.

License Issues

packages/apollo-react/package.json

PackageVersionLicenseIssue Type
d3-selection^3.0.0NullUnknown License
d3-zoom^3.0.0NullUnknown License
Allowed Licenses: AFL-1.1, AFL-1.2, AFL-2.0, AFL-2.1, AMPAS, APAFML, Adobe-2006, Afmparse, ADSL, AMDPLPA, ANTLR-PD, Apache-1.0, Apache-1.1, Apache-2.0, AML, Artistic-1.0, Artistic-1.0-Perl, Artistic-1.0-cl8, Artistic-2.0, AAL, Bahyph, Barr, Beerware, BSL-1.0, Borceux, BSD-1-Clause, BSD-2-Clause, BSD-2-Clause-FreeBSD, BSD-2-Clause-NetBSD, BSD-3-Clause, BSD-3-Clause-Clear, BSD-3-Clause-No-Nuclear-License-2014, BSD-3-Clause-No-Nuclear-Warranty, BSD-4-Clause, BSD-Source-Code, BSD-3-Clause-Attribution, 0BSD, BSD-2-Clause-Patent, BSD-4-Clause-UC, bzip2-1.0.5, bzip2-1.0.6, CECILL-B, ClArtistic, MIT-CMU, CNRI-Jython, CNRI-Python, CNRI-Python-GPL-Compatible, Condor-1.1, CC0-1.0, Crossword, CrystalStacker, Cube, curl, diffmark, WTFPL, DOC, DSDP, ECL-1.0, ECL-2.0, eGenix, EFL-1.0, EFL-2.0, MIT-advertising, MIT-enna, Entessa, Fair, MIT-feh, FTL, Giftware, HPND, IBM-pibs, ICU, ImageMagick, IJG, Info-ZIP, Intel, ISC, JasPer-2.0, LPPL-1.3c, BSD-3-Clause-LBNL, Leptonica, Libpng, libtiff, Linux-OpenIB, LPL-1.02, LPL-1.0, MTLL, MS-PL, MirOS, MITNFA, MIT, MIT-0, mpich2, Multics, Mup, NASA-1.3, Naumen, NBPL-1.0, Net-SNMP, NetCDF, Newsletr, NLPL, NRL, NTP, OGTSL, OLDAP-2.2.2, OLDAP-1.1, OLDAP-1.2, OLDAP-1.3, OLDAP-1.4, OLDAP-2.0, OLDAP-2.0.1, OLDAP-2.1, OLDAP-2.2, OLDAP-2.2.1, OLDAP-2.3, OLDAP-2.4, OLDAP-2.5, OLDAP-2.6, OLDAP-2.7, OLDAP-2.8, OML, OpenSSL, PHP-3.0, PHP-3.01, Plexus, PostgreSQL, psutils, Python-2.0, Qhull, Rdisc, RSA-MD, Ruby, Saxpath, SWL, SGI-B-2.0, Spencer-86, Spencer-94, Spencer-99, SMLNJ, TCL, TCP-wrappers, TU-Berlin-1.0, TU-Berlin-2.0, Unlicense, Unicode-DFS-2015, Unicode-DFS-2016, UPL-1.0, NCSA, VSL-1.0, W3C-20150513, W3C-19980720, W3C, Wsuipa, Xnet, X11, Xerox, XFree86-1.1, xinetd, xpp, Zed, Zend-2.0, Zlib, zlib-acknowledgement, ZPL-1.1, ZPL-2.0, ZPL-2.1, BlueOak-1.0.0, BSD-2-Clause-Views, JSON

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@types/d3-selection ^3.0.11 UnknownUnknown
npm/@types/d3-zoom ^3.0.8 UnknownUnknown
npm/d3-selection ^3.0.0 UnknownUnknown
npm/d3-zoom ^3.0.0 UnknownUnknown

Scanned Files

  • packages/apollo-react/package.json

@preston-bao preston-bao force-pushed the fix/sankey-scale-zoom branch from 9106fa6 to 1ee33cf Compare February 27, 2026 21:50
@preston-bao preston-bao self-assigned this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant