Snapblocks (Part 3)

Continuing the discussion from Snapblocks (Part 2) - #253 by ampelectrecuted.

Previous discussions:

I have debated this, and decided against it. That could be used to give inaccurate results, which I don't want to support. If you want to show someone the result of a script, just run the script in the snap editor.

Another reason I'm not adding it is that I'd have to create a whole lists renderer, and I may have to add costume support. It's just too much for one feature that would likely result in people thinking they know the result of a script without testing. I just don't want to get into that.

Imagine creating a separate extension that can render lists, Booleans... and have them look exactly like they are taken from Snap!

Well, booleans are already done, it's just lists, tables, and costunes that aren't.

If you quote snapblocks it returns with the text that is rendered, without spaces!

when gf clicked
move (10) steps
set [variable V] to ((timer) + ([abs V] of (another variable)))
write [test] size (64)
whenclickedmove10stepssetvariabletotimer+absofanothervariable

Also, am I the only one noticing the text shadow for blocks lightened by zebra coloring should be white, not black?

Unfortunately I don't know how to fix that, because discourse didn't document their extension api very well, especially when it comes to markdown extensions.

No you're not. I've known about it about as long as I've added zebra coloring. I've just been neglecting to add it.

What about keeping the svg as noselect, and have the sb code in the alt/title

The problem is that what gets quoted is the visual text, it doesn't automatically use the alt text instead.

However I have finally decided to ask about it on discourse meta, and it seems like there's a chance I'll be able to get it to work (I haven't tested anything yet).

good luck

After a bit of work, I finally got quoting snapblocks working!

Unfortunately it only works on posts with snapblocks made after I updated the plugin (basically after this post).

Here's a small snapblocks [test] with more text.

Yay!!!

Testing

when gf clicked
move (10) steps
set [variable V] to ((timer) + ([abs V] of (another variable)))
write [test] size (64)

...

It is still bugged! It compresses snapblocks into one line, breaking it.

I don't know why I didn't bother to test that, lol.

Quoting multiline snippets now work!

Great! By the way, why don’t [scratchblocks] tags work anymore? A lot of old forum posts don’t render the blocks at all.

It looks like the old scratchblocks theme component was disabled, so the theme component would have to be re-enabled, or the server admin would have to rebake all the posts (I can't do that).

I see...

Also, I'm not sure if this is intentional, but the padding of number inputs is a bit uneven.

test quoting :: #f08000 //should work? hopefully // I guess ?

certainly not working for me.