ExtensionSidebar: Introduce ToggleExtensionSidebarEvent (#112325)
* ExtensionSidebar: Use appEvents for opening/closing sidebar * Refactor * Fix lint * Introduce ToggleExtensionSidebar * Revert keyboard shortcuts * Revert "Refactor" This reverts commitffd901ed0c. * Revert "ExtensionSidebar: Use appEvents for opening/closing sidebar" This reverts commit8083bec978. * Fix test * Refactor to prevent flakiness * Try again * Improve mocks * simple * trying anything at this point * Flip test order * Revert "Flip test order" This reverts commit2dd33f744e. * Update togglespyes and act * Try async await * Update test * Update solution * Update * Test * Update * Refactor * Uodate comments * Types * Fix type
This commit is contained in:
@@ -181,6 +181,15 @@ export type PluginExtensionEventHelpers<Context extends object = object> = {
|
||||
* Closes the extension sidebar.
|
||||
*/
|
||||
closeSidebar: () => void;
|
||||
/**
|
||||
* @internal
|
||||
* Toggles the extension sidebar with the registered component.
|
||||
* If the sidebar is open with the same component, it will be closed.
|
||||
* If the sidebar is closed or open with a different component, it will be opened with the specified component.
|
||||
* @param componentTitle The title of the component to be toggled in the sidebar.
|
||||
* @param props The props to be passed to the component.
|
||||
*/
|
||||
toggleSidebar: (componentTitle: string, props?: Record<string, unknown>) => void;
|
||||
};
|
||||
|
||||
// Extension Points & Contexts
|
||||
|
||||
Reference in New Issue
Block a user