Whiteboard: floating selection toolbar stays visible during presentation #189
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard#189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When the floating selection toolbar is open (something is selected on the board) and the user clicks Play to enter presentation mode, the toolbar remains visible over the slide. Same goes for the comment popover if a comment was open. The presentation overlay hides everything else (
.wb-navbar,.wb-toolbar,.wb-subtoolbar,.wb-minimap,.wb-zoom,.wb-emoji-picker,.wb-context-menu,#theme-panel,#properties-panel) but missed.wb-sel-toolbarand any other DOM overlay added after the presentation feature originally landed.Location of the hide-list:
crates/hero_whiteboard_admin/templates/web/board.html:11-19.Location of the toolbar class:
crates/hero_whiteboard_admin/static/web/js/whiteboard/selection_toolbar.js:49→el.className = "wb-sel-toolbar".Approach
Two-pronged:
.wb-sel-toolbar(and the comment popover.comment-popover) to the existingbody.wb-presenting … { display: none !important; }CSS rule intemplates/web/board.html.WhiteboardFrames.startPresentationshould callWhiteboardSelectionToolbar.hide()(andWhiteboardComments.hidePopover()if present) so the JS state is also reset, not just visually hidden. Without this, leaving presentation reveals a stale toolbar that may not reflect the current selection.Acceptance
Implementation Spec for Issue #189
Files to Modify
templates/web/board.htmlstatic/web/js/whiteboard/frames.jsPlan
Step 1: Extend the presentation hide-list
File:
templates/web/board.html:11-19Add
.wb-sel-toolbarand.comment-popoverto the existingbody.wb-presenting … { display: none !important; }rule. After the edit the block reads:Step 2: Reset JS state when entering presentation
File:
static/web/js/whiteboard/frames.js— insidestartPresentation(~line 130), right afterdocument.body.classList.add('wb-presenting'):This ensures the JS sees a hidden state, so when the user exits presentation and clicks a new object, the toolbar shows fresh rather than re-revealing whatever was selected pre-presentation.
Acceptance Criteria
Notes
typeof … !== 'undefined' && …) so a missing module never throws.Test Results + Final Summary
Changes
templates/web/board.html— added.wb-sel-toolbarand.comment-popoverto thebody.wb-presenting … { display: none !important; }rule.static/web/js/whiteboard/frames.js—startPresentationnow callsWhiteboardSelectionToolbar.hide()andWhiteboardComments.hidePopover()(both guarded) right after adding thewb-presentingclass.Behaviour after fix
Gates
node -c frames.js— JS syntax OKcargo fmt --check— passcargo clippy --workspace --all-targets -- -D warnings— passManual verification still required
Rebuild + restart
hero_whiteboard_admin. Select an object → click Play → confirm the toolbar is hidden in the slide. Open a comment popover → click Play → confirm the popover is hidden.