Skip to content

Conversation

@GuiLeme
Copy link
Collaborator

@GuiLeme GuiLeme commented Jun 3, 2025

What does this PR do?

This PR introduces two main changes:

  1. Adds a new ui-data-getter
    A utility to fetch UI data on demand — unlike existing reactive hooks, this does not automatically update when data changes. It fetches the current data only when explicitly requested.

  2. Refactors existing ui-data logic
    Updates the previous ui-data-hooks structure to integrate seamlessly with the new ui-data-getter. Both now align under a shared goal: providing access to UI-related information, but with different update strategies (on-demand vs. reactive).

Why is this needed?

A key use case is retrieving a snapshot of the current slide with annotations. Doing this reactively (i.e., every time a new annotation is added) would be inefficient — especially in scenarios like a live class with multiple students making changes simultaneously.
This new approach avoids unnecessary computation by allowing a one-time fetch when needed.

Additionally, this design lays the groundwork for flexibility: if reactivity is later desired for specific data (e.g., presentation-whiteboard-current-slide), we can easily expose it as a hook with minimal changes to the core and SDK.

Motivation

As part of the La Suite Numérique docs integration, we need to append a base64-encoded PNG snapshot of the current slide at the end of the document. This feature supports that requirement cleanly and efficiently.

More

Closely related to bigbluebutton/bigbluebutton#23314

@GuiLeme GuiLeme merged commit 547783f into bigbluebutton:v0.0.x Jun 3, 2025
3 checks passed
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.

1 participant