Add PNG/SVG export functionality for Bokeh plots (Issue #132) - #140
Open
jayhesselberth wants to merge 2 commits into
Open
Add PNG/SVG export functionality for Bokeh plots (Issue #132)#140jayhesselberth wants to merge 2 commits into
jayhesselberth wants to merge 2 commits into
Conversation
Implement static image export with dimension control: **Python Backend**: - Create `squiggy/export.py` with PNG/SVG export functions - Add `export_plot_to_png()` and `export_plot_to_svg()` for direct export - Add `export_current_plot()` wrapper for extension integration - Store last generated plot in global `_last_plot_figure` variable - Update all plotting functions to call `set_current_plot()` **TypeScript Extension**: - Add `squiggy.exportPlot` command with export dialog UI - Prompt for format (PNG/SVG/HTML), dimensions, and DPI - Call Python export functions via PositronRuntime - Update `SquigglePlotPanel` with `exportPlotWithPython()` method **Features**: - PNG export with configurable width, height, and DPI - SVG export with configurable width and height - HTML export (existing functionality, now integrated) - Interactive dialog for dimension control - Selenium auto-managed via Selenium Manager (>=4.6) **Dependencies**: - Uses existing `export` optional dependency group in pyproject.toml - Requires `pip install squiggy-positron[export]` for PNG export - SVG export has no additional dependencies **User Experience**: - Command palette: "Squiggy: Export Current Plot (PNG/SVG/HTML)" - Prompts for format selection - Prompts for dimensions (width, height) - Prompts for DPI (PNG only) - Shows save dialog with appropriate file extension - Displays success message with file path Closes #132
- Remove unused `io` import from squiggy/export.py - Remove unused `svg_io` variable assignment - Sort imports in squiggy/__init__.py - Remove unused ExportOptions interface from plot-commands.ts - Prefix unused parameters with _ in squiggy-plot-panel.ts All tests pass and linting is clean.
lkwhite
added a commit
that referenced
this pull request
Nov 9, 2025
- Remove unused `io` import from squiggy/export.py - Remove unused `svg_io` variable assignment - Sort imports in squiggy/__init__.py - Remove unused ExportOptions interface from plot-commands.ts - Prefix unused parameters with _ in squiggy-plot-panel.ts All tests pass and linting is clean.
jayhesselberth
force-pushed
the
claude/code-review-011CUvW2qdGqBJcAmTG3KLWG
branch
from
March 3, 2026 22:05
40acaa1 to
277d9ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implement static image export with dimension control:
Python Backend:
squiggy/export.pywith PNG/SVG export functionsexport_plot_to_png()andexport_plot_to_svg()for direct exportexport_current_plot()wrapper for extension integration_last_plot_figurevariableset_current_plot()TypeScript Extension:
squiggy.exportPlotcommand with export dialog UISquigglePlotPanelwithexportPlotWithPython()methodFeatures:
Dependencies:
exportoptional dependency group in pyproject.tomlpip install squiggy-positron[export]for PNG exportUser Experience:
Closes #132