SCION Workbench Client - v1.0.0-beta.35
    Preparing search index...

    Interface WorkbenchMessageBoxCapability

    Represents a microfrontend for display in a workbench message box.

    A message box is a standardized dialog for presenting a message to the user, such as an info, warning or alert, or for prompting the user for confirmation.

    Displayed on top of other content, a modal message box blocks interaction with other parts of the application. A message box can be context-modal or application-modal. Message boxes are stacked per modality, with only the topmost message box in each stack being interactive.

    The microfrontend can inject the WorkbenchMessageBox handle to interact with the message box, such as reading parameters or signaling readiness.

    The message box does not automatically adapt its size to the content. Refer to WorkbenchMessageBoxCapability.properties.size for more information.

    • WorkbenchMessageBox
    • WorkbenchMessageBoxService
    interface WorkbenchMessageBoxCapability {
        params?: ParamDefinition[];
        properties: {
            cssClass?: string | string[];
            path: string;
            showSplash?: boolean;
            size?: WorkbenchMessageBoxSize;
            [key: string]: unknown;
        };
        qualifier: Qualifier;
        type: MessageBox;
    }

    Hierarchy

    • Capability
      • WorkbenchMessageBoxCapability
    Index

    Properties

    params?: ParamDefinition[]

    Specifies parameters required by the message box.

    Parameters can be read in the microfrontend by injecting the WorkbenchMessageBox handle, or referenced in the path using the colon syntax.

    properties: {
        cssClass?: string | string[];
        path: string;
        showSplash?: boolean;
        size?: WorkbenchMessageBoxSize;
        [key: string]: unknown;
    }

    Type Declaration

    • [key: string]: unknown

      Arbitrary metadata associated with the capability.

    • OptionalcssClass?: string | string[]

      Specifies CSS class(es) to add to the message box, e.g., to locate the message box in tests.

    • path: string

      Specifies the path to the microfrontend.

      The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.

      Path segments can reference capability parameters using the colon syntax.

      {
      "params": [
      {"name": "id", "required": true}
      ],
      "properties": {
      "path": "products/:id", // `:id` references a capability parameter
      }
      }
    • OptionalshowSplash?: boolean

      Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the message box microfrontend signals readiness.

      By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.

      WorkbenchMessageBox.signalReady

    • Optionalsize?: WorkbenchMessageBoxSize

      Specifies the size of the message box.

      The message box does not automatically adapt its size to the content (only for message boxes provided by the host). Specify a fixed size in the capability or report it from the microfrontend using @scion/microfrontend-platform!PreferredSizeService. If reporting it from the microfrontend, consider also specifying the size in the capability to avoid flickering, as the microfrontend may take some time to load.

    qualifier: Qualifier

    Qualifies this message box. The qualifier is required for a message box.