Skip to content

feat(ui-commands): allow plugins to open a core panel or a specific sidekick panel - #282

Closed
AtilaU19 wants to merge 3 commits into
bigbluebutton:v0.1.xfrom
AtilaU19:sidekick-area/open-specific-panel
Closed

feat(ui-commands): allow plugins to open a core panel or a specific sidekick panel#282
AtilaU19 wants to merge 3 commits into
bigbluebutton:v0.1.xfrom
AtilaU19:sidekick-area/open-specific-panel

Conversation

@AtilaU19

@AtilaU19 AtilaU19 commented Aug 4, 2026

Copy link
Copy Markdown

What does this PR do?

Adds pluginApi.uiCommands.sidekickArea.panel, so a plugin can drive the sidekick area from a button of its own:

// the plugin's own sidekick, by the id setGenericContentItems returned
pluginApi.uiCommands.sidekickArea.panel.open('my-content-id');

// a core panel
pluginApi.uiCommands.sidekickArea.panel.open(undefined, SidekickAreaCorePanelEnum.POLL);

// close it again, or close whatever is on display
pluginApi.uiCommands.sidekickArea.panel.close('my-content-id');
pluginApi.uiCommands.sidekickArea.panel.close();

open and close take the target as two arguments rather than one union, so the position tells a generic content id apart from a core panel — a plugin may pick its own id, and 'poll' would otherwise be ambiguous.

The newly exported SidekickAreaCorePanelEnum covers Chat, User list, Shared notes, Apps gallery, Polls, Timer and Breakout rooms. The client only honours a panel the user could have reached themselves: Polls, Timer and Breakout are ignored unless they are registered for that user, whose registration already accounts for role and feature flag.

The commands ship with their own window events, OPEN_SIDEKICK_AREA_PANEL_COMMAND and
CLOSE_SIDEKICK_AREA_PANEL_COMMAND. The diff is purely additive: the deprecated sidekickArea.options.panel and sidekickOptionsContainer are untouched, so plugins built against an older SDK are unaffected.

sidekickArea.options.panel.open also gained the optional id of a generic content sidekick area, so a plugin can open its own sidekick panel the same way.

More

Screencast.from.04-08-2026.14.13.27.webm

@Arthurk12
Arthurk12 self-requested a review August 4, 2026 17:38
AtilaU19 added a commit to AtilaU19/bigbluebutton that referenced this pull request Aug 4, 2026
The sidekick-area core panel commands handled by this branch are not part
of a released SDK yet, so the pinned 0.1.20 does not compile. Point the
dependency at the SDK pull request head until it is published.

bigbluebutton/bigbluebutton-html-plugin-sdk#282
*/
open: () => {
window.dispatchEvent(new Event(SidekickAreaOptionsPanelEnum.OPEN));
open: (id?: string) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sidekick options container is analogous to the sidebar navigation, so its open and close methods are expected to open and close the sidebar navigation itself. With that in mind, I have 2 suggestions:

  1. Remove those methods (pluginApi.uiCommands.sidekickArea.options.open/close), as BBB 4.0 does not allow toggling the sidebar navigation — and calling them already has no effect, since they are bypassed in the BBB core:
    https://github.com/bigbluebutton/bigbluebutton/blob/13c457fc6f47a651a2ecb19155a87ab7bc609dd2/bigbluebutton-html5/imports/ui/components/plugins-engine/ui-commands/sidekick-options-container/handler.tsx#L8-L18
    (This can be addressed in a separate PR.)
  2. Move the new methods implemented here to src/ui-commands/sidekick-area/panel/commands.ts, so the caller code would be:
pluginApi.uiCommands.sidekickArea.panel.open('my-content-id')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thoughts on this approach, @GuiLeme?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed on both suggestions. Having a the commands under sidekick.panel is the right approach:

pluginApi.uiCommands.sidekickArea.panel.open('my-content-id');
pluginApi.uiCommands.sidekickArea.panel.close('my-content-id')

@Arthurk12

Copy link
Copy Markdown
Member

Superseded by #286

@Arthurk12 Arthurk12 closed this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants