Skip to content

Commit e95ce58

Browse files
Merge pull request mendix#10433 from mendix/lint-docs
[Auto] Lint docs
2 parents 9866950 + e765573 commit e95ce58

47 files changed

Lines changed: 423 additions & 438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/add-menu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ You can add a `MenuSeparator` to a menu using the `Separator` property. The opti
9898

9999
#### Enabling and Disabling Menus
100100

101-
Menus are enabled by default. To disable a menu, set its `IsEnabled` property to `false`.
101+
Menus are enabled by default. To disable a menu, set its `IsEnabled` property to `false`.

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/build-todo-example-extension.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,7 @@ To store to-do data on disk, create model classes that represent individual item
452452
}
453453
```
454454

455-
456-
### Create the To-do List Model
455+
### Create the To-do List Model
457456

458457
1. Add another class file named *ToDoListModel.cs*.
459458
2. Replace the contents of this file with the following code:
@@ -751,27 +750,27 @@ This HTML page provides a simple interface styled with Tailwind CSS. The JavaScr
751750

752751
1. Add a helper function to simplify the call to the browser API:
753752

754-
```javascript
755-
function postMessage(message, data) {
756-
window.chrome.webview.postMessage({ message, data });
757-
}
758-
```
753+
```javascript
754+
function postMessage(message, data) {
755+
window.chrome.webview.postMessage({ message, data });
756+
}
757+
```
759758

760759
2. Initialize message handling and respond to incoming messages:
761760

762-
```javascript
763-
// Register message handler.
764-
window.chrome.webview.addEventListener("message", handleMessage);
765-
// Indicate that you are ready to receive messages.
766-
postMessage("MessageListenerRegistered");
767-
768-
async function handleMessage(event) {
769-
const { message, data } = event.data;
770-
if (message === "RefreshToDos") {
771-
await refreshToDos();
772-
}
773-
}
774-
```
761+
```javascript
762+
// Register message handler.
763+
window.chrome.webview.addEventListener("message", handleMessage);
764+
// Indicate that you are ready to receive messages.
765+
postMessage("MessageListenerRegistered");
766+
767+
async function handleMessage(event) {
768+
const { message, data } = event.data;
769+
if (message === "RefreshToDos") {
770+
await refreshToDos();
771+
}
772+
}
773+
```
775774

776775
{{% alert color="warning" %}}
777776

@@ -944,4 +943,4 @@ Use a command-line flag to enable extensions:
944943
1. Open the Studio Pro Installation folder.
945944
2. From the command-line, run: `.\studiopro.exe --enable-extension-development`.
946945

947-
This will launch Studio Pro and load your extension. You can now access it from the **View** > **Todo** menu item.
946+
This will launch Studio Pro and load your extension. You can now access it from the **View** > **Todo** menu item.

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/create-menu-extension.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can download the example in this how-to in [this GitHub repository](https://
2626
{ "mx_extensions": [ "<name_of_your_project>.dll" ] }
2727
```
2828

29-
3. For the `manifest.json` file, right-click **Solution Explorer** > **Properties** and change the **Copy to Output Directory** property to **Copy always**.
29+
4. For the `manifest.json` file, right-click **Solution Explorer** > **Properties** and change the **Copy to Output Directory** property to **Copy always**.
3030

3131
## Creating a Test Mendix App
3232

@@ -114,4 +114,4 @@ You can access reusable .NET libraries via [NuGet](https://www.nuget.org/) Follo
114114
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
115115
```
116116

117-
3. Use the **Manage NuGet Packages** to add a dependency.
117+
3. Use the **Manage NuGet Packages** to add a dependency.

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/create-microflow-service.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ It returns a list of `IMicroflowParameterObject`, which includes:
116116
* Description
117117
* `DataType`
118118

119-
120119
```csharp
121120
IReadOnlyList<IMicroflowParameterObject> parameters = _microflowService.GetParameters(microflow);
122121
```

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/create-microflows-calculations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ You can also see that the `DataType` of both parameters is integer.
165165

166166
{{< figure src="/attachments/apidocs-mxsdk/apidocs/extensibility-api/multiplication-microflow.png" >}}
167167

168-
### Addition Microflow
168+
### Addition Microflow
169169

170170
To create a microflow that performs addition between two decimal values, use the code below:
171171

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/create-modal-web-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ This code injects your controller class into the `MyMenuExtension` class. It add
170170

171171
{{% alert type="info" %}}
172172
In this example, the `currentApp` parameter is required if the dialog needs to interact with the model. Additionally, `WebServerBaseUrl` is crucial; without the base path, navigating to the route defined in the web server extension would not be possible.
173-
{{% /alert %}}
173+
{{% /alert %}}

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/interact-with-model-api.md

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

88
## Introduction
99

10-
Once you have created basic extensions, you may want to interact with the Studio Pro model to make changes to your app. The Model API enables this functionality and is exposed via the` Mendix.StudioPro.ExtensionsAPI.Model` namespace.
10+
Once you have created basic extensions, you may want to interact with the Studio Pro model to make changes to your app. The Model API enables this functionality and is exposed via the`Mendix.StudioPro.ExtensionsAPI.Model` namespace.
1111

1212
## Gaining Access to the Mendix Model SDK
1313

@@ -25,7 +25,6 @@ Any modification to the model must be done within a transaction; otherwise, a `S
2525

2626
Transactions group changes, but do not provide a way to isolate them. Changes to a model are immediately visible to all code interacting with the model. When transaction is rolled back or is undone by a user, all included changes are reverted.
2727

28-
2928
## Start a Transaction
3029

3130
To create transaction, call [`IModel.StartTransaction`](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.Model/IModel/StartTransaction.md). This method returns a transaction object that implements [`ITransaction`](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.Model/ITransaction.md).
@@ -61,4 +60,4 @@ using (var transaction = model.StartTransaction("add entity"))
6160
var copyEntity = CurrentApp.Copy(entity);
6261
transaction.Commit();
6362
}
64-
```
63+
```

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/web/get-started.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This section will show you how to build and test an extension.
3030
### Create a Test App
3131

