-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
type: enhancementImprovements to existing functionalityImprovements to existing functionality
Description
Acceptance Criteria
-
registerActivityBarPanel()exists and is callable by 3rd party plugins - Function handles edge cases & invalid input
- Tests:
- Help Panel tests should work
- Explorer Panel tests should work (rename to Query Composer)
Technical Details
const { registerActivityBarPanel } = window.WPGRAPHQL_IDE;
registerActivityBarPanel( 'my-button', {
title: 'My Button',
label: 'My Button does x, y and z',
icon: () => {}, // name of icon from supported icon library or custom Icon component
content: () => {} // The content that will render in the activity panel when this activity bar plugin is active
} );The smart cache collections feature will most certainly make use of this API.
An example of the help screen as a plugin might look like this:
const { registerActivityBarPanel } = window.WPGRAPHQL_IDE;
registerActivityBarPanel( 'help', {
title: 'Help',
label: 'Help',
icon: () => <HelpIcon />,
content: () => <HelpPluginList /> // In the screenshot below, this component represents the list of articles visible in the activity panel when the help button is active
} );The list of panels should be maintained in the Redux store, so registering a panel should modify the list of panels in the Redux store. Similar when you call registerBlockType in Gutenberg.
Reference
Metadata
Metadata
Assignees
Labels
type: enhancementImprovements to existing functionalityImprovements to existing functionality
