Interface IMovableSectionRegistry

Registry that pairs source and target panels so the move plugin can wire up context-menu "Move to …" actions between them.

interface IMovableSectionRegistry {
    sourcePanelRegistered: ISignal<
        IMovableSectionRegistry,
        { id: string; label: string; sidebar: IMovableSectionSource },
    >;
    targetPanelRegistered: ISignal<
        IMovableSectionRegistry,
        { id: string; label: string; panel: IMovableSectionDestination },
    >;
    getSources(): ReadonlyMap<
        string,
        { label: string; sidebar: IMovableSectionSource },
    >;
    getTargets(): ReadonlyMap<
        string,
        { label: string; panel: IMovableSectionDestination },
    >;
    registerSource(
        id: string,
        label: string,
        sidebar: IMovableSectionSource,
    ): void;
    registerTarget(
        id: string,
        label: string,
        panel: IMovableSectionDestination,
    ): void;
}

Implemented by

Properties

sourcePanelRegistered: ISignal<
    IMovableSectionRegistry,
    { id: string; label: string; sidebar: IMovableSectionSource },
>

Fired each time a new source sidebar is registered via registerSource.

The move plugin listens to this signal to retroactively wire up context menus for sources that register after the plugin has already activated.

targetPanelRegistered: ISignal<
    IMovableSectionRegistry,
    { id: string; label: string; panel: IMovableSectionDestination },
>

Fired each time a new target panel is registered via registerTarget.

The move plugin listens to this signal to add the new target as an option in the context menus of all currently-registered source panels.

Methods

  • Register a sidebar as a source of moveable sections.

    After registration the move plugin adds a "Move to " context-menu item to each section header in sidebar. The label appears in the menu as "Move back to

    Parameters

    • id: string

      Stable plugin-scoped identifier, e.g. '@my-org/my-ext:panel'. Must be unique across all registered sources.

    • label: string

      Human-readable panel name shown in the context menu.

    • sidebar: IMovableSectionSource

      The panel implementing IMovableSectionSource.

    Returns void

  • Register a panel as a destination that can receive sections.

    After registration the move plugin adds a "Move to

    Parameters

    Returns void