Skip to content

Conversation

@gonfunko
Copy link
Owner

This ensures that a toolbox category is always displayed as selected, even if focus moves somewhere else.

@rachel-fenichel
Copy link
Collaborator

The description says "even if focus moves somewhere else," but the implementation leaves selection in place only if there is no new selection. What am I missing?

@gonfunko
Copy link
Owner Author

"Focus" is probably a bit of a misnomer, the behavior I was seeing was clicking in the flyout/workspace caused the toolbox category to lose its selection highlight. By returning false when asked if it's OK to deselect a category without a replacement, that behavior is prevented.

@gonfunko
Copy link
Owner Author

In looking at RaspberryPiFoundation/blockly#9126 I think this is actually a ~regression in core; it's now the case that, when the toolbox loses focus, it deselects its selected category. I don't think it should do that; I think that category should just become passively focused? But also want to run that by Ben. Moving this to draft and punting on 9126 until he's back.

@gonfunko gonfunko marked this pull request as draft June 13, 2025 21:23
@gonfunko gonfunko force-pushed the toolbox-category-selection branch from 9ea0bee to 2551018 Compare July 15, 2025 20:58
@gonfunko gonfunko marked this pull request as ready for review July 18, 2025 20:21
@gonfunko gonfunko merged commit af66069 into modern-blockly Jul 31, 2025
1 check passed
@gonfunko gonfunko deleted the toolbox-category-selection branch July 31, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants