Skip to content

Commit 74c1b8e

Browse files
committed
Review
1 parent 42bd468 commit 74c1b8e

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

  • content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/migration-guide.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ weight: 2
77

88
## Introduction
99

10-
A breaking change was introduced in version 11.6 of the Extensibility API which changed the way [menus](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/) are created. Here we will explain how to fix your extension code if you have upgraded to version 11.6 from an older version.
10+
A breaking change in the Web Extensibility API was introduced in Studio Pro 11.6, which changed the way [menus](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/) are created. This guide explains how to update your extension code after upgrading to Studio Pro 11.6 from an earlier version.
1111

12-
## MenuItemActivated Event
13-
If your extension created menus using the `menuId` and the `menuItemActivated` event in order to trigger actions, you can now simply use the action that was called when the event was triggered as the actual `action` property of your menu.
12+
## `MenuItemActivated` Event
13+
14+
If your extension created menus using the `menuId` and the `menuItemActivated` event to trigger actions, you can now use the action that was called when the event was triggered as the actual `action` property of your menu.
15+
16+
For example, if your code looked like this:
1417

15-
So if your code looked like this:
1618
```typescript
1719

1820
const menuId = "myextension.menu";
@@ -42,12 +44,18 @@ await studioPro.ui.extensionsMenu.add({
4244
});
4345
```
4446

45-
The `menuItemActivated` event no longer exist so you cannot listen to it anymore.
47+
The `menuItemActivated` event no longer exist, so you cannot listen to it anymore.
4648

4749
## Registering Commands
48-
If your extension created menu by using a command id of a pre-registered command, the action that is sent to the command registration api when registering the command can now be used directly as the action of the menu.
4950

50-
So if your code looked like this:
51+
{{%alert type="info" %}}
52+
The command registration API has been removed and it is no longer available for Studio Pro 11.6 and above.
53+
{{% /alert%}}
54+
55+
If your extension created menus by using a command Id of a pre-registered command, the action that is sent to the command registration API when registering the command can now be used directly as the action of the menu.
56+
57+
For example, if your code looked like this:
58+
5159
```typescript
5260
const commandId = "myextension.menu-command";
5361

@@ -58,7 +66,7 @@ await studioPro.app.commands.registerCommand(
5866
await studioPro.ui.extensionsMenu.add({ caption: "My Menu", menuId: "myextension.menu", commandId });
5967
```
6068

61-
The same action sent to the command registration api can now instead become the `action` property value on the menu:
69+
The same action sent to the command registration API can now instead become the `action` property value on the menu:
6270

6371
```typescript
6472
await studioPro.ui.extensionsMenu.add({
@@ -68,7 +76,6 @@ await studioPro.ui.extensionsMenu.add({
6876
});
6977
```
7078

71-
The command registration API has also been removed and it is no longer available.
79+
## Action Arguments
7280

73-
# Action Arguments
74-
Action arguments are also possible in the new Menu API. Please read our [menus documentation](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/) for an in-depth explanation.
81+
Action arguments are also possible in the new Menu API. Review the [Menus documentation](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/) for a detailed explanation.

0 commit comments

Comments
 (0)