Snap icon indicating copy to clipboard operation
Snap copied to clipboard

text inputs have larger areas than builtins

Open ToonTalk opened this issue 3 years ago • 4 comments

E.g.

image

seems OK while

image

leaves lots of white space.

Shouldn't custom blocks look the same as builtin ones?

ToonTalk avatar Apr 03 '21 09:04 ToonTalk

for primitives I'm only ever using the input slot type "any" instead of "text". Personally, I have never liked the "text" type input slots, don't know why we even have them.

jmoenig avatar Apr 03 '21 09:04 jmoenig

This is entirely my fault.

If you look at the Scratch collection of primitives, all of the text related ones come with default input values such as "hello " and "world," whereas all of the numeric ones don't. There are also a few cases in which any input is okay, such as ADD [ ] TO list. So I thought that input slots that expected text strings were wider than input slots that didn't care! So when planning out the long-form input dialog, I had a Text input type and an Any input type. (I do know, and did even then, that numbers are also strings, as in Logo.) I don't recall Jens trying to talk me out of it.

I could be talked into getting rid of Text type, as long as we don't break old code, which I guess means converting Text type inputs to Any type when loading a project.

Maybe if we spec out the User-Defined-Type input type in time for 7.0 we can put that one in place of Text in the dialog. :)

brianharvey avatar Apr 03 '21 09:04 brianharvey

There are also a few cases in which any input is okay...

I think now with hyperblocks all (or nearly all?) text oriented blocks accept lists. split and length of text for example. So now even sentence to list accepts lists.

Before hyperblocks I might have tried to defend the 'text' type but not so much now.

ToonTalk avatar Apr 03 '21 11:04 ToonTalk

I think there are plenty of cases where text is the only logical input -- so I think it perhaps has a value in theory. However, I think given there's no intuitive distinction between text and any, and no practical input differences that Snap! offers, I think it could make sense to remove.

cycomachead avatar Apr 28 '21 04:04 cycomachead