Repository navigation
fix: grid-aware resize snapping in camera dock - #25410
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe webcam component adds optional grid snapping for camera dock resizing. It tracks current dock and grid dimensions, calculates constrained snapped sizes, and dispatches size updates after a settle delay. Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant WebcamContainer
participant WebcamComponent
participant CameraDockState
WebcamContainer->>WebcamComponent: pass snapToCameraGrid for custom or unified layout
WebcamComponent->>WebcamComponent: wait for resize settle delay
WebcamComponent->>CameraDockState: dispatch SET_CAMERA_DOCK_SIZE
WebcamComponent->>WebcamComponent: stop camera dock resize
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bigbluebutton-html5/imports/ui/components/webcam/component.tsx`:
- Around line 333-339: Update the camera dock resize flow around
snapCameraDockToGrid and stopCameraDockResize to store the delayed snap timer in
a ref, clear any pending timer when a new resize starts, and clear it during
unmount cleanup. Ensure only the current resize can snap dimensions and dispatch
isResizing: false.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 25eb2c02-3dcf-4ea6-b40b-e1a87ae2ed78
📒 Files selected for processing (1)
bigbluebutton-html5/imports/ui/components/webcam/component.tsx
There was a problem hiding this comment.
Pull request overview
Adds grid-aware “snap on release” behavior to the webcam/camera dock so that, after a continuous resize interaction, the dock compacts to the computed optimal camera grid size (for custom and unified layouts).
Changes:
- Introduces grid-snapping helpers and a post-resize “settle then snap” flow in the webcam dock component.
- Tracks latest cameraDock and computed optimal grid size via refs to support delayed snapping after resize stop.
- Enables snapping only for custom and unified layouts via a new
snapToCameraGridprop.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
camera dock redimension is not respected. Screencast.from.16-07-2026.10.40.43.webm |
fixed on 7065b5a |
|
✅ Automated tests have passed! |



What does this PR do?
Automatically adjust presentation size to best use of available space when resizing (custom and unified layouts).
Resizing remains continuous, allowing transitions such as 1x4 to 2x2. On release, unused dock height or width snaps to the camera grid actual size.
before
before.mp4
after.mp4