Skip to content

fix(whiteboard): highlight tool colors - #24165

Merged
prlanzarin merged 3 commits into
bigbluebutton:v3.1.x-releasefrom
Arthurk12:bbb/31/2484
Dec 8, 2025
Merged

prlanzarin merged 3 commits into
bigbluebutton:v3.1.x-releasefrom
Arthurk12:bbb/31/2484

Conversation

@Arthurk12

@Arthurk12 Arthurk12 commented Oct 29, 2025 •

Copy link
Copy Markdown
Member

What does this PR do?

Screenshot from 2025-11-07 19-23-03

Closes Issue(s)

Closes #none

More

The playback will still display the old yellow color, which will be adjusted in a separate PR:
Screenshot from 2025-11-07 19-28-32

@coderabbitai

coderabbitai Bot commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds setupColorThemePaletteOverrides() to the whiteboard service which mutates DefaultColorThemePalette from @bigbluebutton/tldraw to replace highlight-related colors for both light and dark themes with solid yellow values (including srgb/p3 variants). The whiteboard component imports and invokes this function at module load so the overrides are applied on initialization. Additionally, record-and-playback/core/scripts/bigbluebutton.yml updates bbb_version from 3.0.9 to 3.0.17. A git branch reference in bbb-playback.placeholder.sh is updated from v5.4.0 to v5.4.2. No other control flow or public API behavior is changed.

Sequence Diagram

sequenceDiagram
    participant Component as Whiteboard Component (module load)
    participant Service as whiteboard/service.js
    participant Palette as DefaultColorThemePalette

    Component->>Service: import & call setupColorThemePaletteOverrides()
    Service->>Palette: mutate light.black.highlight -> solid yellow (srgb/p3)
    Service->>Palette: mutate light.yellow -> solid yellow (srgb/p3)
    Service->>Palette: mutate dark.black.highlight -> solid yellow (srgb/p3)
    Service->>Palette: mutate dark.yellow -> solid yellow (srgb/p3)
    Palette-->>Service: mutation complete
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check setupColorThemePaletteOverrides() modifies the correct palette keys and performs intended in-place mutation.
  • Verify the whiteboard component import/call occurs at module load and that the side-effect timing is acceptable.
  • Validate color value formats (srgb/p3) match @bigbluebutton/tldraw expectations.
  • Confirm bbb_version bump and the branch change in bbb-playback.placeholder.sh are intentional and consistent with release requirements.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating whiteboard highlight tool colors, specifically making the yellow color more vibrant for better visibility.
Description check ✅ Passed The description clearly relates to the changeset, explaining what the PR does (updates default yellow color), includes visual evidence, and documents the version bump for recording scripts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5eff691 and 6dc46ae.

📒 Files selected for processing (2)
  • bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (2 hunks)
  • bigbluebutton-html5/imports/ui/components/whiteboard/service.js (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (2)
bigbluebutton-html5/imports/ui/components/whiteboard/service.js (1)
  • setupColorThemePaletteOverrides (412-437)
bigbluebutton-html5/imports/ui/components/whiteboard/container.jsx (1)
  • editor (70-70)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-package (bbb-html5)
🔇 Additional comments (2)
bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (2)

47-47: Module-level palette override is applied correctly.

The call to setupColorThemePaletteOverrides() at module level ensures color palette overrides are applied before any tldraw components mount. This is the appropriate timing for global theme configuration.


230-236: The review concern is valid but partially addresses the wrong layer of risk.

The code spreads tools.highlight and calls its onSelect method. While adding a defensive check for onSelect is reasonable, understand that:

  1. The real dependency: If tools.highlight doesn't exist, the code already fails at line 231 (...tools.highlight).

  2. API contract: The tools parameter is passed by tldraw's UI override system. Standard tldraw tools (like highlight) are guaranteed to have onSelect as part of their interface. The code trusts this contract.

  3. Code pattern: The deleteSelectedItems tool (lines 240–248) creates a new tool with only an onSelect method and no defensive checks, suggesting the developer expects tldraw to respect this standard.

Recommendation: The defensive check is good practice for robustness. However, if you add it, add it earlier to validate tools.highlight exists, not just onSelect:

if (!tools.highlight) {
  console.warn('Highlight tool not available');
  return updatedTools;
}

Or more simply:

if (tools.highlight?.onSelect) {
  tools.highlight.onSelect();
}

The suggestion to add a check is sound defensive programming, though it may indicate unnecessary caution about a well-documented library's API.

@gustavotrott

Copy link
Copy Markdown
Contributor

hey, I gave it a try, and I have to say the auto-selecting yellow behavior feels quite annoying. when I switch back from the highlighter to another tool, it keeps drawing in yellow instead of restoring my previous color, which feels confusing and unintuitive.

I believe Steve intentionally designed it the current way. the existing logic (black automatically becomes yellow when highlight tool is selected) is simple to understand and easy to predict. any alternative behavior tends to break that clarity and creates frustration when the color suddenly changes to something unexpected.

I also discussed it internally, and the general consensus was that the default behavior in Tldraw already provides the most consistent and user-friendly experience.

@prlanzarin prlanzarin added this to the Release 3.1 milestone Nov 3, 2025
@lfzawacki

Copy link
Copy Markdown
Contributor

Yeah, the original behavior in TLDraw is understandable, but the inconsistent display of the color, e.g a black highlighter draws as yellow. They've expressed they don't want to change this and so we've tried to at least have the right color be displayed by changing the color to yellow whenever the user selects the highlighter. As I see we could solve it a few different ways:

  • Do nothing and keep the old behavior
  • Change color to yellow whenever we switch to highlighter. The color can be changed normally afterwards (this is the solution in 66f7dbb
  • Have the default color for the highlighter be the same as the one for pencil (black). This is the most consistent option, but might be equally confusing to people just wanting the highlighter to default to yellow which is a pretty common color for this usage.

AFAIK we can't change the position of the yellow color in the pallete for the highlighter, so this is not an option

I'd like some input on how to solve this as the status quo was also reported as confusing by customers and TBH it looks like a bug in the application because of the incosistent display of the color.

PS.: I'm assuming the third commit is incontroversial as it only adds a more useful shade of yellow to the pencil pallete instead of two very similar oranges.

Updates the default yellow color from #FFFF00 to a more vibrant shade,
improving visual distinction from the orange color and enhancing overall
visibility in drawings and highlights.
@kepstin

kepstin commented Nov 25, 2025 •

Copy link
Copy Markdown
Contributor

This change needs to be accompanied by a bump to the reported bbb version for recordings (set in bigbluebutton.yml) so the recording processing scripts can tell which set of colours need to be used.

antobinary and others added 2 commits December 2, 2025 14:44
@Arthurk12 's bbb-playback change 'feat(whiteboard): make default yellow color more vibrant' warrants a bump in the bbb_version.
bigbluebutton/bbb-playback#318 (comment)

Bump record-and-playback's version to '3.0.17' so we can identify in which recordings those new colors are present.
@github-actions

github-actions Bot commented Dec 5, 2025

Copy link
Copy Markdown

Automated tests Summary

⏳ Tests are running...

@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2025

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a57505c and 71f7071.

📒 Files selected for processing (1)
  • bbb-playback.placeholder.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-playback-record)

Comment thread bbb-playback.placeholder.sh Resolved
@prlanzarin
prlanzarin merged commit b1a73eb into bigbluebutton:v3.1.x-release Dec 8, 2025
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.

7 participants