scratchfoundation / scratchfoundation/scratch-blocks

Make custom block inputs reorder-able

Open
#1,432 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

request
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
  1. Switch to the "My Blocks" category of the toolbox
  2. Click "Make a Block"
  3. Add some inputs:
    image
    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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.