waterbearlang / waterbear

Visual block syntax for programming languages
http://waterbearlang.com/
358 stars 88 forks source link

Ghost elements #1314

Open dethe opened 8 years ago

dethe commented 8 years ago

There are times we want to select the place an block will be, to fill in later with a specific block. This can be tied with keyboard controls for instance to indent a block or set of blocks with a placeholder for a new contex wrapper.

CelticMinstrel commented 8 years ago

The context placeholder is probably by far the most useful case for this.

dethe commented 8 years ago

Super useful for expressions too. Right now if you want to replace a number with a math expression it's super annoying to remove the number, insert the math, then put the number back in. This way you could wrap the number with a ghost expression, then find the math block you wanted to replace the ghost.

There's a use case for steps too: I want a step here, so mark it with a ghost while I find the block to put there.

dethe commented 8 years ago

There's another interaction possible too. Right now we don't allow blocks to be dropped sockets that already have expression blocks, but we could prompt "replace, wrap, ignore".

CelticMinstrel commented 8 years ago

Ah, yeah, I see what you mean for expressions.