Skip to content

Commit a750162

Browse files
Merge branch 'development' into kk-pad
2 parents 2aa47b4 + ab429f7 commit a750162

122 files changed

Lines changed: 2691 additions & 945 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.

.claude/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,8 @@
183183
}
184184
]
185185
},
186-
"statusline": ".claude/statusline.sh"
186+
"statusLine": {
187+
"type": "command",
188+
"command": ".claude/statusline.sh"
189+
}
187190
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Check Claude Configuration
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.claude/**'
7+
- 'CLAUDE.md'
8+
9+
jobs:
10+
check-claude-config:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check for Claude configuration changes
14+
uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const comment = `⚠️ **Claude Configuration Warning**
18+
19+
You've modified Claude Code configuration files. These files contain the shared configuration for all contributors. Please revert this change if unintended. **ONLY modify these files if you need to change shared configurations that apply to everyone and have discussed this change with the TW team.**
20+
21+
To override the Claude settings locally, use \`.claude/settings.local.json\` instead. This local file is gitignored and overrides the repo default.
22+
23+
**For example, if you're changing AWS_PROFILE:**
24+
The default profile name is \`my-sandbox\`. If your AWS profile has a different name, override it locally instead of changing the shared file.
25+
26+
Create or edit \`.claude/settings.local.json\` in the repo root and include the following lines:
27+
28+
\`\`\`json
29+
{
30+
"env": {
31+
"AWS_PROFILE": "your-sandbox-name"
32+
}
33+
}
34+
\`\`\`
35+
`;
36+
37+
github.rest.issues.createComment({
38+
issue_number: context.issue.number,
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
body: comment
42+
});
43+
44+
core.setFailed('Claude configuration was modified - see comment for guidance');

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,7 @@ If you are unsure whether a command is safe to run, **do not run it**. Instead,
200200
- Run tests after making changes: see project-specific test commands
201201
- Do not add dependencies without asking
202202
- Do not refactor code beyond what was requested
203+
204+
### Claude Code Settings Management
205+
206+
For personal configuration changes (AWS_PROFILE, etc.), always suggest `.claude/settings.local.json` instead of modifying `.claude/settings.json`. The local file is gitignored and overrides shared settings.

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
For guidelines on contributing to the Mendix documentation, please see these two documents:
1+
For guidelines on contributing to the Mendix documentation, see these documents:
22

33
* [How to Contribute to Mendix Docs](https://docs.mendix.com/community-tools/contribute-to-mendix-docs/)
44
* [Documentation Writing Guidelines](https://docs.mendix.com/community-tools/documentation-guidelines/)
5+
* [Using AI Tools for Documentation](https://docs.mendix.com/community-tools/contribute-to-mendix-docs/using-ai-tools/)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ Below is a list of how-tos for you to begin with:
5151
* [How to Exchange Information Between Active Views](/apidocs-mxsdk/apidocs/web-extensibility-api-11/message-passing-api/)
5252
* [How to Show Version Control Information](/apidocs-mxsdk/apidocs/web-extensibility-api-11/version-control-api/)
5353
* [How to Introduce a New Document Type](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/)
54+
* [How to Listen for Connection Changes](/apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-controller-api/)
55+
* [How to Access Runtime Constants](/apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-configuration-api/)
56+
* [How to Use Extension Permissions in Overview Pane](/apidocs-mxsdk/apidocs/web-extensibility-api-11/extension-permissions/)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Menus in the Extensibiity API"
2+
title: "Menus in the Extensibility API"
33
linktitle: "Menus"
44
url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/
55
---
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: "Extension Permissions in Overview Pane"
3+
linktitle: "Extension Permissions"
4+
url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/extension-permissions/
5+
---
6+
7+
## Introduction
8+
9+
This how-to describes how the permission system works for web extensions in Studio Pro. Permissions allow extensions to request access to sensitive APIs or data that require explicit user consent.
10+
11+
{{% alert color="info" %}}
12+
Extension permissions were introduced in version 11.9.0.
13+
{{% /alert %}}
14+
15+
## How Permissions Work
16+
17+
Web extensions can request permissions to access sensitive functionality. The permission system follows these principles:
18+
19+
* **Opt-in by default** — Extensions cannot access protected APIs unless you request persmission and the extension user grants it
20+
* **User control** — You decide which permissions to grant through the Extensions Overview pane in Studio Pro
21+
* **Per-project settings** — Permission grants are stored per project, so a user’s approval for an extension applies only within that app. This gives them the flexibility to grant a permission in one project and choose different settings for the same extension in another.
22+
23+
## Requesting Permissions
24+
25+
To request a permission, declare it in your extension's `package.json` file under the `mendix.permissions` object:
26+
27+
```json
28+
{
29+
"mendixComponent": {
30+
"entryPoints": {
31+
"main": "main.js",
32+
"ui": {
33+
"tab": "tab.js"
34+
}
35+
},
36+
"permissions": {
37+
"runtime-configuration-private": true
38+
}
39+
}
40+
}
41+
```
42+
43+
Setting a permission to **true** indicates that your extension requests this permission. The user must grant it before your extension can use the protected functionality. Default: *False*
44+
45+
## Granting Permissions (User Flow)
46+
47+
When a user installs an extension that requests permissions, they can manage those permissions through the Extensions Overview pane. Follow the steps below:
48+
49+
1. Open Studio Pro and load an app with the extension installed.
50+
2. Go to **View** > **Extensions Overview** to open the Extensions Overview pane.
51+
3. Find the extension in the list. Under the extension details, the **Permissions** section displays the requested permissions.
52+
4. Check or uncheck the checkbox next to each permission to grant or revoke access.
53+
54+
## Available Permissions
55+
56+
The following permissions are available for web extensions:
57+
58+
| Permission | Description |
59+
|------------|-------------|
60+
| `runtime-configuration-private` | Allows the extension to access the values of private constants from the active runtime configuration. Without this permission, private constants are returned with `isPrivate: true` and no value. |
61+
62+
## Extensibility Feedback
63+
64+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
65+
66+
Any feedback is appreciated.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
title: "Access Runtime Constants Using Web API"
3+
linktitle: "Runtime Constants"
4+
url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-configuration-api/
5+
---
6+
7+
## Introduction
8+
9+
This how-to describes how to create a simple menu that retrieves and displays the runtime constants from the active configuration in a message box.
10+
11+
{{% alert color="info" %}}
12+
Access to runtime constants using the web API was introduced in version 11.9.0.
13+
{{% /alert %}}
14+
15+
## Prerequisites
16+
17+
Before starting this how-to, make sure you have completed the following prerequisites:
18+
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.
20+
* 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/) and message boxes as described in [Show a Message Box Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/messagebox-api/).
21+
22+
## Set Up the Extension Structure
23+
24+
Set up the extension structure by following the steps below:
25+
26+
1. Create a menu that will display the runtime constants in the `loaded` method in the main entry point (`src/main/index.ts`). This can be done by following the steps in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
27+
2. Replace the contents of your `src/main/index.ts` file with the following:
28+
29+
```typescript
30+
import { IComponent, Menu, getStudioProApi } from "@mendix/extensions-api";
31+
32+
export const component: IComponent = {
33+
async loaded(componentContext) {
34+
const studioPro = getStudioProApi(componentContext);
35+
const menuApi = studioPro.ui.extensionsMenu;
36+
const runtimeConfigApi = studioPro.runtime.configuration;
37+
const messageBoxApi = studioPro.ui.messageBoxes;
38+
39+
const menuId = "show-constants-menu";
40+
const caption = "Show Runtime Constants";
41+
42+
// Get and show the constants when the menu item is clicked
43+
const action = async () => {
44+
const constants = await runtimeConfigApi.getConstants();
45+
46+
if (constants.length === 0) {
47+
await messageBoxApi.show("info", "No constants found in the active configuration.");
48+
return;
49+
}
50+
51+
const accessibleConstants = constants.filter(c => c.isPrivate === false);
52+
const privateConstants = constants.filter(c => c.isPrivate === true);
53+
54+
let message = "";
55+
56+
if (accessibleConstants.length > 0) {
57+
message += "Accessible Constants:\n";
58+
message += accessibleConstants.map(c => ` ${c.constantName}: ${c.value}`).join("\n");
59+
}
60+
61+
if (privateConstants.length > 0) {
62+
message += `\n\n${privateConstants.length} private constant(s) not accessible.`;
63+
}
64+
65+
await messageBoxApi.show("info", `Runtime Constants:\n\n${message}`);
66+
};
67+
68+
const menu: Menu = { caption, menuId, action };
69+
70+
await menuApi.add(menu);
71+
}
72+
};
73+
```
74+
75+
In this example, you create one menu item that will show a message box with the runtime constants from the active configuration.
76+
77+
The code uses the:
78+
79+
* `menuApi` from `studioPro.ui.extensionsMenu` to allow you to use the menu API
80+
* `messageBoxApi` from `studioPro.ui.messageBoxes` to show a dialog
81+
* `runtimeConfigApi` from studioPro.runtime.configuration to retrieve the runtime constants
82+
83+
{{% alert color="info" %}} The function is `async` in order for you to use `await` when executing the preview action.
84+
{{% /alert %}}
85+
86+
The `getConstants()` function returns an array of constant objects, each with the following properties:
87+
88+
* `isPrivate` – a boolean indicating whether the constant value is hidden (true) or accessible (false)
89+
* `constantName` – the fully qualified name of the constant (for example, `MyModule.MyConstant`)
90+
* `value` – the constant value as a string (only present when `isPrivate` is false)
91+
92+
## Accessing Private Constants
93+
94+
By default, private constants are not accessible and will have `isPrivate` set to true with no value. To access private constant values, your extension must request the `runtime-configuration-private` permission.
95+
96+
Add the permission to your extension's `package.json` after the entry points:
97+
98+
```json
99+
{
100+
"mendixComponent": {
101+
"entryPoints": {
102+
"main": "main.js",
103+
"ui": {
104+
"tab": "tab.js"
105+
}
106+
},
107+
"permissions": {
108+
"runtime-configuration-private": true
109+
}
110+
}
111+
}
112+
113+
```
114+
115+
You have to set the permission to true if you want the permission to appear in the Extensions Overview pane.
116+
117+
When a user installs your extension, they can grant this permission through the Extensions Overview pane (**View** > **Extensions**) in Studio Pro. Once granted, private constants will be returned with `isPrivate` set to false and their value included.
118+
119+
You can read more about permissions in [Extension Permissions in Overview Pane](/apidocs-mxsdk/apidocs/web-extensibility-api-11/extension-permissions/).
120+
121+
## Extensibility Feedback
122+
123+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
124+
125+
Any feedback is appreciated.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: "Listen for Connection Changes"
3+
linktitle: "Runtime Controller"
4+
url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-controller-api/
5+
---
6+
7+
## Introduction
8+
9+
This how-to describes how to create a simple menu that displays when the connection changed in a message box.
10+
11+
{{% alert color="info" %}}
12+
Listening for connection changes was introduced in version 11.9.0.
13+
{{% /alert %}}
14+
15+
## Prerequisites
16+
17+
Before starting this how-to, make sure you have completed the following prerequisites:
18+
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.
20+
* 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/) and message boxes as described in [Show a Message Box Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/messagebox-api/).
21+
* Your app must be running locally in Studio Pro to use the Runtime Controller API.
22+
23+
## Listening for Connection Changes
24+
25+
You can listen for runtime connection state changes to know when the app starts or stops running. To do this, follow the steps below:
26+
27+
1. Add an event listener to respond when the connection state changes.
28+
2. Replace the content of your `src/main/index.ts` file with the following:
29+
30+
```typescript
31+
import { IComponent, getStudioProApi } from "@mendix/extensions-api";
32+
33+
export const component: IComponent = {
34+
async loaded(componentContext) {
35+
const studioPro = getStudioProApi(componentContext);
36+
const runtimeControllerApi = studioPro.runtime.controller;
37+
const messageBoxApi = studioPro.ui.messageBoxes;
38+
39+
// Listen for connection state changes
40+
runtimeControllerApi.addEventListener("connectionChanged", (args) => {
41+
messageBoxApi.show(
42+
"info",
43+
`Runtime connection: ${args.isConnected ? "Connected" : "Disconnected"}`
44+
);
45+
});
46+
}
47+
};
48+
```
49+
50+
The code uses the:
51+
52+
* `menuApi` from `studioPro.ui.extensionsMenu` to allow you to use the menu API
53+
* `messageBoxApi` from `studioPro.ui.messageBoxes` to show a dialog
54+
* `runtimeControllerApi` from `studioPro.runtime.controller` to check if the connection changed.
55+
56+
{{% alert color="info" %}} The function is `async` in order for you to use `await` when executing the preview action.
57+
{{% /alert %}}
58+
59+
The `connectionChanged` event returns an object with:
60+
61+
* `isConnected` – a boolean indicating whether the runtime is currently connected (true) or disconnected (false)
62+
63+
{{% alert color="info" %}} The event only detects when the runtime connects or disconnects. It cannot be used to determine when the runtime is completely initialized.
64+
{{% /alert %}}
65+
66+
## Extensibility Feedback
67+
68+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
69+
70+
Any feedback is appreciated.

0 commit comments

Comments
 (0)