Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2546,7 +2546,7 @@
"react-dom": "^16.5.2",
"react-error-boundary": "^6.0.0",
"react-redux": "^7.1.1",
"react-svg-pan-zoom": "3.9.0",
"react-svg-pan-zoom": "3.13.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

🏁 Script executed:

# First, check the React version specified in package.json
grep -n '"react"' package.json | head -5

Repository: deepnote/vscode-deepnote

Length of output: 100


🏁 Script executed:

# Check if the three mentioned component files exist
fd -t f '\.(tsx|ts|jsx|js)$' | grep -E '(svgViewer|toolbar|mainPanel)' | head -20

Repository: deepnote/vscode-deepnote

Length of output: 262


🏁 Script executed:

# Search for react-svg-pan-zoom imports in the codebase
rg 'react-svg-pan-zoom' -t ts -t tsx -t js -t jsx -A 2 -B 2

Repository: deepnote/vscode-deepnote

Length of output: 95


🌐 Web query:

react-svg-pan-zoom 3.10 React version requirement compatibility

πŸ’‘ Result:

react-svg-pan-zoom v3.10 migrated the library to React 17 β€” so v3.10 expects React 17 (and may not be fully compatible with older React 16 installs). [1][2]

Sources:

  • GitHub changelog (v3.10: "Migrates to React 17"). [1]
  • npm package changelog/description for v3.x. [2]

🏁 Script executed:

# Retry searching for react-svg-pan-zoom imports with correct file type
rg 'react-svg-pan-zoom' --type=typescript --type=tsx -A 2 -B 2

Repository: deepnote/vscode-deepnote

Length of output: 102


🌐 Web query:

react-svg-pan-zoom 3.13.1 React version requirement

πŸ’‘ Result:

react-svg-pan-zoom v3.13.1 is compatible with React 17 (the v3.x line migrated to React 17 at v3.10), and the package’s peer dependency has historically been "react": ">=16.0.0". [1][2]

Sources:

  • Changelog / README (migration to React 17 noted at v3.10 and v3.13 release info). [1]
  • package.json (peerDependencies: "react": ">=16.0.0" shown in package metadata). [2]

References:
[1] GitHub repo changelog/README for react-svg-pan-zoom.
[2] react-svg-pan-zoom package.json metadata (example: v3.2.0 listing peerDependencies).


🏁 Script executed:

# Search for react-svg-pan-zoom imports in component files directly
cat src/webviews/webview-side/plot/toolbar.tsx | grep -i 'react-svg-pan-zoom' || echo "Not found in toolbar.tsx"
cat src/webviews/webview-side/react-common/svgViewer.tsx | grep -i 'react-svg-pan-zoom' || echo "Not found in svgViewer.tsx"
cat src/webviews/webview-side/plot/mainPanel.tsx | grep -i 'react-svg-pan-zoom' || echo "Not found in mainPanel.tsx"

Repository: deepnote/vscode-deepnote

Length of output: 241


🌐 Web query:

react-svg-pan-zoom v3.13 React 16 compatibility issues known problems

πŸ’‘ Result:

Short answer β€” yes, there are known compatibility pain points when using react-svg-pan-zoom 3.x with older React (16):

  1. The library migrated to React 17 in v3.10, so later 3.x releases assume newer React ecosystem; that can surface subtle incompatibilities running on React 16. (github.com)
  2. Historically CRA/production builds pulled the package’s UMD bundle (which caused runtime issues). The recommended workaround is to import the ES build explicitly:
    import { UncontrolledReactSVGPanZoom } from 'react-svg-pan-zoom/build-es'. (stackoverflow.com)
  3. v3.13 removed deprecated defaultProps and upgraded deps/Storybook; those breaking cleanups can affect older code paths that relied on removed defaults or older React behavior. (github.com)

If you need, tell me your exact react-svg-pan-zoom version and React 16.x patch (16.8/16.13/etc.) and I’ll give concrete fixes or a minimal patch (imports, polyfills, or pinning a 2.x release).

Citations:


CRITICAL: React 16 compatibility issues with react-svg-pan-zoom v3.13.1.

Upgrading from 3.9.0 to 3.13.1 introduces real compatibility problems with React 16.5.2. The library migrated to React 17 at v3.10, and v3.13.1 removed deprecated features (defaultProps, upgraded deps) that create subtle incompatibilities on React 16. Known issues include UMD bundle failures and breaking changes that will affect svgViewer.tsx, toolbar.tsx, and mainPanel.tsx.

Resolution options:

  1. Revert to 3.9.x (compatible with React 16.5.2)
  2. Upgrade React to 17+ and test all affected components thoroughly
  3. If staying on 3.13.1 with React 16, switch to explicit ES build imports: 'react-svg-pan-zoom/build-es'

Verify the chosen path and test affected components before merging.

πŸ€– Prompt for AI Agents
In package.json at line ~2550, the upgrade of react-svg-pan-zoom to 3.13.1
breaks compatibility with React 16.5.2; to fix this either (A) pin
react-svg-pan-zoom back to a 3.9.x release (e.g., 3.9.0) in package.json, run
npm/yarn install and run the UI tests and manually verify svgViewer.tsx,
toolbar.tsx and mainPanel.tsx; or (B) if you prefer the newer lib, upgrade the
app to React 17+ and run full component tests; or (C) as a minimal compatibility
workaround keep React 16 and change imports in affected components to use the ES
build import path ('react-svg-pan-zoom/build-es'), then run installs and test
those components before merging.

"react-svgmt": "1.1.11",
"react-vega": "^7.7.1",
"react-virtualized": "^9.21.1",
Expand Down
Loading