Skip to content

Conversation

@johnnesky
Copy link
Contributor

@johnnesky johnnesky commented Feb 8, 2025

The basics

The details

Resolves

I couldn't replicate the bug reported at the top of #2175 (where reloading the page does not highlight the content) when testing locally (admittedly I was building against Blockly v11.2.0, and I can replicate it at the currently published version of https://google.github.io/blockly-samples/plugins/content-highlight/test/index.html )

However, I could replicate the bug reported in the comment #2175 (comment) and this PR fixes that.

Fixes

Proposed Changes

Adds BLOCK_CREATE to the list of events that can trigger updating the content highlight.

Reason for Changes

BLOCK_DELETE was already in the list, which successfully updates the content-highlight when deleting a block. However, undoing the deletion results in a BLOCK_CREATE event being fired. (I presume other methods of adding blocks to the workspace also result in other events that are already being listened to, like BLOCK_MOVE.)

Test Coverage

I tested manually.

Documentation

N/A

Additional Information

N/A

@johnnesky johnnesky requested a review from a team as a code owner February 8, 2025 02:25
@johnnesky johnnesky requested review from rachel-fenichel and removed request for a team February 8, 2025 02:25
Copy link
Collaborator

@rachel-fenichel rachel-fenichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected a mega-change and am pleasantly surprised to find a one-liner.

@rachel-fenichel rachel-fenichel merged commit b216e9e into RaspberryPiFoundation:master Feb 13, 2025
10 checks passed
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.

2 participants