feat!: Add context menu options for workspace comments (#8035)

* feat: add context menu support and migrate easy options

* feat: pass events to context menu options

* chore: migrate final comment context menu option

* feat: add exports for comment context menu items

* chore: PR comments
This commit is contained in:
Beka Westberg
2024-04-17 20:02:53 +00:00
committed by GitHub
parent 70f3f52911
commit e21bb99ff1
9 changed files with 154 additions and 162 deletions

View File

@@ -69,7 +69,10 @@
},
});
initToolbox(workspace);
workspace.configureContextMenu = configureContextMenu;
Blockly.ContextMenuItems.registerCommentOptions();
// Restore previously displayed text.
if (sessionStorage) {
var text = sessionStorage.getItem('textarea');
@@ -265,11 +268,6 @@
},
};
menuOptions.push(screenshotOption);
// Adds a default-sized workspace comment to the workspace.
menuOptions.push(
Blockly.ContextMenu.workspaceCommentOption(workspace, e),
);
}
function logger(e) {