From f2fc71ab6f5633b1ece55ab2a412368017d7bd01 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Mon, 9 Oct 2023 10:34:06 -0700 Subject: [PATCH 1/2] fix: colour from colour picker not being updated (#7584) * fix: colour from colour picker not being updated * chore: clarify what code is doing --- core/field_colour.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/field_colour.ts b/core/field_colour.ts index de771c9af23..6b78a2e5088 100644 --- a/core/field_colour.ts +++ b/core/field_colour.ts @@ -246,12 +246,9 @@ export class FieldColour extends Field { const block = this.getSourceBlock() as BlockSvg | null; if (!block) throw new UnattachedFieldError(); - // In general, do *not* let fields control the color of blocks. Having the - // field control the color is unexpected, and could have performance - // impacts. - // Whenever we render, the field may no longer be a full-block-field so - // we need to update the colour. - if (this.getConstants()!.FIELD_COLOUR_FULL_BLOCK) block.applyColour(); + // Calling applyColour updates the UI (full-block vs non-full-block) for the + // colour field, and the colour of the field/block. + block.applyColour(); } /** From 865c5931e904450bf442b8776032541cf9ef3aa6 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Mon, 9 Oct 2023 17:36:17 +0000 Subject: [PATCH 2/2] release: Update version number to 10.2.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ef9dbfe998..63bf4b96ce7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockly", - "version": "10.2.1", + "version": "10.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockly", - "version": "10.2.1", + "version": "10.2.2", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 78dff16553c..230be1593d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockly", - "version": "10.2.1", + "version": "10.2.2", "description": "Blockly is a library for building visual programming editors.", "keywords": [ "blockly"