Skip to content

Commit 73e1817

Browse files
authored
Quix-69695: Refine and update plugin YAML configuration and documentation (#520)
* Refine and update plugin YAML configuration and documentation * Update plugin YAML configuration to enable default embedded view and refine sidebar item settings
1 parent 8fa357b commit 73e1817

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

docs/quix-cloud/managed-services/plugin.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,31 @@ In your deployment YAML, you can enable the embedded UI and, optionally, a sideb
2424

2525
```yaml
2626
plugin:
27-
embeddedView: true # Enables embedded UI (frontend renders iframe)
28-
sidebarItem: # Optional environment sidebar shortcut
29-
show: true # Whether to display a shortcut in the sidebar
30-
label: "Configuration" # Text for the menu item
31-
icon: "tune" # Material icon name (see notes below)
32-
order: 1 # Ordering (lower = higher)
27+
embeddedView: # Can be a boolean or object
28+
enabled: true # Enables embedded view
29+
hideHeader: false # Optional. If true, hides the header (deployment name + menu)
30+
default: true # Optional. If true, shows embedded view by default when opening deployment
31+
sidebarItem: # Optional environment sidebar shortcut
32+
show: true # Whether to display a shortcut in the sidebar
33+
label: "Configuration" # Text for the menu item
34+
icon: "tune" # Material icon name
35+
order: 1 # Ordering (lower = higher)
36+
badge: "Alpha" # Optional. Add a short label next to the sidebar item
3337
```
3438
35-
Notes
39+
Configuration details
3640
37-
* `plugin.embeddedView`: boolean. true → FE renders embedded UI.
38-
* `plugin.sidebarItem`: optional object configuring the Environment’s left sidebar item.
39-
* `plugin.sidebarItem.icon`: must be a [Google Material icon](https://fonts.google.com/icons). Use the **internal icon code**, typically written in **lowercase** (e.g. `tune`, `settings`, `play_arrow`).
41+
* `plugin.embeddedView`: object configuring the embedded view behavior.
42+
* `enabled` (boolean, default = `false`): Enables the embedded view.
43+
* `hideHeader` (boolean, default = `false`): If `true`, hides the deployment name and menu in the embedded view.
44+
* `default` (boolean, default = `false`): If `true`, displays the embedded view by default when opening the deployment.
45+
46+
* `plugin.sidebarItem`: optional object configuring the environment's left sidebar shortcut.
47+
* `show`: boolean. Whether to display the shortcut.
48+
* `label`: string. Text for the menu item.
49+
* `icon`: string. Must be a [Google Material icon](https://fonts.google.com/icons) code (e.g., `tune`, `settings`, `play_arrow`).
50+
* `order`: number. Lower values appear higher in the sidebar.
51+
* `badge`: optional string (max 15 characters). Adds a short label next to the sidebar item (e.g., "Alpha", "Beta", "Experimental").
4052

4153
## Embedded view URL
4254

@@ -63,14 +75,12 @@ On initial load of the embedded view (and on reload), the Portal provides the us
6375

6476
#### Frontend token exchange (postMessage)
6577

66-
The token is passed via `window.postMessage` between the parent (Portal) and the embedded iframe.
67-
68-
**Message types**
78+
The token is passed via `window.postMessage` between the parent (Portal) and the embedded iframe. The following message types are exchanged:
6979

7080
* `REQUEST_AUTH_TOKEN` — sent by the iframe to ask the parent for a token
7181
* `AUTH_TOKEN` — sent by the parent with `{ token: string }`
7282

73-
**In the embedded view (iframe)**
83+
Example implementation in the embedded view (iframe):
7484

7585
```ts
7686
// Ask the parent window (Portal) for a token
@@ -90,7 +100,7 @@ function messageHandler(event: MessageEvent) {
90100
window.addEventListener('message', messageHandler);
91101
```
92102

93-
**In the Portal (parent window)**
103+
Example implementation in the Portal (parent window):
94104

95105
```ts
96106
// Listen for requests from the target iframe
@@ -110,7 +120,7 @@ function messageHandler(event: MessageEvent) {
110120
window.addEventListener('message', messageHandler);
111121
```
112122

113-
**Security notes**
123+
Important security considerations:
114124

115125
* Always validate `event.origin` in the parent before responding.
116126
* Prefer using a specific `targetUrl` over `'*'` when posting back to the iframe.

0 commit comments

Comments
 (0)