Skip to content

Commit 75997a1

Browse files
committed
Refine and update plugin YAML configuration and documentation
1 parent 0f17707 commit 75997a1

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

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

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,32 @@ 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+
sidebarItem: # Optional environment sidebar shortcut
31+
show: true # Whether to display a shortcut in the sidebar
32+
label: "Configuration" # Text for the menu item
33+
icon: "tune" # Material icon name
34+
order: 1 # Ordering (lower = higher)
35+
badge: "Alpha" # Optional. Add a short label next to the sidebar item
3336
```
3437
35-
Notes
38+
Configuration details
3639
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`).
40+
* `plugin.embeddedView`: accepts boolean or object.
41+
* If boolean `true`, equivalent to `{ enabled: true, hideHeader: false }`.
42+
* If boolean `false`, embedded view is disabled.
43+
* If object, use `enabled` (boolean, default = `false`) and `hideHeader` (boolean, default = `false`).
44+
45+
* `plugin.embeddedView.hideHeader`: if `true`, the deployment name and menu are not rendered in the embedded view.
46+
47+
* `plugin.sidebarItem`: optional object configuring the environment's left sidebar shortcut.
48+
* `show`: boolean. Whether to display the shortcut.
49+
* `label`: string. Text for the menu item.
50+
* `icon`: string. Must be a [Google Material icon](https://fonts.google.com/icons) code (e.g., `tune`, `settings`, `play_arrow`).
51+
* `order`: number. Lower values appear higher in the sidebar.
52+
* `badge`: optional string (max 15 characters). Adds a short label next to the sidebar item (e.g., "Alpha", "Beta", "Experimental").
4053

4154
## Embedded view URL
4255

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

6477
#### Frontend token exchange (postMessage)
6578

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

7081
* `REQUEST_AUTH_TOKEN` — sent by the iframe to ask the parent for a token
7182
* `AUTH_TOKEN` — sent by the parent with `{ token: string }`
7283

73-
**In the embedded view (iframe)**
84+
Example implementation in the embedded view (iframe):
7485

7586
```ts
7687
// Ask the parent window (Portal) for a token
@@ -90,7 +101,7 @@ function messageHandler(event: MessageEvent) {
90101
window.addEventListener('message', messageHandler);
91102
```
92103

93-
**In the Portal (parent window)**
104+
Example implementation in the Portal (parent window):
94105

95106
```ts
96107
// Listen for requests from the target iframe
@@ -110,7 +121,7 @@ function messageHandler(event: MessageEvent) {
110121
window.addEventListener('message', messageHandler);
111122
```
112123

113-
**Security notes**
124+
Important security considerations:
114125

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

0 commit comments

Comments
 (0)