Skip to content

Scratchblocks projects site#1512

Open
rammodhvadia wants to merge 13 commits into
mainfrom
scratchblocks-projects-site
Open

Scratchblocks projects site#1512
rammodhvadia wants to merge 13 commits into
mainfrom
scratchblocks-projects-site

Conversation

@rammodhvadia

@rammodhvadia rammodhvadia commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
  • adds scratchblocks library
  • uses the scratchblocks helpers from projects-ui to render scratchblocks in instructions panel
  • adds styling for scratch code block highlighting for instructions panel

Before:
image

After:
image

@rammodhvadia rammodhvadia temporarily deployed to previews/1512/merge June 30, 2026 10:31 — with GitHub Actions Inactive
@rammodhvadia rammodhvadia temporarily deployed to previews/1512/merge June 30, 2026 10:37 — with GitHub Actions Inactive
@rammodhvadia rammodhvadia marked this pull request as ready for review June 30, 2026 10:56
Copilot AI review requested due to automatic review settings June 30, 2026 10:56

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread src/utils/scratchblocks.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 scratchblocks dependency and lockfile entry.
  • Render scratchblocks in InstructionsPanel for code_editor_scratch projects using a new src/utils/scratchblocks helper.
  • 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.

Comment thread src/assets/stylesheets/Instructions.scss
Comment thread src/assets/stylesheets/Instructions.scss
Comment thread src/utils/scratchblocks.js
Comment thread src/utils/scratchblocks.js Outdated
Comment on lines +1 to +4
// 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";
@rammodhvadia rammodhvadia temporarily deployed to previews/1512/merge June 30, 2026 11:17 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants