Repository navigation
fix(whiteboard): highlight tool colors - #24165
Conversation
WalkthroughAdds Sequence DiagramsequenceDiagram
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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.highlightand calls itsonSelectmethod. While adding a defensive check foronSelectis reasonable, understand that:
The real dependency: If
tools.highlightdoesn't exist, the code already fails at line 231 (...tools.highlight).API contract: The
toolsparameter is passed by tldraw's UI override system. Standard tldraw tools (likehighlight) are guaranteed to haveonSelectas part of their interface. The code trusts this contract.Code pattern: The
deleteSelectedItemstool (lines 240–248) creates a new tool with only anonSelectmethod 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.highlightexists, not justonSelect: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.
|
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. |
|
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:
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. |
3c18a0a to
583d076
Compare
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.
583d076 to
9a20f9b
Compare
|
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. |
@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.
Automated tests Summary⏳ Tests are running... |
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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)



What does this PR do?
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.
Closes Issue(s)
Closes #none
More
The playback will still display the old yellow color, which will be adjusted in a separate PR:
