Sorting menus

Unlikely Scratch, I noticed just now that items in Snap menus (costume names, sound names, message names, etc) are not sorted alphabetically.

This is a huge problem for my students, as in their projects (I hope in someone else's too :slight_smile: ) they use many messages (on the average about 100-150 per project), sounds (about 50-100 per project) and costumes.

Is maybe sorting items in the menus in good position in the development plan of Snap? If this is just a problem of efficiency, maybe that could be done just when a corresponding flag is checked in the option menu. Looking for the right message in a unsorted list of 150 messages is -at least to them- a real nightmare.

Hi Stefano,

Maybe we need to split this sorting feature in different threads

  • For costumes, maybe it is not good. Current order is their costume number. And in Snap! is quite important (using "next costume" for example... or we can use "switch to costume (number)"
  • For sounds is different. We can not use "play sound (number)". But it is still the sound number. Everybody can reorder sounds (on sound tab) and get the order they want. Maybe we can add a "sorting feature" inside sounds tab.
  • For messages is different. Current order looks over sprites (in their creation order) and blocks with messages (in the block creation order). Maybe an alphabetically order will be fine. Or maybe I'm missing something...

A possibility would be to implement an auto alphabetically order to messages, and only to implement an "alphabetically sorting" feature to sounds and costumes tabs. Then, users will decide if they want this sorting.

Joan

Hi Joan,
I'm not completely positive about your proposal. The reason is that the order of costumes and sounds and often messages is often very useful, as they are usually (not always of course, but usually) ordered in the order they are used inside the project. So, sorting them would "corrupt" an important information kept by their original order.

Instead, in the menus, you want to quickly find, e.g., a message you just created in a BROADCAST block so to use it in a WHEN I RECEIVE block.

That is why I strongly support an unsorted order in the tabs, but an alphabetical order in the menus.

100 is quite a lot of messages!

Yup. You can see an example at https://scratch.mit.edu/projects/395795340/editor/ of a project based on about 140 messages

In Snap! you can just use the "tell to" block

Hi Stefano,

Really, I think my "proposal" (yes, it is only a first idea) is giving answer to your questions:

  • Yes to alphabetical sorting for messages dropdown menu.
  • Keep current sorting (by order) for costumes and sounds. And offer the possibility (a new button) for alphabetical sorting these items in their tabs (sounds and costumes tab). But it will be only a possibility.
    And yes, many projects will prefer other orders... and they don't use this button... but if that order is important, I guess they also prefer the same order on the dropdown menu.

Joan

Excellent

I like the current order in the tabs. I don't want it to be changed. Indeed, when I create costumes and sounds in my lessons, I do that stepwise, so that a new costume is often a slight elaboration of the previous costume. And it is good that they are one below the other. But they may end up having very different names (such as, e.g., "ok" and "wrong"). So, ordering the tabs alphabetically is not good for me. At the same time I would like to be able to quickly find costume and sound names in the dropdowns.

As I said, I like a lot having different orders (creation order in the tabs, alphabetical in the dropdowns) for those elements.

Sorry for not agreeing :slightly_smiling_face:. But I like discussing those issues with you.

There's no "messages tab," so I don't see any problem with alphabetizing them.

For costumes and sounds, how about an option switch on the tabs saying "include {costume/sound} number in name for sorting"? So, the menus would always be sorted, but the sorting would optionally include the costume number, thereby preserving tab order in the menu. (Yes, perhaps with leading zeros.) This would have to be checked at the moment you pull down the menu, but slightly slowing down the UI isn't as bad as slightly slowing down the actual running of the program.

Excellent proposal. So that you can slightly slow down the dropdown if you really want it sorted. Agree..

Is that sarcasm? Tbh, which is slower: the slight slow-down to sort the menu items to more easily find what you want, or keep the menu items unsorted and spend a while looking for what you want?

Obviously no sarcasm at all. I don't intend to slow down Snap as it works internally. But, as I said, looking for a specific message amont 150 other messages is simply almost impossibile (you keep going up and down the list of messages missing the one you need). So this is absolutely vital for me. If this slows down the dropdown menu showing up (but, I guess, only for me as not many projects have so many messages) to me it is perfectly fine

I just want the costumes and sounds to always be in the order they were made in, but the messages to be in alphabetical order

That's the proposal. (Except that the user can explicitly reorder costumes and sounds by dragging them up and down.)

Yes, exactly. Except that you can explicitly ask to sort the dropdowns even for costumes and sounds if you need it. If you like them to be ordered in creation order even in the dropdowns, you don't have to do nothing.

Waiting for Jens comments and trying to define this clearly:

  • For Messages , it is clear. The proposal is alphabetical sorting on dropdown menus.

  • For Costumes and Sounds, we need more details to define:

    • I guess default behavior must be our current behavior (tab list order)
    • You want a check (on tabs) to select "Alphabetical order on dropdown menus". It will be a new project value (saved with the project). Or it is an IDE value (saved with user preferences)? Or it is not saved?
    • Aside this, Brian talked about adding numbers (the list order) to the dropdown options. Do you want this? Or only add this numbers when alphabetical option is selected (to see the "real order")? Or adding this always? And which format (1., 1-, 1 ...)?
      If you choose always, it will looks like...

    (normal order)

normalOrder

(alphabetical order)

AlphaOrder

Brian and Jens, if there is some consensus, you can fix these details and then... continue.

Joan

Yes

Right

I'd rather an option in the settings menu, but even a check in the tabs, as proposed by Brian, will work well for me.

The ideal for me is an IDE value saved with user preferences

I had interpreted Brian's proposal "include {costume/sound} number in name for sorting" differently. I see it just as further information to be taken into account during sorting, not actually adding the costume/sound number in the dropdowns.

So, if "include {costume/sound} number in name for sorting" is flagged, if "c costume" is the first costume it will show up in the dropdown as "c costume" but in first position. Instead, if "include {costume/sound} number in name for sorting" is not flagged, "c costume" will show up in the dropdown as "c costume" and in third position, even if it is the first costume in the tab.

Is the proposal now more clear?

I had been envisioning a checkbox in the costume/sound tab of each sprite, but I guess you're right, this is entirely a UI feature, not affecting how the project runs, so a gear-menu per-user option is the right thing.

That will be'narrow-casting'instead of broad-casting

Sorting messages alphabetically is a good idea, funny we didn't think of it earlier :slight_smile: I'll add it right away.
Thanks, Stefano!