Wrapping blocks
See original GitHub issueWhenever I program with Scratch, blocks being too long is always a problem. For example, here are some scripts from my more complicated projects:
And I’ve seen them get much longer than that.
(For reference, Snap! does use block wrapping, so having the editor open while reading this might be useful…)
I think it would be helpful if (vertical) blocks would automatically re-layout themselves when they start becoming pretty long, so that you can see them all in a conveniently short (but still long enough to work with) space.
This would also probably help with organizing scripts - “clean up” would make columns of more similar width.
Here’s what the example scripts above look like in Snap!:
However, block wrapping brings up a couple of questions. What should we do with input literals?
In Snap!, they don’t wrap at all:
It’s possible that we could make inputs wrap like normal blocks on the inside.
For a more internal question - should blocks have specific line break points, or should breaks happen dynamically? Or should there be a combination of both?
Here’s an example in Snap! with manual line breaking (I added %br
s to the spec of the blocks):
They definitely look better than before.
But then you get this, when there aren’t any input values:
…which doesn’t look so great. So it’s a little puzzling, exactly how manual/dynamic breaks should be handled…
Here’s the project.xml download for the demo Snap! project: http://www.mediafire.com/download/6iu71f1737kqqok/Wrapping_Demos.xml
And of course this is just all an idea. 😃
(Edit 2018 03 18: Formatting fixes.)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:6 (4 by maintainers)
Top GitHub Comments
What about a right-click option for showing the block in the palette?
Possibly a smooth animated scroll to where it is in the palette (if you have the category selected) to give you a better idea of where it is relative to other blocks?