Repository navigation
refactor(shared-notes): drop the DarkReader parts of the diagrams' light card - #26447
Merged
antobinary merged 1 commit intoNov 14, 2026
Conversation
…ght card The light card that keeps diagrams readable came from 4.0.2 (bigbluebutton#26221) with two parts that only matter under DarkReader: the `stylus` class on the card's stylesheet, which DarkReader skips, and the comments that explain it. 4.1 has no DarkReader (its dark theme is theme-dark.css, and the dependency is gone), and nothing else reads the class, so it does nothing here. The card stays. The diagram block still cannot redraw a diagram on a theme switch (TypeCellOS/BlockNote#3219), so diagrams keep Mermaid's light theme, and the card keeps them readable in the dark theme. The comment now says only that. The e2e test checked the class (styleKeptFromDarkReader). It now polls for the light card itself, and still checks in both themes that the boxes stay lighter than their labels.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 4
Please check the settings in the CodeRabbit UI or the
|
🚨 Automated tests failed |
antobinary
merged commit Nov 14, 2026
09939e6
into
bigbluebutton:v4.1.x-develop
53 of 55 checks passed
antobinary
deleted the
refactor-diagram-light-card-darkreader-leftovers-41
branch
November 14, 2026 00:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Removes the DarkReader leftovers from the light card that shared notes draw behind diagrams. They came to 4.1 with the 4.0.2 merge (#26442):
bn-shared-notes/mermaid-on-demand.ts: theclass="stylus"on the stylesheet that draws the card, and the comments about DarkReader.sharednotes/blocknote/math-diagram.ts:Diagrams stay light cards in dark modechecked for that class. It now waits for the light card itself.The card itself stays. 2 files, 6 lines added, 13 removed.
Why
Follow-up to this review comment on #26442.
DarkReader leaves stylesheets with the
stylusclass alone. On 4.0, where dark mode is DarkReader, the class kept DarkReader from recolouring the card. 4.1 replaced DarkReader with its own dark theme (theme-dark.css), and nothing in the client reads the class, so on 4.1 it does nothing.The light card is still needed. BlockNote's diagram block cannot redraw a diagram when the theme changes (TypeCellOS/BlockNote#3219), so diagrams are always drawn in Mermaid's light theme, and the card keeps them readable in the dark theme. The comment now says only that.
The test polled until the diagram's SVG had a
stylusstylesheet, then read the card's luminance once. It now polls the card's luminance (above 0.9) in both themes, and still checks that boxes stay lighter than their labels.How was it tested?
tsc --noEmitreports 0 errors, and eslint passes on the changed file.format:check,lintandtypecheckpass (the commands of the Playwright code check), and--liststill lists the 4 tests ofmath-diagram.spec.ts.git grep -i -E 'darkreader|stylus'finds nothing inbigbluebutton-html5/importsorbigbluebutton-tests/playwright.The spec was not run on a server beforehand. It is
@ci, so this PR's CI runs it against packages built from this branch.Not in this PR
4.0 keeps the class and the test's check, because its dark mode is still DarkReader. The two open 4.0 changes to
math-diagram.ts, #26410 and #26435, still apply cleanly on top of this, so the next 4.0 to 4.1 merge does not conflict here.Closes Issue(s)
None.