scratchfoundation / scratchfoundation/scratch-blocks
Auto-Layout of block comments positions comments really far from blocks with wide stacks.
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
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.

gets imported as:

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