Interface IMovableSectionSource

Implemented by sidebar panels whose accordion sections can be moved to another panel by the user.

Register an implementation with IMovableSectionRegistry.registerSource.

interface IMovableSectionSource {
    accordionPanel: null | AccordionPanel;
    sectionAdded: ISignal<IMovableSectionSource, ISectionEntry>;
    getSections(): readonly ISectionEntry[];
    reinsertSection(widget: Widget): void;
    removeSectionById(sectionId: string): null | Widget;
}

Hierarchy (View Summary)

Properties

accordionPanel: null | AccordionPanel

The AccordionPanel that renders this sidebar's sections.

The move plugin reads this to set up drag-to-reorder handles after a section is moved.

Emitted each time a new section widget is added to this panel.

Implementations should emit this signal from addWidget (or equivalent) with a fully-populated ISectionEntry for the newly added widget.

Methods

  • Detach the section identified by sectionId and return its widget so the move plugin can hand it to a target panel.

    A typical implementation sets widget.parent = null, which detaches the widget from the AccordionPanel without destroying it. Returns null if no section with the given id currently exists in this panel.

    Parameters

    Returns null | Widget