scratchfoundation / scratchfoundation/scratch-blocks

Loop insertion marker can't move from "around" to "previous" and vice-versa

Open
#547 1 comment 0 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

If you drag a pants block over another block, then try to drag it left so that it's before the other block, the insertion marker won't move until you drag away and return. This is nothing severe but slightly clunky.

drag left broken
dragging left with the issue

The expected behaviour can be achieved by patching updatePreviews to recognise an insertion marker as invalid if localConnection has changed, not just if highlightedConnection has changed.

drag left fixed
expected behaviour

I tried to fix this with #252, which caused #263, so I reverted the change.

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 tracing updatePreviews, then reproduce dragging a block across another block from "around" to "previous" and back. Review the history and regressions in #252 and #263 before changing behavior. Done means the insertion marker updates immediately when localConnection changes, without dragging away and returning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.