scratchfoundation / scratchfoundation/scratch-blocks

Incorrect Connection Top Bound For Blocks Dragged From Palette

Open
#3,559 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

The bounds in which blocks will connect to others from all sides should be consistent regardless of if it was already in the editor or was currently being dragged from the palette for the first time

Actual Behavior

The top of this bound becomes extremely small when first dragging a block from the palette -- so much so that dragged block needs to become so low that it's overlapping for the connection to be recognized!

Steps to Reproduce

  1. Place any stackable, non-hat block in the editor
  2. Grab a block non-terminating stackable block for the palette (for example a hat block) and attempt to connect it above the previously placed block

Screenshots

How close you need to be to connect above when dragging from the palette:
Image
Vs when the block was already set down in the editor before:
Image

If applicable, add screenshots to help explain your problem.

System Details

Reproduced with consistent results on:
Chromium 144.0.7559.109 on Debian Bookworm
Safari 18.7.5 on iOS 18.7.7

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 reproducing the connection-boundary difference in the block editor using the listed steps, comparing a block dragged from the palette with one already placed. Trace how the top connection bound is calculated during the initial drag, then verify that palette-dragged blocks accept connections from the same distance as placed blocks in Chromium and Safari.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.