Skip to content

feat: ui-command to open a specific sidekick content #270

Description

@GuiLeme

Problem

Currently there's no way to programmatically open a specific sidekick content even if I have its ID. This is a big downside to manipulate one of the most important areas/features in the plugins.

Along with this ui-command, we could also provide a way to fetch the information of what sidekick content is being displayed at a moment so that the developer could decide whether to open their sidekick or not.

This would improve the development experience in case of sidekick conflict (multiple sidekick renders with open: true, in this case selecting the last one is not a big deal because a certain plugin could "override" this behavior with a ui-command).

Expected behavior

I believe the API for the command should be something like this:

pluginApi.uiCommands.sidekickArea.content.panel.open(sidekickId: string): void

And for the ui-hook:

pluginApi.useUiData(LayoutSidekickAreaUiDataNames.CURRENT_CONTENT)

SDK version:

v0.0.x and v0.1.x

Additional context

I believe the decision of choosing the last sidekick content to be open in a conflict situation (multiple sidekicks subscribing to be opened automatically) is much more acceptable if we have the ui-commands and ui-data-hook described here. For reference, look at PR: bigbluebutton/bigbluebutton#25069

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions