Skip to content

Conversation

@rachel-fenichel
Copy link
Collaborator

@rachel-fenichel rachel-fenichel commented May 8, 2025

The basics

The details

Resolves

Fixes #9010

Fixes the last piece of RaspberryPiFoundation/blockly-keyboard-experimentation#430 by removing the last references to stack cursors.

Proposed Changes

Deletes the ASTNode class and all references to it.

Updates a helper in marker.ts to act on a passed-in node.

Reason for Changes

This is cleanup after #8892. That change added a new interface, INavigable, and converted code that used ASTNode to act on INavigables instead.

ASTNode originally existed to provide a thin layer between the navigation code and navigable objects (fields, rendered connections, rendered blocks, etc). The navigation side of the work is now done through standard navigation policies, and inspecting the contents of a navigable can be done by using instanceof and then actual properties. This last may not have been possible when ASTNode was created, because we were in a JavaScript world.

Test Coverage

Ran local tests and linked against keyboard experimentation with RaspberryPiFoundation/blockly-keyboard-experimentation#505 applied. Ran tests there and also manually checked that I could build and run the plugin and navigate code in the test page.

Documentation

Breaking change: Deletes the ASTNode class. See #8828 for the alternative.

Additional Information

Cleanup!

@rachel-fenichel rachel-fenichel requested a review from a team as a code owner May 8, 2025 18:33
@rachel-fenichel rachel-fenichel requested a review from maribethb May 8, 2025 18:33
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug labels May 8, 2025
@rachel-fenichel rachel-fenichel requested review from gonfunko and removed request for maribethb May 8, 2025 18:34
@rachel-fenichel rachel-fenichel assigned gonfunko and unassigned maribethb May 8, 2025
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug and removed PR: fix Fixes a bug breaking change Used to mark a PR or issue that changes our public APIs. labels May 8, 2025
@rachel-fenichel rachel-fenichel merged commit 561129a into RaspberryPiFoundation:rc/v12.0.0 May 8, 2025
13 checks passed
@rachel-fenichel rachel-fenichel deleted the delete-astnode branch May 8, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants