Scratchblocks projects site#1512
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5a9336a. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR integrates the scratchblocks library into the editor UI so Scratch-format code snippets in the instructions panel can be rendered as Scratch blocks (SVG), including additional styling for Scratch block category highlighting.
Changes:
- Add
scratchblocksdependency and lockfile entry. - Render scratchblocks in
InstructionsPanelforcode_editor_scratchprojects using a newsrc/utils/scratchblockshelper. - Add tests for scratchblocks initialization in the instructions panel and add SCSS for Scratch block category highlighting.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds scratchblocks dependency. |
| yarn.lock | Locks scratchblocks@3.7.0. |
| src/utils/scratchblocksLocales.js | Adds a local locale index used for scratchblocks language loading. |
| src/utils/scratchblocks.js | Implements scratchblocks initialization + locale mapping + SVG rendering for Shadow DOM use. |
| src/components/Menus/Sidebar/InstructionsPanel/InstructionsPanel.jsx | Calls scratchblocksInit() when showing instructions for Scratch projects. |
| src/components/Menus/Sidebar/InstructionsPanel/InstructionsPanel.test.js | Adds coverage asserting scratchblocks init + re-rendering behavior. |
| src/assets/stylesheets/Instructions.scss | Adds category color styles for Scratch code blocks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // copy of scratchblocks/locales/all.js to avoid jest module import errors | ||
| import ab from "scratchblocks/locales/ab.json"; | ||
| import af from "scratchblocks/locales/af.json"; | ||
| import am from "scratchblocks/locales/am.json"; |

Before:

After:
