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
Hosts must define PluginSlot components in areas of the UI where they intend to accept extensions.
67
+
Hosts must define ``PluginSlot`` components in areas of the UI where they intend to accept extensions.
63
68
The Host MFE, and thus the owners of the Host MFE, are responsible for deciding where it is acceptable to mount a plugin.
64
69
They also decide the dimensions, responsiveness/scrolling policy, and whether the slot supports passing any additional
65
70
data to the plugin as part of its contract.
@@ -92,12 +97,12 @@ Plugin Micro-frontend (JSX) and Fallback Behavior
92
97
-------------------------------------------------
93
98
94
99
The plugin MFE is no different than any other MFE except that it defines a Plugin component as a child of a route.
95
-
This component is responsible for communicating (via postMessage) with the host page and resizing its content to match
100
+
This component is responsible for communicating (via ``postMessage``) with the host page and resizing its content to match
96
101
the dimensions available in the host’s PluginSlot.
97
102
98
103
It’s notoriously difficult to know in the host application when an iFrame has failed to load.
99
104
Because of security sandboxing, the host isn’t allowed to know the HTTP status of the request or to inspect what was
100
-
loaded, so we have to rely on waiting for a postMessage event from within the iFrame to know it has successfully loaded.
105
+
loaded, so we have to rely on waiting for a ``postMessage`` event from within the iFrame to know it has successfully loaded.
101
106
For the fallback content, the Plugin-owning team would pass a fallback component into the Plugin tag that is wrapped around their component, as noted below. Otherwise, a default fallback component would be used.
Copy file name to clipboardExpand all lines: src/plugins/Plugin.jsx
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ import {
16
16
import{PLUGIN_RESIZE}from'./data/constants';
17
17
importmessagesfrom'./Plugins.messages';
18
18
19
-
// TODO: create example-plugin-app/src/PluginOne.jsx for example of customizing errorFallback
19
+
// TODO: create example-plugin-app/src/PluginOne.jsx for example of customizing errorFallback as part of APER-3042 https://2u-internal.atlassian.net/browse/APER-3042
0 commit comments