feat: add screenshot export to Ruby tab#323
Merged
takaokouji merged 5 commits intodevelopfrom Mar 16, 2026
Merged
Conversation
Add a camera button above the zoom controls in the Ruby tab that captures the Monaco editor content (including line numbers and furigana annotations) as a PNG image. Uses html-to-image library to capture the editor DOM, temporarily expanding the editor to full content height for long programs. Closes #322 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🚀 Preview deployed: https://smalruby.jp/smalruby3-editor/feature/ruby-tab-screenshot/ |
Temporarily disable scrollBeyondLastLine before capturing to get tight content height without extra whitespace below the last line. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The screenshot button was added as the first child of zoomControlsWrapper, shifting zoom button indices by 1 in integration test xpath selectors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace fragile button index selectors with data-testid attributes for stable test targeting regardless of button order changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add skipFonts option to html-to-image to avoid SecurityError when reading cssRules from Monaco Editor's cross-origin CDN stylesheet. The editor fonts render correctly without web font embedding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions bot
pushed a commit
that referenced
this pull request
Mar 16, 2026
…tab-screenshot feat: add screenshot export to Ruby tab
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.
Summary
Ruby タブの Monaco エディタの内容(行番号・ふりがな含む)を PNG 画像として保存する機能を追加。
html-to-imageライブラリで Monaco エディタの DOM をキャプチャImplementation Steps
Definition of Done
Test Plan
Closes #322