Skip to content

Commit 8d33c0d

Browse files
committed
Review
1 parent 234462a commit 8d33c0d

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/dockable-pane-api.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/dockable-pane-api/
66

77
## Introduction
88

9-
This how-to describes how to create and manage a dockable pane using the web extensions API. A dockable pane allows you to create a web view that can be docked and moved within the Studio Pro user interface. Examples of dockable panes in Studio Pro are:
9+
This how-to describes creating and managing a dockable pane using the web extensions API. A dockable pane is a web view that can be docked and moved within the Studio Pro user interface. Examples of dockable panes in Studio Pro include the following:
1010

1111
* Marketplace
12-
* Errors
12+
* Errors
1313
* Stories
1414
* Toolbox
1515

@@ -19,14 +19,14 @@ This how-to describes how to create and manage a dockable pane using the web ext
1919
If you are using Studio Pro 11.0–11.5 and your extension includes menus, your existing menu code will not work when you upgrade to Studio Pro 11.6. To restore full functionality and support, upgrade to the Extensibility API 11.6 and follow the steps in the [Migration Guide](/apidocs-mxsdk/apidocs/web-extensibility-api-11/migration-guide/).
2020
{{% /alert%}}
2121

22-
* This how-to uses the app created in [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Make sure to complete that how-to before starting this one.
23-
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
22+
* This how-to uses the app created in [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
23+
* Be familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
2424

2525
## Creating a Dockable Pane
2626

2727
### Register the Dockable Pane
2828

29-
To open a dockable pane, you must first register the dockable pane handle with the API. To do this, add a call to register the pane to the extension loaded method in the `src/main/index.ts`. Use the 'paneHandle' to interact with the pane.
29+
To open a dockable pane, first register the dockable pane handle with the API. To do this, add a call to register the pane to the extension loaded method in `src/main/index.ts`. Use `paneHandle` to interact with the pane.
3030

3131
```typescript
3232
const paneHandle = await studioPro.ui.panes.register(
@@ -40,7 +40,7 @@ To open a dockable pane, you must first register the dockable pane handle with t
4040
});
4141
```
4242

43-
You can then create two menus that will open and close the pane by calling the `panes` API:
43+
Create two menus that open and close the pane by calling the `panes` API:
4444

4545
```typescript
4646
import { IComponent, getStudioProApi } from "@mendix/extensions-api";
@@ -91,12 +91,12 @@ export const component: IComponent = {
9191

9292
### Adding New Endpoint Handlers
9393

94-
Create a new web view endpoint where you define the user interface that will be rendered within the pane. You can use and rename the existing endpoint. Follow the steps below:
94+
Create a new web view endpoint where you define the user interface that is rendered within the pane. You can use and rename the existing endpoint. Follow these steps:
9595

9696
1. Rename `ui/index.tsx` to `ui/tab.tsx`.
9797
1. Add the new endpoint file, `ui/dockablepane.tsx`, by copying `ui/tab.tsx`.
9898

99-
You must also alter the `build-extension.mjs` and `manifest.json` files to bind to the correct endpoint, as described in the following sections.
99+
Alter the `build-extension.mjs` and `manifest.json` files to bind to the correct endpoint, as described in the following sections.
100100

101101
### Altering `build-extension.mjs`
102102

@@ -157,16 +157,16 @@ else {
157157
}
158158
```
159159

160-
This ensures esbuild will consider these two `.tsx` files as entrypoints and produce JavaScript modules in the `dist` folder, corresponding to the name in `out`.
160+
This ensures esbuild considers these two `.tsx` files as entrypoints and produces JavaScript modules in the `dist` folder corresponding to the name in `out`.
161161

162162
### Altering `src/manifest.json`
163163

164-
You also must instruct Studio Pro to load the endpoint that you just created. To do this, modify the manifest file `src/manifest.json`.
164+
Instruct Studio Pro to load the endpoint that you created. To do this, modify the manifest file `src/manifest.json`.
165165

166-
Alter the "ui" section by:
166+
Alter the "ui" section by doing the following:
167167

168-
* Changing the `tab` endpoint
169-
* Adding the `dockablepane` endpoint
168+
* Change the `tab` endpoint
169+
* Add the `dockablepane` endpoint
170170

171171
```typescript
172172
"ui": {
@@ -193,9 +193,9 @@ The `manifest.json` file should now look like this:
193193

194194
## Closing the Dockable Pane
195195

196-
Now that you have registered a pane and created a way to open it, it is important to provide a way to close it, too.
196+
Now that you have registered a pane and created a way to open it, provide a way to close it.
197197

198-
You will close your pane using a new menu item. Follow the steps below:
198+
Close your pane using a new menu item. Follow these steps:
199199

200200
1. Add a new sub-menu item to the menu on line 13.
201201

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/documents-api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/documents-api/
66

77
## Introduction
88

9-
This how-to describes how to create context menus for a document editor. In the example below, you create a menu which is shown for each entity in the domain model of Studio Pro.
9+
This how-to describes how to create context menus for a document editor. In the example below, you create a menu that is shown for each entity in the domain model of Studio Pro.
1010

1111
## Prerequisites
1212

@@ -16,19 +16,19 @@ If you are using Studio Pro 11.0–11.5 and your extension includes menus, your
1616

1717
Before starting this how-to, make sure you have completed the following prerequisites:
1818

19-
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Please complete that how-to before starting this one.
19+
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
2020
* Review [how menus work](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/) in the Web Extensibility API.
2121

2222
## Creating a Context Menu
2323

2424
{{% alert color="info" %}}
25-
Use the full name of the document type (for example, `DomainModels$Entity` for entities, `DomainModels$Annotation` for annotations, or `DomainModels$DomainModel` for the editor canvas itself). For more information about these document type names, see [Access a Mendix Model Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/model-api/).
25+
Use the full name of the document type (for example, `DomainModels$Entity` for entities, `DomainModels$Annotation` for annotations, or `DomainModels$DomainModel` for the editor canvas itself). For more information about these document type names, see [Access a Mendix Model Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/model-api/).
2626
{{% /alert %}}
2727

2828
The code below does the following:
2929

30-
1. Create a menu object with a `DocumentContext`.
31-
2. Use the `documents` API's `addContextMenu` method to add the menu to an entity inside the domain model editor.
30+
1. Creates a menu object with a `DocumentContext`.
31+
2. Uses the `documents` API's `addContextMenu` method to add the menu to an entity inside the domain model editor.
3232

3333
```typescript
3434
import { ComponentContext, DocumentContext, IComponent, Menu, getStudioProApi } from "@mendix/extensions-api";
@@ -56,7 +56,7 @@ export const component: IComponent = {
5656
};
5757
```
5858

59-
As you can see from the example above, the expected payload of the menu action is `DocumentContext` (for example, an object containing a document id (`{ documentId: string }`)). The `documentId` will be the Id of the document the menu is attached to (in this example, the exact entity in the domain model editor canvas).
59+
As you can see from the example above, the expected payload of the menu action is `DocumentContext` (for example, an object containing a document ID (`{ documentId: string }`)). The `documentId` is the ID of the document the menu is attached to (in this example, the exact entity in the domain model editor canvas).
6060

6161
## Extensibility Feedback
6262

0 commit comments

Comments
 (0)