3232
1. Create a new app using the **Blank Web App** template.
33-
1. Install the [Studio Pro Web Extension Template](https://github.com/mendix/web-extension-template) from GitHub using the instructions in the repository.
33+
2. Install the [Studio Pro Web Extension Template](https://github.com/mendix/web-extension-template) from GitHub using the instructions in the repository.
3434

3535
### Building the Extension
3636

@@ -54,7 +54,7 @@ You can explore the extension to understand what it does when it is installed. D
5454

5555
Reading through the source code you should see the following:
5656

57-
a. Line 7 adds a menu
57+
a. Line 7 adds a menu
5858

5959
```typescript
6060
await studioPro.ui.extensionsMenu.add({
@@ -64,24 +64,24 @@ You can explore the extension to understand what it does when it is installed. D
6464
});
6565
```
6666

67-
2. Line 14 opens a tab
68-
69-
```typescript
70-
// Open a tab when the menu item is clicked
71-
studioPro.ui.extensionsMenu.addEventListener("menuItemActivated", (args) => {
72-
if (args.menuId === "myextension.ShowTabMenuItem") {
73-
studioPro.ui.tabs.open(
74-
{
75-
title: "My Extension Tab",
76-
},
77-
{
78-
componentName: "extension/myextension",
79-
uiEntrypoint: "tab",
80-
}
81-
);
82-
}
83-
});
84-
```
67+
b. Line 14 opens a tab
68+
69+
```typescript
70+
// Open a tab when the menu item is clicked
71+
studioPro.ui.extensionsMenu.addEventListener("menuItemActivated", (args) => {
72+
if (args.menuId === "myextension.ShowTabMenuItem") {
73+
studioPro.ui.tabs.open(
74+
{
75+
title: "My Extension Tab",
76+
},
77+
{
78+
componentName: "extension/myextension",
79+
uiEntrypoint: "tab",
80+
}
81+
);
82+
}
83+
});
84+
```
8585

8686
When you install the extension, you will see a new menu item within Studio Pro.
8787

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Your `loaded()` method should now look like this:
174174
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:
175175

176176
1. Rename `ui/index.tsx` to `ui/tab.tsx`.
177-
1. Add the new endpoint file, `ui/dockablepane.tsx`, by copying `ui/tab.tsx`.
177+
2. Add the new endpoint file, `ui/dockablepane.tsx`, by copying `ui/tab.tsx`.
178178

179179
You must also alter the `vite.config.ts` and `manifest.json` files to bind to the correct endpoint, as described in the following sections:
180180

@@ -255,13 +255,13 @@ You will close your pane using a new menu item. Follow the steps below:
255255

256256
1. Add a new sub-menu item to the menu on line 11.
257257

258-
```typescript {linenos=table linenostart=11}
259-
{ menuId: "myextension.HideDockMenuItem", caption: "Hide dock pane" },
260-
```
258+
```typescript {linenos=table linenostart=11}
259+
{ menuId: "myextension.HideDockMenuItem", caption: "Hide dock pane" },
260+
```
261261

262262
2. Alter the event handler for the new menu at the end of the loaded method:
263263

264-
```typescript
264+
```typescript
265265
// Open a tab when the menu item is clicked
266266
studioPro.ui.extensionsMenu.addEventListener(
267267
"menuItemActivated",
@@ -285,7 +285,7 @@ You will close your pane using a new menu item. Follow the steps below:
285285
}
286286
}
287287
);
288-
```
288+
```
289289

290290
The loaded method should now look like this:
291291

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-howtos/build-todo-example-extension.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ To store to-do data on disk, create model classes that represent individual item
452452
}
453453
```
454454

455-
### Create the To-do List Model
455+
### Create the To-do List Model
456456

457457
1. Add another class file named *ToDoListModel.cs*.
458458
2. Replace the contents of this file with the following code:
@@ -750,27 +750,27 @@ This HTML page provides a simple interface styled with Tailwind CSS. The JavaScr
750750

751751
1. Add a helper function to simplify the call to the browser API:
752752

753-
```javascript
754-
function postMessage(message, data) {
755-
window.chrome.webview.postMessage({ message, data });
756-
}
757-
```
753+
```javascript
754+
function postMessage(message, data) {
755+
window.chrome.webview.postMessage({ message, data });
756+
}
757+
```
758758

759759
2. Initialize message handling and respond to incoming messages:
760760

761-
```javascript
762-
// Register message handler.
763-
window.chrome.webview.addEventListener("message", handleMessage);
764-
// Indicate that you are ready to receive messages.
765-
postMessage("MessageListenerRegistered");
766-
767-
async function handleMessage(event) {
768-
const { message, data } = event.data;
769-
if (message === "RefreshToDos") {
770-
await refreshToDos();
771-
}
772-
}
773-
```
761+
```javascript
762+
// Register message handler.
763+
window.chrome.webview.addEventListener("message", handleMessage);
764+
// Indicate that you are ready to receive messages.
765+
postMessage("MessageListenerRegistered");
766+
767+
async function handleMessage(event) {
768+
const { message, data } = event.data;
769+
if (message === "RefreshToDos") {
770+
await refreshToDos();
771+
}
772+
}
773+
```
774774

775775
{{% alert color="warning" %}}
776776

0 commit comments

Comments
 (0)