-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
issue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Problem
No response
Request
Currently, when a parent toolbox category contains blocks alongside nested categories, reopening the parent category after dragging a block requires a double click, since the category is not collapsed automatically. This creates unnecessary friction.
Expected behavior:
- If the parent category contains blocks: collapse the parent after a block is dragged, so reopening the nested category only requires a single click.
- If the parent category contains no blocks: keep the current behavior.
More context in this group discussion.
Reproduction Steps
- Create sample app:
npx @blockly/create-package app hello-world - Add a nested toolbox category with blocks in the parent category
- Open the nested category
- Drag a block onto the workspace
- Try reopening the parent category (Requires double click)
Example toolbox config:
{
kind: 'category',
name: 'Nested',
categorystyle: 'text_category',
contents: [
{
kind: 'block',
type: 'text',
},
{
kind: 'block',
type: 'text_join',
},
{
kind: 'category',
name: 'Nested Level 2',
categorystyle: 'text_category',
contents: [
{
kind: 'block',
type: 'text_join',
},
{
kind: 'block',
type: 'text_indexOf',
},
{
kind: 'block',
type: 'text_getSubstring',
},
{
kind: 'block',
type: 'text_changeCase',
}
]
}
]
}
],
};
screenrecording-2025-09-29_11-39-15.mp4
Metadata
Metadata
Assignees
Labels
issue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong