ExtensionSidebar: Introduce ToggleExtensionSidebarEvent (#112325)

* ExtensionSidebar: Use appEvents for opening/closing sidebar

* Refactor

* Fix lint

* Introduce ToggleExtensionSidebar

* Revert keyboard shortcuts

* Revert "Refactor"

This reverts commit ffd901ed0c.

* Revert "ExtensionSidebar: Use appEvents for opening/closing sidebar"

This reverts commit 8083bec978.

* 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 commit 2dd33f744e.

* 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:
Ivana Huckova
2025-10-15 13:20:10 +02:00
committed by GitHub
parent a3c4f5cb9f
commit 89b3f64479
5 changed files with 191 additions and 10 deletions
@@ -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