fix(block-dynamic-connection): recache connection pairs after dynamically adding inputs#2751
Open
mikeharv wants to merge 1 commit into
Open
fix(block-dynamic-connection): recache connection pairs after dynamically adding inputs#2751mikeharv wants to merge 1 commit into
mikeharv wants to merge 1 commit into
Conversation
…ally adding new ones
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
Fixes #2708
Depends upon:
Proposed Changes
After
onPendingConnection(), if the dynamic block has new inputs, re-cache the compatible connection pairs for the currently dragging block.Reason for Changes
As stated in the issue:
This fixes this issue.
Test Coverage
No plugin-level tests were added for this change. A headless test would only verify mocked interactions and would not meaningfully exercise constrained movement. Testing the complete behavior with rendered blocks would require substantial browser, rendering, and drag-state setup disproportionate to the small plugin change.
Instead, Blockly core tests cover the important behavioral contract: after
cacheAllConnectionPairs()is called during a move, newly added connections are included in the cache and can be visited in the expected traversal order.Documentation
Additional Information
This depends upon
BlockDragStrategy.cacheAllConnectionPairsbeing made public, so this should only be merged after RaspberryPiFoundation/blockly#10149 is merged and, ideally, released.