UI_MESSAGE to your plugin with the message_type you specified. You register a handler for that type in init() to respond.
The QuickAction type
Adding QuickActionMixin
Apply QuickActionMixin to your plugin class to unlock the defineQuickActions() method. The mixin pattern wraps your base class — you can chain multiple mixins:
QuickActionMixin and SidePanelMixin, chain them:
Defining quick actions
OverridedefineQuickActions() and return an array of QuickAction objects. FDO calls this method during plugin initialization to collect the actions it should display.
Registering handlers
Everymessage_type value you use in defineQuickActions() needs a matching handler registered in init(). When the user selects a quick action, FDO sends a UI_MESSAGE with that message_type as the handler name.
If you define a quick action with a
message_type that has no registered handler, selecting that action will result in an error response from the plugin. Register all handlers in init() before the plugin finishes loading.Icon field
Theicon field is a string identifier for the icon displayed alongside the action name in the FDO UI. Refer to the FDO host documentation for supported icon identifiers.
Full example
The following is adapted fromexamples/04-ui-extensions-plugin.ts:
Checklist
Apply QuickActionMixin
Wrap
FDO_SDK (or a chained mixin) with QuickActionMixin before defining your class.Override defineQuickActions()
Return an array of
QuickAction objects. Wrap the body in try/catch and return [] on error.Register a handler for each message_type
In
init(), call PluginRegistry.registerHandler(message_type, handler) for every message_type defined in your quick actions.