8000 fix: use copyable interface for cut action, add tests by maribethb · Pull Request #8993 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: use copyable interface for cut action, add tests #8993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 6, 2025

Conversation

maribethb
Copy link
Contributor

The basics

The details

Resolves

Works on google/blockly-keyboard-experimentation#488

Proposed Changes

  • Renames the keydown_test to shortcut_items_test (in a separate commit in case github makes the diff confusing)
  • Adds tests for the case that a connection is the focused thing instead of a block
  • Uses the ICopyable interface instead of ISelectable for the cut precondition

Reason for Changes

Adding tests and making the behavior consistent

I renamed the file because this is the second time I've thought there were no tests for the existing keyboard shortcuts, only to find there are, just under a file name that doesn't match where the behavior is defined.

Test Coverage

yes

Documentation

Additional Information

@maribethb maribethb requested a review from a team as a code owner May 6, 2025 00:36
@maribethb maribethb requested a review from BenHenning May 6, 2025 00:36
@github-actions github-actions bot added the PR: fix Fixes a bug label May 6, 2025
Copy link
Contributor
@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @maribethb!

* Creates a block and sets its nextConnection as the focused node.
* @param {Blockly.Workspace} workspace The workspace to create a new block on.
*/
function setSelectedConnection(workspace) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be ideal to set up a situation with a real focusable node rather than spying, if possible (just for better integration verification with the rest of Blockly and to reduce the risk of functional disparity over time).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed #8996 as a follow up

@BenHenning BenHenning assigned maribethb and unassigned BenHenning May 6, 2025
@maribethb maribethb merged commit 86c831a into google:rc/v12.0.0 May 6, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0