fix: include comment bubbles in blocks screenshot export#320
Merged
takaokouji merged 1 commit intodevelopfrom Mar 16, 2026
Merged
fix: include comment bubbles in blocks screenshot export#320takaokouji merged 1 commit intodevelopfrom
takaokouji merged 1 commit intodevelopfrom
Conversation
The screenshot export was only cloning workspace.svgBlockCanvas_ which contains only blocks. Comment bubbles are rendered in a separate SVG group (workspace.svgBubbleCanvas_) and were excluded from the exported PNG. This adds bubble canvas cloning and bounding box merging so that @ruby:* comments and other comment bubbles appear in screenshots. Fixes #319 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🚀 Preview deployed: https://smalruby.jp/smalruby3-editor/fix/screenshot-include-comments/ |
github-actions bot
pushed a commit
that referenced
this pull request
Mar 16, 2026
…t-include-comments fix: include comment bubbles in blocks screenshot export
4 tasks
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
buildExportSVGでworkspace.svgBubbleCanvas_もクローンして SVG に追加mergeWithBubbleBBoxを追加し、バウンディングボックスをコメント位置まで拡張Changes
packages/scratch-gui/src/lib/blocks-screenshot.js:mergeWithBubbleBBox()関数を追加(ブロック bbox + バブル bbox の合成)buildExportSVG()でバブルキャンバスもクローン・追加downloadBlocksAsImage()で merged bbox を使用packages/scratch-gui/test/unit/lib/blocks-screenshot.test.js:mergeWithBubbleBBoxのテスト 3 件追加buildExportSVGのバブルキャンバス含有テスト 2 件追加makeMockWorkspaceにsvgBubbleCanvas_サポート追加Implementation Steps
Definition of Done
@ruby:*コメント付きブロックのスクリーンショットにコメントバブルが表示される(hasBubbleContent: true確認済み)bubbleChildren: 0確認済み)Fixes #319
🤖 Generated with Claude Code