Skip to content

feat(ui): migrate to @bigbluebutton/bbb-ui-components-react 0.7.0 & pin dependencies - #134

Merged
GuiLeme merged 3 commits into
bigbluebutton:v0.1.xfrom
Arthurk12:adopt-bbb-ui-components-react
Sep 15, 2026
Merged

GuiLeme merged 3 commits into
bigbluebutton:v0.1.xfrom
Arthurk12:adopt-bbb-ui-components-react

Conversation

@Arthurk12

Copy link
Copy Markdown
Member

What does this PR do?

Migrates the plugin's UI to @bigbluebutton/bbb-ui-components-react@0.7.0, replacing the hand-rolled styled-components UI (buttons, checkboxes, modal chrome, typography, scrollable lists, spinner, dividers) with the shared library's components, and switches every hardcoded color to the library's semantic color tokens. Since the library's components don't read the plugin's --pru-sm scale variable, modalUiScale is now propagated to them via CSS zoom on the modal and panel root containers.

Adding the library's MUI-based dependency tree surfaced a webpack regression (5.110.2 newly flags a pre-existing MUI packaging pattern as an error), so webpack is pinned to the last known-good exact version, 5.110.1, and the temporary workarounds added earlier in the branch to route around it were removed. A react-is override was also added to force a single version tree-wide, fixing spurious "invalid prop" warnings caused by styled-components@5 and the library pulling in incompatible copies.

Finally, every dependency (including dev) is now pinned to an exact version instead of a caret/tilde range, as a supply-chain hardening measure — this stops a future npm install from silently picking up a new, unreviewed release.

Screenshot from 2026-09-01 16-46-03

@prlanzarin
prlanzarin requested review from AtilaU19 and lfzawacki and removed request for lfzawacki September 2, 2026 12:56

@GuiLeme GuiLeme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Besides the regression I explained in the inline comment, there's this small difference in the padding of the 2 lists.

Image

I believe the difference is in here:

See the available for selection list and the already selected

Comment thread src/components/modal/component.tsx
@GuiLeme
GuiLeme self-requested a review September 15, 2026 11:51

@GuiLeme GuiLeme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Code is solid.
I tested locally and it works as expected.

Replace the plugin's hand-rolled styled-components UI (buttons, checkboxes,
modal chrome, typography, scrollable lists, spinner, dividers) with the
shared library's components, and switch every hardcoded color to the
library's semantic color tokens. Library components don't read the
plugin's --pru-sm scale variable, so `modalUiScale` is now propagated via
CSS `zoom` on the two root containers instead.

Adding the library's MUI-based dependency tree surfaced a webpack
regression: 5.110.2 introduced stricter ESM re-export/named-import
validation that flags a pre-existing, previously-tolerated MUI packaging
pattern as an error. This project's "^5.95.0" range silently picked up
that regressed patch release, while sibling plugins pin an exact version
and were unaffected. Pin webpack to the last known-good exact version,
5.110.1, and drop the resolve.alias / NormalModuleReplacementPlugin
workarounds added earlier in this branch to route around it, since they're
unneeded once webpack itself is pinned to a version that doesn't regress.

Separately, styled-components v5 depends on react-is, and npm's hoisting
let two react-is versions coexist in the tree. Their differing internal
element-type symbols (react.element vs react.transitional.element) made
prop-types' isValidElement checks fail across that version boundary,
producing spurious "invalid prop" warnings. Force a single react-is
version tree-wide via a package.json override.
Replace every caret/tilde range in dependencies and devDependencies with
the exact currently-installed version, and pin the react-is override the
same way. Ranges let `npm install` silently pick up a new (and
potentially compromised) release without review; exact pins mean every
version bump is a deliberate, reviewable change — reducing supply-chain
attack surface.
react-modal appends its portal to whatever parentSelector returns and
never null-checks the result, so a client that renders no
#modals-container makes the plugin throw a TypeError out of mount instead
of degrading. The lookup is also typed HTMLElement | null, which trips
anyone type-checking this file under strictNullChecks.

Fall back to document.body when the container is absent, which is
react-modal's own default for that prop, and pass undefined rather than
null for a missing appElement — a falsy value there already reads as "no
app element given" to react-modal, so the behaviour is unchanged and only
the type stops lying.

This predates the migration to bbb-ui-components-react and is not a
fixup of it, hence a commit of its own.
@Arthurk12
Arthurk12 force-pushed the adopt-bbb-ui-components-react branch from 01ab11c to 4f57740 Compare September 15, 2026 12:57
@GuiLeme
GuiLeme merged commit 9f19bbe into bigbluebutton:v0.1.x Sep 15, 2026
4 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.

3 participants