You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
33
36
```
34
37
35
-
Notes
38
+
Configuration details
36
39
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").
40
53
41
54
## Embedded view URL
42
55
@@ -63,14 +76,12 @@ On initial load of the embedded view (and on reload), the Portal provides the us
63
76
64
77
#### Frontend token exchange (postMessage)
65
78
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:
69
80
70
81
* `REQUEST_AUTH_TOKEN` — sent by the iframe to ask the parent for a token
71
82
* `AUTH_TOKEN` — sent by the parent with `{ token: string }`
72
83
73
-
**In the embedded view (iframe)**
84
+
Example implementation in the embedded view (iframe):
74
85
75
86
```ts
76
87
// Ask the parent window (Portal) for a token
@@ -90,7 +101,7 @@ function messageHandler(event: MessageEvent) {
0 commit comments