Skip to content

Conversation

@microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented Jul 7, 2025

Augment context menu entries from core with the shortcut text if present. Reorder initalization as we now require comment context menu actions to be registered first for this feature.

Be defensive for folks that might already have such a shortcut.

Fixes #591

Demo: https://duplicate.blockly-keyboard-experimentation.pages.dev/

Augment context menu entries from core with the shortcut text if present.
Reorder initalization as we now require comment context menu actions to be
registered first for this feature.

Be defensive for folks that might already have such a shortcut.
@microbit-matt-hillsdon microbit-matt-hillsdon requested a review from a team as a code owner July 7, 2025 16:08
@microbit-matt-hillsdon microbit-matt-hillsdon requested review from maribethb and removed request for a team July 7, 2025 16:08
await this.browser.pause(PAUSE_TIME);
chai.assert.isTrue(
await contextMenuExists(this.browser, 'Duplicate'),
await contextMenuExists(this.browser, 'Collapse Block'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a shortcut to duplicate meant that these didn't match anymore. Simplest to switch to something else without a shortcut.

@microbit-matt-hillsdon
Copy link
Contributor Author

Fixed trivial import conflict with undo/redo action removal.

return false;
},
callback(workspace, e, shortcut, scope) {
const copiable = scope.focusedNode as ICopyable<ICopyData>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you spell this copyable for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, thanks. ec3964c

@maribethb maribethb merged commit c5a99cd into RaspberryPiFoundation:main Jul 7, 2025
6 of 8 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.

Consider adding a keyboard shortcut for duplicate block

2 participants