Make moving (reordering) blocks inside a script less frustrating

Please, someone tell @ddekany that Snap! is not a copycat of Scratch. Because Snap! is very different from Scratch.

Any ideas (proposals), how a block could be added/inserted instead without having to drag it from the palette?

Ha ha, are you being sarcastic?

You're right in terms of GUI, but in terms of many things being first class, it is quite different imho.

No offense was intended. It's just someone (Scratch?) come up with this puzzle-pieces-in-a-2D-space idea, and since then almost every kid "IDE" looks like this. Not just Snap. Despite that the point should be just to avoid typing and syntax, which doesn't mandate all this at all.

Off topic, so open a new topic if this my rant is interesting. :slight_smile: But it's just how you do it in any editor: you have a cursor. If you press a button, it's implied that you wanted to insert there. Only difference is that here instead of "characters" you have blocks, so it's like vertical writing.

1 Like

It is interesting. Should I ask @bh to move this part of conversation to a new thread?


You may search forum or manual for keyboard editing mode.

I've managed to implement it :slight_smile:



But why is the How to enable block typing using keyboard? thread in the uncategorized; it should be in idk the Tutorials (Here's how to) category, I guess.

An important point of these visual editors is that you (well, the kids) don't have to type. BUT... off topic, so, @kinestheticlearning please go ahead and move it to its own topic, as you offered.


How did you do it? Have you edited the Snap! source code?

I can't (am not a moderator, only moderators can).

Cool, but "extract"? Shouldn't it be "move", or even "move single block"?

Also, how about adding the Ctrl+click shortcut, as it's in Blockly, Arcade, etc. Not everybody will use it for sure, but some will. (More would, if the context menu shows "Ctrl+left" as well.)

Yes - we can run our own versions of Snap! (without cloud login facility) by just downloading the source code and just opening the index.html file with a browser :slight_smile:

(I believe you can get cloud as well but that requires having your webserver AFAIK)

I found the right-click menu code section and just copy/pasted the code for the duplicate entry and then just called the code that deletes a block after making the copy

1 Like

So, you have your own personal copy of Snap! source code? Wow.

I would be too afraid to mess things up, if I tried to edit anything in source code. It seems you are not afraid of messing up things.

That is useful for prototyping just the way you did it now. Do you have any special editor for source code editing?

Can you make a short tutorial and show exactly how you did this prototype?

1 Like

The syntax came from the discussion in the GP forum

and as @tguneysu posted, John (Maloney) has implemented the idea in Microblocks so at the moment, its the de-facto standard :slight_smile:

I'm not tied to the name but the all the action does is "extract" the block from the script - it doesn't move it anywhere in particular (Just like the duplicate blocks - they just make a copy - they don't move/put them anywhere)

"Move" meant to be what you wanted to achieve, and therefore, what you will probably look for in the context menu. But true, it's not strictly what it does. However, you will automatically hold that block after clicking on that menu item, so you will move it together with the mouse pointer. (At least "duplicate" does that.) So it's not a lie either if we call it "move".

One caveat... what's with the touch interface. There you won't hold the block initially. (I never even tried Snap with touch, but I assume so.) Well, you still moved the block out of its original place...

I just used Notepad++ (I'm using Windows)
Every now and then I try playing with specialist code editors but I find them too complex for my simple needs :slight_smile:

Unfortunately, I'm not very good at writing tutorials/documentation :frowning:

Here's what I do:

... a :: grey
block or script to move
... b :: extension

Drag ... b above block or script to move

... a :: grey
... b :: extension
block or script to move

Then move block or script to move to where I want it

1 Like