scratchfoundation / scratchfoundation/scratch-blocks

Feature request - change order of parameters of custom block

Open
#2,990 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Imagine you have next case of blocks, a custom block which renders specific sprite at specific coordinates with specific color effect
DrawEntity1

You decided that it would make more sense that position input should entered before color input.
Currently your only options is delete that input and then add it at the end.
Two problems occurs:

The values of previous inputs gets deleted (or if there are blocks in argument inputs they get popped out)

DrawEntity2

And the second problem is if you want to for example to move type between position and color, so the position is first and then type and then color, you will have to delete type, then delete color, then add type, and add color. This will get as problematic as you have more parameters. The main problem is that your current arguments inputs get "invalued" as described before.

So my suggestion is:
When selecting any parameter (or text) inside custom block edit menu, draw two arrows (left and right) below that (similarly as trash bin is upwards, arrows should be downwards).
So when you press left arrow parameter or text gets left and vice versa for right.
That will solve this problem.

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

Start by locating the custom block edit menu and its existing delete control, then trace how parameter inputs and nested blocks are represented when reordered. Add a way to move the selected parameter or text left and right while preserving its current value or nested block, and verify that arbitrary parameter orders remain intact.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.