SidePanelMixin. When a user selects a submenu item, FDO sends a UI_MESSAGE to your plugin with the item’s message_type. You register a handler for each type in init().
The SidePanelConfig type
Adding SidePanelMixin
Apply SidePanelMixin to your plugin class to unlock the defineSidePanel() method:
SidePanelMixin with QuickActionMixin if you need both:
Defining the side panel
OverridedefineSidePanel() and return a SidePanelConfig object. FDO calls this during plugin initialization.
Registering handlers
Eachmessage_type in your submenu_list needs a matching handler registered in init(). When the user selects a submenu item, FDO dispatches a UI_MESSAGE to the handler with that name.
A missing handler for a submenu
message_type will result in an error response when the user selects that item. Register all submenu handlers in init() before the plugin finishes loading.Icon field
Theicon field on SidePanelConfig is a string identifier for the icon displayed alongside your plugin’s label in the FDO side panel. Refer to the FDO host documentation for the list of supported icon identifiers.
Full example
The following is adapted fromexamples/04-ui-extensions-plugin.ts and shows both QuickActionMixin and SidePanelMixin used together:
Checklist
Apply SidePanelMixin
Wrap
FDO_SDK (or a chained mixin) with SidePanelMixin before defining your class.Override defineSidePanel()
Return a
SidePanelConfig object with icon, label, and submenu_list. Wrap the body in try/catch and return a config with an empty submenu_list on error.Register a handler for each message_type
In
init(), call PluginRegistry.registerHandler(message_type, handler) for every message_type in your submenu_list.