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