scratchfoundation / scratchfoundation/scratch-blocks

Auto-Layout of block comments positions comments really far from blocks with wide stacks.

Open
#1,624 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

Auto-layout of block comments (this happens when importing a 2.0 project with block comments) should position comments some fixed distance from the whole stack, so that all block comment from a single stack of blocks begin at the s x position.

Actual Behavior

Auto-layout of block comments currently positions a comment the width of the stack + some fixed number away from the end of a block (right edge of a block in LTR or left edge of a block in RTL).

This causes some comments to appear really far away from the block they're connected to (if that block is the one that makes the stack really wide).

E.g.

image

gets imported as:

image

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 auto-layout path used when importing a 2.0 project with block comments. Reproduce the wide-stack case from the issue image and trace how comment positions are calculated for LTR and RTL layouts. Done means comments stay a fixed distance from the whole stack and comments from one stack begin at the same x position.

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.