Skip to content

fix(html5): scope the dark modal surface to GenericModal's own portal class - #30

Merged
antobinary merged 2 commits into
antobinary:merge-v4.0.x-develop-into-v4.1.x-developfrom
germanocaumo:fix/pr26198-dark-modal-scope
Oct 26, 2026
Merged

antobinary merged 2 commits into
antobinary:merge-v4.0.x-develop-into-v4.1.x-developfrom
germanocaumo:fix/pr26198-dark-modal-scope

Conversation

@germanocaumo

Copy link
Copy Markdown

What does this PR do?

Fixes two dark-theme regressions in 8b24fc7 ("give library modals the dark surface again") from bigbluebutton#26198. That rule paints the modal surface on .modal-low, .modal-medium and .modal-high, on the assumption that only GenericModal sets those portal classes. It doesn't hold in two cases:

  • The "Clear all annotations" confirmation is white with white text. It passes priority="0", so its GenericModal portal is modal-0 and the rule misses it. The library paints the box with --color-white, which stays white in the dark theme, and the title and question are white too. Only the buttons show.
  • Plugin modals get a dark block inside their own card. Plugins render their own react-modal with the same classes. pick-random-user v0.1.1 sets portalClassName="modal-low" and keeps its card #FFF, so .ReactModal__Content > div:last-child paints its content #2D2F38 behind the plugin's grey text.

GenericModal now adds a generic-modal class to its portal, and the rule keys off that class only. The modal-* classes and their z-index and FIFO rules are unchanged.

The confirmation keeps priority="0". It is always mounted, and react-modal keeps a closed modal's empty portal in #modals-container. As modal-low, it would hide every later modal-low portal through the FIFO rule in modals.css; the plugin modal stopped showing when I tried it.

The dark mode reload test now also checks the settings modal footer, which the rule paints too. A second commit fixes the release test plan intro, which still pointed at v4.0.x-develop. The light theme is unchanged.

Before (dark) After (dark)
Clear all annotations before after
pick-random-user (picked user's view) before after

Closes Issue(s)

None. Follow-up to bigbluebutton#26198, targeting its branch.

Motivation

Found while reviewing bigbluebutton#26198.

How to test

  1. Turn on the dark theme, either in Settings or with userdata-bbb_prefer_dark_theme=true.
  2. As presenter, open Whiteboard options → Clear all annotations. The confirmation should be dark, with its title and question readable.
  3. Create the meeting with pick-random-user v0.1.1 in pluginManifests, and pick a viewer. The picked-user modal should be a plain white card.
  4. Open Settings. The content and the footer should both be dark.
  5. Repeat in the light theme. Nothing should change.

More

  • A modal-0 portal gets none of the z-index or FIFO rules in modals.css, and its overlay comes from the library's inline default. That is already the case on v4.0.x-develop and is left as is.
  • Added/updated documentation

… class

The dark-theme rule from 8b24fc7 painted the modal surface on every
portal with the modal-low, modal-medium or modal-high class, on the
assumption that only GenericModal sets them. Two cases broke:

- Plugins render their own react-modal with those classes too. The
  pick-random-user plugin (v0.1.1) sets portalClassName="modal-low" and
  keeps a white card, so the rule painted its last content block
  #2D2F38 behind grey text.
- A GenericModal whose priority is none of the three gets no surface:
  the "Clear all annotations" confirmation passes priority="0", so its
  portal is modal-0 and it stayed white with white title and text in
  dark mode.

GenericModal now adds a generic-modal class to its portal and the rule
keys off that class only. The confirmation keeps priority="0": it is
always mounted, and react-modal keeps the empty portal of a closed modal
in the DOM, so as modal-low it would hide every later modal-low portal
through the FIFO rule in modals.css (a plugin modal, for one).

Checked on a merged build in Chromium against a 4.1 server. Dark theme:
the confirmation is #2D2F38, the plugin's content block is transparent
again, the settings modal content and footer stay #2D2F38. Light theme:
all three unchanged. The dark mode reload test now also checks the
settings modal footer.
The automated test cases link to specs on v4.1.x-develop since the merge of
v4.0.x-develop, but the introduction still named v4.0.x-develop.
@github-actions

Copy link
Copy Markdown

Thank you for this contribution!
Could you please confirm if you already sent in the signed Contributor License Agreement?
See https://docs.bigbluebutton.org/support/faq.html#why-do-i-need-to-sign-a-contributor-license-agreement-to-contribute-source-code
Thanks in advance!

@antobinary
antobinary merged commit 98f1155 into antobinary:merge-v4.0.x-develop-into-v4.1.x-develop Oct 26, 2026
21 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.

2 participants