Add image zoom feature for notebook outputs with keyboard shortcut #16908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements image zoom functionality for VS Code Jupyter notebooks, providing the same user experience as Jupyter's double-click image enlargement feature.
Problem
Users reported that unlike standard Jupyter, double-clicking on images in VS Code notebooks does not enlarge them, making it difficult to examine image details in notebook outputs.
Solution
Added a new command
jupyter.openImageInPlotViewerwithCtrl+Shift+Ikeyboard shortcut that opens any image output from the current notebook cell in the existing plot viewer with zoom and pan capabilities.Key Changes
Extended Image Format Support
translateDisplayDataOutput()to enable plot viewer access for ALL image formats (previously only SVG/PNG)PlotViewHandler.openPlot()to support JPEG, GIF, WebP in addition to SVG/PNGconvertImageToSvg()function that wraps any image format in SVG for plot viewer compatibilityNew Command Infrastructure
PlotViewCommandRegistrywith proper dependency injectionUser Experience
Usage
Ctrl+Shift+Ior run "Open Image in Plot Viewer" from Command PaletteTesting
Fixes #16907.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.