From 418bebe72ccf395942f2743bc585affe7b5ded9e Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Mon, 18 May 2026 10:36:54 -0700 Subject: [PATCH 1/2] fix: Fix resolution of parent toolbox category for block descriptions --- packages/blockly/core/toolbox/category.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/blockly/core/toolbox/category.ts b/packages/blockly/core/toolbox/category.ts index 72acdee730f..014802a1560 100644 --- a/packages/blockly/core/toolbox/category.ts +++ b/packages/blockly/core/toolbox/category.ts @@ -358,6 +358,15 @@ export class ToolboxCategory return ''; } + /** + * Returns the colour of this category. + * + * @internal + */ + getColour() { + return this.colour_; + } + /** * Sets the colour for the category using the style name and returns the new * colour as a hex string. From aff2467551dc236eca43f19687fe53f9e79efa9d Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Tue, 19 May 2026 14:29:28 -0700 Subject: [PATCH 2/2] fix: Fix tests --- packages/blockly/tests/mocha/shortcut_items_test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/blockly/tests/mocha/shortcut_items_test.js b/packages/blockly/tests/mocha/shortcut_items_test.js index e074976eb58..4c4865abaa5 100644 --- a/packages/blockly/tests/mocha/shortcut_items_test.js +++ b/packages/blockly/tests/mocha/shortcut_items_test.js @@ -843,7 +843,7 @@ suite('Keyboard Shortcut Items', function () { block.initSvg(); block.render(); Blockly.getFocusManager().focusNode(block); - this.assertAnnouncement('Begin stack, if, do, has input'); + this.assertAnnouncement('Begin stack, if, do, First category, has input'); }); test('Icon', function () { @@ -853,7 +853,7 @@ suite('Keyboard Shortcut Items', function () { Blockly.getFocusManager().focusNode( block.getIcon(Blockly.icons.IconType.MUTATOR), ); - this.assertAnnouncement('Begin stack, if, do, has input'); + this.assertAnnouncement('Begin stack, if, do, First category, has input'); }); test('Field', function () { @@ -869,7 +869,7 @@ suite('Keyboard Shortcut Items', function () { block.initSvg(); block.render(); Blockly.getFocusManager().focusNode(block.getInput('DO0').connection); - this.assertAnnouncement('Begin stack, if, do, has input'); + this.assertAnnouncement('Begin stack, if, do, First category, has input'); }); });