Mixing categories and other objects in the toolbox

104 views
Skip to first unread message

nekom...@gmail.com

unread,
Nov 23, 2020, 8:22:27 AM11/23/20
to Blockly
I have an application with custom blocks. These blocks are organized in categories in the toolbox. However, since there is a lot of free space under the categories, I could place a few buttons there, so I won't have to create a separate toolbar.

The problem is, Blocky seems to ignore blocks, buttons and labels outside of the top level categories. Which is strange, since I can mix them inside the categories with subcategories.

I would like the following structure:
  • category
    • block
    • ...
  • category
    • block
    • ...
  • separator
  • button
How can I achieve this?

Abby Schmiedt

unread,
Nov 24, 2020, 5:16:51 PM11/24/20
to Blockly
Hello!

What we refer to as the toolbox is actually made up of two different parts, the toolbox and the flyout.
Screen Shot 2020-11-24 at 1.51.32 PM.png

The toolbox supports: 
- Categories
- Separators (white line)

The flyout supports: 
- Buttons
- Blocks
- Labels
- Separator(Just space, not a white line)

However, with the most recent toolbox update you should be able to add buttons/labels to your toolbox. This can be done by following the "Adding a custom toolbox item" section of the Customizing a Toolbox codelab. Adding a button will require a bit more work, so if you need help feel free to respond here. 

Cheers,
Abby

nekom...@gmail.com

unread,
Nov 24, 2020, 5:55:02 PM11/24/20
to Blockly
I have just found that tutorial and managed to implement the desired outcome. It works awesome.

However, from an outsider point of view, I don't see any technical difficulties preventing to support this feature out of the box. Please, consider implementing it.

Abby Schmiedt

unread,
Nov 24, 2020, 7:15:54 PM11/24/20
to Blockly
Hello! 

If you would like to see this feature in core feel free to open a feature request on github. This doesn't necessarily mean it will be added in core, but depending on likes/comments by other developers helps us gauge interest in the feature.

Cheers,
Abby

Reply all
Reply to author
Forward
0 new messages