scratchfoundation / scratchfoundation/scratch-blocks
Make custom block inputs reorder-able
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
Expected Behavior
This is a feature request, breaking it out from https://github.com/LLK/scratch-blocks/issues/1103#issuecomment-333831729 since that issue is closed. It'd be nice if it was possible to reorder inputs in the custom block editor. As @towerofnix said on the original issue:
Probably related - should these fields be draggable/reorderable, somehow? Reordering inputs and labels in a custom block definition is a bit of a pain right now. (For example, if you want to add a label or input at some spot in the block, you have to delete all labels and inputs positioned after the place you want the new one to be.)
A couple possible solutions might be drag-and-drop or left and right buttons that appear with the "trash" icon.
Actual Behavior
There's no way to reorder the inputs.
If you try drag-and-drop: if the input is not being edited, the custom block editor is panned. If the input is being edited, the text within it is either selected or dragged
Steps to Reproduce
- Switch to the "My Blocks" category of the toolbox
- Click "Make a Block"
- Add some inputs:

There's no way to reorder them besides deleting them and re-creating them
Operating System and Browser
MacOS 10.12.4 / Chrome 65.0.3325.181 (64-bit)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the custom block editor reached through the My Blocks toolbox category and Make a Block, then inspect how inputs are edited and how editor panning handles pointer movement. Done means inputs and labels can be reordered without deleting and recreating later items, using either drag-and-drop or explicit controls.
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
- 35/100