scratchfoundation / scratchfoundation/scratch-blocks

"Duplicate this block" context menu option

Open
#1,913 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
2.8k
Forks
1.6k
Avg merge
4h 51m
Merged PRs (30d)
12

Description

Often times it's wanted to duplicate a single stack block already present on the workspace; for that purpose, there should be a context menu option, which would act as the normal Duplicate option but only duplicate the stack block (and attached reporter blocks) that was clicked - not any blocks below the stack clicked block.

This option is quicker than moving the mouse to the flyout and scrolling it until the wanted block is found, and cleaner (as well as quicker) than separating the blocks below the wanted block, duplicating it, then putting the separated blocks back together.

For example, right-clicking the "glide" block in the image below and selecting "Duplicate this block"...

move 10 steps; glide 1 secs to x: -35 y: (y position + pick random -30 to 30); start sound (Squeaker Sneak)

...would duplicate the "glide secs" block (and attach it to the cursor), including the reporter blocks like "y position" and "pick random", but not the "start sound" block (or any blocks below the glie block).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the existing Duplicate context-menu option and its block-selection behavior, then compare it with the requested single-stack-block behavior. Done means a clicked block can be duplicated with its attached reporter blocks while excluding blocks below it, with the duplicate attached to the cursor.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.