Skip to content

Ref(html5): Make webcam show ui on hover or touch hold - #24798

Merged
antobinary merged 5 commits into
bigbluebutton:v3.0.x-developfrom
Tainan404:i-24786
Apr 15, 2026
Merged

antobinary merged 5 commits into
bigbluebutton:v3.0.x-developfrom
Tainan404:i-24786

Conversation

@Tainan404

@Tainan404 Tainan404 commented Mar 24, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Make the changes to show webcam ui on mouse hover or touch.

Closes Issue(s)

Closes #24786

More

Screencast.from.25-03-2026.12.43.02.webm

@coderabbitai

coderabbitai Bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Added hover-driven behavior for squeezed (small) video items: the component tracks isHovered with a hoverTimeoutRef and clears pending timeouts on unmount. When isVideoSqueezed, mouse enter/leave toggle hover immediately; touchstart delays setting isHovered=true by 300ms and schedules an auto-reset after 3s; touchmove cancels pending timeouts and clears hover. A new SqueezedName styled component is exported and rendered inside Styled.BottomBar only when isVideoSqueezed && isHovered. The English locale string for app.videoDock.webcamSqueezedButtonLabel was changed.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant VideoListItem
    participant HoverTimeout
    participant Renderer

    User->>VideoListItem: mouseenter (if squeezed)
    VideoListItem->>Renderer: set isHovered = true (render name)
    User->>VideoListItem: mouseleave
    VideoListItem->>Renderer: set isHovered = false (hide name)

    User->>VideoListItem: touchstart (if squeezed)
    VideoListItem->>HoverTimeout: start 300ms enter-timer
    Note right of HoverTimeout: after 300ms
    HoverTimeout-->>VideoListItem: enter-timer fires
    VideoListItem->>Renderer: set isHovered = true (render name)
    VideoListItem->>HoverTimeout: start 3s auto-reset
    Note right of HoverTimeout: after 3s
    HoverTimeout-->>VideoListItem: auto-reset fires
    VideoListItem->>Renderer: set isHovered = false (hide name)

    User->>VideoListItem: touchmove
    VideoListItem->>HoverTimeout: cancel timers
    VideoListItem->>Renderer: set isHovered = false
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR implements hover and touch functionality to reveal user names in squeezed webcam views [#24786], but reviewer feedback suggests it removes existing collapse logic entirely rather than retaining selective collapse, potentially missing the alternative approach. Clarify whether the implementation fully addresses #24786's requirement for hover-state name visibility, or if selective collapse of non-essential controls should be retained for better UX and plugin action accommodation.
Out of Scope Changes check ❓ Inconclusive Most changes are directly related to implementing hover/touch UI reveal [#24786]. However, reordering in user-actions component and import reorganization appear to be refactoring unrelated to the hover functionality. Review whether reordering of callbacks and imports in user-actions component and styles.ts are necessary for the hover feature, or if they should be separated into a distinct refactoring PR.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: implementing hover and touch-hold UI visibility for squeezed webcam view, matching the core objective.
Description check ✅ Passed The description is related to the changeset, explaining that it shows webcam UI on mouse hover or touch, and references the closed issue #24786.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@antobinary antobinary added this to the Release 3.0 milestone Mar 24, 2026

Copilot AI 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.

Pull request overview

This PR updates the HTML5 webcam tile UI so that, when tiles become “squeezed” (too small for the normal overlays), the webcam overlays (incl. user name/actions) are shown on hover (and intended touch interaction) rather than always occupying space.

Changes:

  • Removes the dedicated “squeezed” webcam options button and its i18n label.
  • Simplifies UserActions by dropping the squeezed-mode rendering path.
  • Adds hover tracking in VideoListItem and conditionally shows the default overlay UI when squeezed.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
bigbluebutton-html5/public/locales/en.json Removes the squeezed webcam options button label string.
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/styles.ts Removes squeezed-button specific styled components and related imports.
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/component.tsx Removes squeezed-mode menu item/button logic; always renders the default menu trigger.
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx Adds hover state and gates overlay rendering in squeezed mode based on hover.
Comments suppressed due to low confidence (2)

bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx:481

  • When squeezed and not hovered, the UI is not rendered at all, which also makes it unreachable for keyboard-only users (there’s nothing to tab to). Please ensure the webcam UI becomes visible on keyboard focus as well (e.g., using :focus-within on the container or onFocus/onBlur handlers to mirror the hover state).
        </Styled.VideoContainer>

bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx:481

  • renderDefaultButtons() is conditionally mounted based on isHovered. When squeezed, moving the cursor from the video item to the opened BBBMenu (which is rendered in a portal/container outside the item) will trigger onMouseLeave, unmount the trigger/menu, and effectively close the menu before a selection can be made. To avoid this, keep the controls mounted and only toggle visibility via CSS (e.g., opacity/pointer-events) and/or keep them visible while the menu is open (isHovered || isMenuOpen), ideally also supporting :focus-within for keyboard users.
        </Styled.VideoContainer>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

🧹 Nitpick comments (2)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/component.tsx (1)

83-107: Remove unused onHandleDisableCam prop.

The onHandleDisableCam prop is defined in the interface (line 94) and passed from the parent component, but it's never destructured or used. The component uses a local toggleDisableCam function (lines 156-163) instead. This appears to be dead code remaining from the removed squeezed button functionality.

🧹 Suggested cleanup

Remove from interface:

 interface UserActionProps {
   name: string;
   stream: VideoItem;
   cameraId: string;
   numOfStreams: number;
   onHandleVideoFocus: ((id: string) => void) | null;
   focused: boolean;
   onHandleMirror: () => void;
   isMirrored: boolean;
   isRTL: boolean;
   isStream: boolean;
-  onHandleDisableCam: () => void;
   isSelfViewDisabled: boolean;
   amIModerator: boolean;
   videoContainer?: MutableRefObject<HTMLDivElement | null>,
   isFullscreenContext: boolean;
   layoutContextDispatch: (...args: unknown[]) => void;
 }

And remove the corresponding prop from the parent call site in component.tsx:

         <UserActions
           name={name}
           stream={stream}
           cameraId={cameraId}
           numOfStreams={numOfStreams}
           onHandleVideoFocus={onHandleVideoFocus}
           focused={focused}
           onHandleMirror={() => setIsMirrored((value) => !value)}
           isMirrored={isMirrored}
           isRTL={isRTL}
           isStream={isStream}
-          onHandleDisableCam={() => setIsSelfViewDisabled((value) => !value)}
           isSelfViewDisabled={isSelfViewDisabled}
           amIModerator={amIModerator}
           videoContainer={videoContainer}
           isFullscreenContext={isFullscreenContext}
           layoutContextDispatch={layoutContextDispatch}
         />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/component.tsx`
around lines 83 - 107, The UserActionProps interface contains an unused prop
onHandleDisableCam which is never destructured or referenced inside the
UserActions component (component.tsx) because the component uses a local
toggleDisableCam function; remove onHandleDisableCam from the UserActionProps
interface and also remove the prop passed from the parent call site so there are
no dangling/unreferenced props—search for UserActionProps, onHandleDisableCam,
and toggleDisableCam to update the interface and the parent invocation
accordingly.
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx (1)

445-454: Consider hybrid device interaction and extracting the timeout constant.

Two observations:

  1. Hybrid devices edge case: On devices supporting both mouse and touch (touchscreen laptops), if a user is hovering with the mouse and then taps, the 3-second timeout will dismiss the UI even though the cursor remains over the element.

  2. Magic number: Consider extracting 3000 to a named constant for clarity.

🔧 Suggested improvement
 const VIDEO_CONTAINER_WIDTH_BOUND = 125;
 const VIDEO_CONTAINER_PLUGIN_HELPERS_WIDTH_BOUND = 175;
+const TOUCH_HOVER_TIMEOUT_MS = 3000;
       onTouchStart={() => {
         if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
         setIsHovered(true);
-        hoverTimeoutRef.current = setTimeout(() => setIsHovered(false), 3000);
+        hoverTimeoutRef.current = setTimeout(() => setIsHovered(false), TOUCH_HOVER_TIMEOUT_MS);
       }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx`
around lines 445 - 454, The touch handler uses a magic 3000ms and always sets a
timeout that will hide UI even when the mouse cursor is still hovering; extract
the 3000 into a named constant (e.g. HOVER_TOUCH_TIMEOUT) and change the
onTouchStart logic in the component (handlers around hoverTimeoutRef,
setIsHovered, onMouseEnter/onMouseLeave/onTouchStart) so it does not schedule
the hide timeout when the element is already hovered (check isHovered) — only
set the touch timeout when not currently hovered, and keep clearing
hoverTimeoutRef on enter/touch as before.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx`:
- Around line 445-454: The touch handler uses a magic 3000ms and always sets a
timeout that will hide UI even when the mouse cursor is still hovering; extract
the 3000 into a named constant (e.g. HOVER_TOUCH_TIMEOUT) and change the
onTouchStart logic in the component (handlers around hoverTimeoutRef,
setIsHovered, onMouseEnter/onMouseLeave/onTouchStart) so it does not schedule
the hide timeout when the element is already hovered (check isHovered) — only
set the touch timeout when not currently hovered, and keep clearing
hoverTimeoutRef on enter/touch as before.

In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/component.tsx`:
- Around line 83-107: The UserActionProps interface contains an unused prop
onHandleDisableCam which is never destructured or referenced inside the
UserActions component (component.tsx) because the component uses a local
toggleDisableCam function; remove onHandleDisableCam from the UserActionProps
interface and also remove the prop passed from the parent call site so there are
no dangling/unreferenced props—search for UserActionProps, onHandleDisableCam,
and toggleDisableCam to update the interface and the parent invocation
accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9cb521d5-ce59-451d-bd0c-16f4b17f00b9

📥 Commits

Reviewing files that changed from the base of the PR and between 4d7d7f9 and 393817c.

📒 Files selected for processing (4)
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/component.tsx
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/styles.ts
  • bigbluebutton-html5/public/locales/en.json
💤 Files with no reviewable changes (2)
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/styles.ts
  • bigbluebutton-html5/public/locales/en.json

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@prlanzarin

prlanzarin commented Mar 24, 2026 •

Copy link
Copy Markdown
Member

Have you considered keeping the button collapsing for everything except the user name (and maybe the presenter icon with adjusted relative size when in "squeezed" mode)?

That is what issue #24786 is suggesting (>Can we have a hover state that shows the user's name?), but this PR is removing the collapsing logic entirely.

A few reasons why partially keeping the previous approach might be good:

  • Plugins can inject any number of user actions in webcam containers. Plugin actions do not seem to be collapsed now, and that is a bug, but removing this logic removes the ability for the camera container UI to scale with plugin actions entirely.
  • You'd have more UI space for the user name, which is what the issue is asking for. See the example video in the PR description: the user name is almost useless. If the audio state icon wasn't in the right, it could be expanded horizontally.

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

🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx (1)

482-489: Consider adding onTouchEnd to cancel pending show timeout.

If a user touches and releases before the 300ms delay completes (e.g., a quick tap), the timeout will still fire and show the hover UI briefly before auto-hiding. This might be unexpected behavior since the user already lifted their finger.

💡 Optional improvement to cancel on touch end
       onTouchStart={() => {
         if (!isVideoSqueezed) return;
         if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
         hoverTimeoutRef.current = setTimeout(() => {
           setIsHovered(true);
           hoverTimeoutRef.current = setTimeout(() => setIsHovered(false), 3000);
         }, 300);
       }}
       onTouchMove={() => {
         if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
         setIsHovered(false);
       }}
+      onTouchEnd={() => {
+        if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
+      }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx`
around lines 482 - 489, The touch handler currently starts a 300ms show timeout
and then overwrites hoverTimeoutRef.current with the hide timeout, so a quick
touch-release cannot cancel the pending show; add an onTouchEnd handler that
clears the pending show timeout and prevents setIsHovered from running (or
introduce two refs, e.g., showTimeoutRef and hideTimeoutRef, and clear
showTimeoutRef on touch end), and also clear any existing hide timeout when
appropriate; update the component to use these refs when scheduling/clearing
timeouts (references: hoverTimeoutRef, setIsHovered, isVideoSqueezed).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx`:
- Around line 482-489: The touch handler currently starts a 300ms show timeout
and then overwrites hoverTimeoutRef.current with the hide timeout, so a quick
touch-release cannot cancel the pending show; add an onTouchEnd handler that
clears the pending show timeout and prevents setIsHovered from running (or
introduce two refs, e.g., showTimeoutRef and hideTimeoutRef, and clear
showTimeoutRef on touch end), and also clear any existing hide timeout when
appropriate; update the component to use these refs when scheduling/clearing
timeouts (references: hoverTimeoutRef, setIsHovered, isVideoSqueezed).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 102d2220-db85-405d-80ce-476039dd591e

📥 Commits

Reviewing files that changed from the base of the PR and between 393817c and cb68840.

📒 Files selected for processing (4)
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/styles.ts
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/component.tsx
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/styles.ts
✅ Files skipped from review due to trivial changes (2)
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/component.tsx
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/user-actions/styles.ts

Copilot AI 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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud

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.

🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx (1)

482-494: Consider adding onTouchEnd to cancel pending reveal on quick taps.

The current implementation triggers the hover UI 300ms after touchstart regardless of whether the user has already lifted their finger. In typical "touch-hold" patterns, releasing before the threshold cancels the action.

If a quick tap should not reveal the name, add onTouchEnd to cancel the pending timeout:

♻️ Suggested change
       onTouchMove={() => {
         if (!isVideoSqueezed) return;
         if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
         setIsHovered(false);
       }}
+      onTouchEnd={() => {
+        if (!isVideoSqueezed) return;
+        if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
+      }}

If the current behavior (tap-and-release still shows the name) is intentional for discoverability, feel free to disregard.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx`
around lines 482 - 494, Add an onTouchEnd (and optionally onTouchCancel) handler
to the VideoListItem component to cancel the pending reveal started in
onTouchStart: when isVideoSqueezed is true, clear hoverTimeoutRef.current (and
any nested timeout) and ensure setIsHovered(false) is called so quick taps won’t
trigger the 300ms hover reveal; reference the existing onTouchStart/onTouchMove
logic and the hoverTimeoutRef, setIsHovered, and isVideoSqueezed symbols when
implementing the cancel behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx`:
- Around line 482-494: Add an onTouchEnd (and optionally onTouchCancel) handler
to the VideoListItem component to cancel the pending reveal started in
onTouchStart: when isVideoSqueezed is true, clear hoverTimeoutRef.current (and
any nested timeout) and ensure setIsHovered(false) is called so quick taps won’t
trigger the 300ms hover reveal; reference the existing onTouchStart/onTouchMove
logic and the hoverTimeoutRef, setIsHovered, and isVideoSqueezed symbols when
implementing the cancel behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e842d6cf-899c-4e60-81d7-a6a048aa413b

📥 Commits

Reviewing files that changed from the base of the PR and between cb68840 and d5620ff.

📒 Files selected for processing (2)
  • bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx
  • bigbluebutton-html5/public/locales/en.json
✅ Files skipped from review due to trivial changes (1)
  • bigbluebutton-html5/public/locales/en.json

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

Copilot AI 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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx:149

  • isHovered is not cleared when the item stops being squeezed (e.g., resize from squeezed -> normal). If a user hovered once while squeezed, then the tile expands and later becomes squeezed again, the name overlay can appear immediately without a new hover/hold. Consider resetting isHovered (and clearing any pending timeout) when isVideoSqueezed becomes false.
  const [isVideoSqueezed, setIsVideoSqueezed] = useState(false);
  const [isVideoPluginHelperSqueezed, setIsVideoPluginHelperSqueezed] = useState(false);
  const [isSelfViewDisabled, setIsSelfViewDisabled] = useState(false);
  const [isHovered, setIsHovered] = useState(false);

  const pluginSqueezedResizeObserver = new ResizeObserver((entry) => {
    if (entry && entry[0]?.contentRect?.width < VIDEO_CONTAINER_PLUGIN_HELPERS_WIDTH_BOUND) {
      return setIsVideoPluginHelperSqueezed(true);
    }
    return setIsVideoPluginHelperSqueezed(false);
  });

  const resizeObserver = new ResizeObserver((entry) => {
    if (entry && entry[0]?.contentRect?.width < VIDEO_CONTAINER_WIDTH_BOUND) {
      return setIsVideoSqueezed(true);
    }
    return setIsVideoSqueezed(false);
  });

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"app.videoDock.webcamFullscreenLabel": "Fullscreen webcam",
"app.videoDock.webcamExitFullscreenLabel": "Exit fullscreen webcam",
"app.videoDock.webcamSqueezedButtonLabel": "Webcam options",
"app.videoDock.webcamSqueezedButtonLabel": "Squeezed webcam view",

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value for app.videoDock.webcamSqueezedButtonLabel no longer describes the options/menu button (it’s used as the label/aria-label for the squeezed webcam options trigger). All other locales translate this key as “Webcam options”, so the new English string is inconsistent and can confuse screen readers. Consider reverting to an options-focused label (e.g., “Webcam options”).

Suggested change
"app.videoDock.webcamSqueezedButtonLabel": "Squeezed webcam view",
"app.videoDock.webcamSqueezedButtonLabel": "Webcam options",

Copilot uses AI. Check for mistakes.
Comment on lines +482 to +494
onTouchStart={() => {
if (!isVideoSqueezed) return;
if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
hoverTimeoutRef.current = setTimeout(() => {
setIsHovered(true);
hoverTimeoutRef.current = setTimeout(() => setIsHovered(false), 3000);
}, 300);
}}
onTouchMove={() => {
if (!isVideoSqueezed) return;
if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
setIsHovered(false);
}}

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The long-press implementation doesn’t handle onTouchEnd/onTouchCancel. A quick tap (touchstart then touchend with no move) can still trigger the delayed timeout and show the name after the finger is lifted, and the name auto-hides after a fixed 3s even if the user is still holding. Consider canceling the pending timeout on touch end/cancel, and hiding the overlay when the touch ends (rather than using a fixed hide timer).

Copilot uses AI. Check for mistakes.

const renderSqueezedName = () => (
<Styled.BottomBar>
<Styled.SqueezedName>{name}</Styled.SqueezedName>

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The squeezed-name overlay renders name, but the rest of the webcam UI uses displayName (adds the localized “(you)” suffix for the local stream). Consider reusing the same displayName logic here so the overlay is consistent with the dropdown/menu and other name displays.

Suggested change
<Styled.SqueezedName>{name}</Styled.SqueezedName>
<Styled.SqueezedName>{displayName}</Styled.SqueezedName>

Copilot uses AI. Check for mistakes.

@ramonlsouza ramonlsouza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested on local server, desktop and mobile device - it worked well

@antobinary
antobinary merged commit ca1ab00 into bigbluebutton:v3.0.x-develop Apr 15, 2026
60 of 63 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.

Show webcam user names on hover when webcam view is to small

5 participants