Repository navigation
Layout System Revamp - #24204
Layout System Revamp#24204ramonlsouza wants to merge 29 commits into
Conversation
WalkthroughThis PR removes legacy layout types (SMART_LAYOUT, PRESENTATION_FOCUS, VIDEO_FOCUS), deletes the layout-management modal (component, container, styles) and related UI/strings, removes push-layout controls and feature-flag checks, simplifies layout propagation to always sync with presenter layout, introduces video-grid overflow handling (overflowCount + OverflowTile), updates hooks/components to the new signatures, and drops server-side eject-on-layout-feature checks in BroadcastLayoutMsgHdlr in favor of permission-only ejection. Tests, docs, settings, and locales were updated accordingly. Sequence Diagram(s)sequenceDiagram
autonumber
participant Moderator
participant Frontend
participant LayoutHooks
participant Server
participant Participants
rect rgba(50,115,220,0.06)
Moderator->>Frontend: choose/apply layout (reduced set)
end
rect rgba(78,154,6,0.06)
Frontend->>LayoutHooks: setMeetingLayout(selectedLayout)
LayoutHooks-->>Server: broadcastLayout(syncWithPresenterLayout = true)
end
rect rgba(255,165,0,0.06)
Server->>Participants: layoutUpdate event
Participants->>Participants: apply layout, recalc grid
Participants->>Participants: compute overflowCount → render OverflowTile if overflowCount > 0
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas needing extra attention:
Possibly related issues
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ 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 |
|
This pull request has conflicts ☹ |
test: Update failed tests on ci related to layout changes
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (6)
bigbluebutton-tests/playwright/user/multiusers.ts (1)
287-354: Focus/unfocus flow is correct; tighten locator robustness and fix assertion typoThe updated
focusUnfocusWebcamflow correctly validates:
- focus button gating (<3 vs ≥3 webcams),
- moderator-focused User2 propagation to User1/User2,
- viewer-side refocus on Moderator, and
- state after unfocus (User1 back to own webcam as first tile).
Two small points:
Order‑dependent locator for moderator webcam on User1 (lines 325-327)
Using.last()one.webcamOptionsMenuSqueezedmakes this test sensitive to DOM ordering changes. If feasible, prefer a locator tied to the moderator’s tile (e.g., via a container with moderator username or a more specificdata-teston that button) instead of relying on “last element wins”.Typo in assertion message (line 333)
Message currently says “Modeartor”. Consider correcting for readability:- 'should display the username of Modeartor on the focused webcam for User1', + 'should display the username of Moderator on the focused webcam for User1',docs/docs/administration/customize.md (1)
1473-1607: Keep layout-related docs consistent (default vs userdata parameter)You updated
defaultMeetingLayoutto list the new allowed values (CUSTOM_LAYOUT,CAMERAS_ONLY,PARTICIPANTS_CHAT_ONLY,PRESENTATION_ONLY,PLUGINS_ONLY,MEDIA_ONLY), which matches the code and properties.However, the
userdata-bbb_default_layoutrow a bit below still documents the old options (CUSTOM_LAYOUT,SMART_LAYOUT,PRESENTATION_FOCUS,VIDEO_FOCUS). Given those layout types have been removed, that row is now misleading.Consider:
- Updating
userdata-bbb_default_layoutto the same set of valid layouts (or the subset it still actually honours), or- Explicitly marking the old values as deprecated/ignored in 3.0.
bigbluebutton-html5/imports/ui/components/layout/context.jsx (1)
1425-1447: Pinned-notes logic now closes any open sidebar panel when presentation is disabled—likely an unintended side effectThe git history (commit 2ad59f9 "remove presentationFocus, smart and videoFocus layouts") confirms this: when the VIDEO_FOCUS layout branch was removed, the fallback behavior was simplified to unconditionally close the sidebar. However, the
|| !isPresentationEnabledclauses in both conditions mean that when presentation is disabled, the entire sidebar closes regardless of which panel is open (not just SHARED_NOTES).Issue: With the current condition, toggling pinned notes while presentation is disabled will close chat, user list, etc.—not only the shared notes panel.
Recommended fix: Either remove
|| !isPresentationEnabledfrom the second clause to only close whensidebarContent.sidebarContentPanel === PANELS.SHARED_NOTES, or add an additional guard to preserve the SHARED_NOTES-only intent even when presentation is disabled.bigbluebutton-html5/imports/ui/components/video-provider/livekit-camera-bridge/component.tsx (1)
576-592: RemoveoverflowCountfrom the useEffect dependency array at line 591.The effect logic does not use
overflowCount. TheupdateStreamsfunction (lines 496-513) only operates onstreamsListandconnectedStreamIds. SinceoverflowCountchanges independently ofstreams(based ongridSize,userCount, andisGridEnabledfromuseGridUsers), including it as a dependency causes unnecessary effect re-runs whenoverflowCountchanges, even though stream connection logic is unaffected.bigbluebutton-html5/imports/ui/components/layout/push-layout/hooks.ts (1)
6-18: FixselectedLayouttype and remove unusedusePushLayoutUpdaterhookTwo issues confirmed:
- Type mismatch at line 24:
selectedLayoutis declared asbooleanbut should bestring. The codebase consistently treats it as a string (defined inTypes/meetingClientSettings.ts:188asstring, compared againstLAYOUT_TYPEenum values, initialized with values like'custom').- applicationSettings: { selectedLayout: boolean }, + applicationSettings: { selectedLayout: string },
- Dead code at lines 6–18:
usePushLayoutUpdateris exported but never imported or called anywhere. Remove it to reduce the public API surface.bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (1)
295-345: Fix overflowCount calculation—current formula double-counts when webcams occupy grid slotsThe review comment is correct. The
overflowCountcalculation has a logic error:GRID_USERS_SUBSCRIPTION filters for
cameras_aggregate.count: 0(users with no webcams), so the grid layout is:
- Webcam tiles (visibleStreamCount)
- Non-webcam user tiles (from GRID_USERS_SUBSCRIPTION, limited to
gridSize - visibleStreamCount)However, USER_AGGREGATE_COUNT_SUBSCRIPTION counts all users (including those with webcams). The current formula compares this global count against the per-grid limit:
const limit = Math.max(gridSize - visibleStreamCount, 0); // e.g., 10 - 4 = 6 const overflow = Math.max(userCount - limit, 0); // e.g., 15 - 6 = 9 ❌This yields an incorrect count because
limitrepresents remaining grid slots, not total tile capacity.Example: gridSize=10, visibleStreamCount=4, userCount=15:
- Actual tiles shown: 4 webcams + 6 grid users = 10
- Actual hidden users: 15 − 10 = 5
- Current formula gives overflow=9, overflowCount=10 (overstates by 4)
- Should be: overflow=5, overflowCount=6 (represents 5 hidden + 1 replaced grid user)
The suggested fix is correct:
- const limit = Math.max(gridSize - visibleStreamCount, 0); - const overflow = Math.max(userCount - limit, 0); + const overflow = Math.max(userCount - gridSize, 0);This properly compares total users against total tile capacity, yielding the intended "users hidden + replaced user" count regardless of webcam count.
🧹 Nitpick comments (12)
bigbluebutton-html5/imports/ui/components/presentation/component.jsx (2)
732-737: SimplifiedisLargePresentationmatches the new layout modelBasing
isLargePresentationsolely onsvgWidthandisMobilekeeps the toolbar/container width logic consistent with the remaining single layout mode and avoids legacy layoutType/numCameras branches. This looks coherent with the PR’s goal of removing VIDEO_FOCUS-specific behavior.If you want to reduce duplication, consider deriving
containerWidthdirectly from the same conditional expression used fortoolbarWidthinrenderPresentationToolbarso there’s a single source of truth for “large enough” presentations.
771-773: Standardized z-index is fine;background: nullcan be droppedUsing
presentationZIndexforzIndexis consistent with how fullscreen state is already derived. Sincebackgroundis alwaysnull, the inline background style is effectively unused; you can omit this property and rely entirely onStyled.PresentationContainer/ theming to define background.- zIndex: presentationZIndex, - background: null, + zIndex: presentationZIndex,bigbluebutton-html5/imports/ui/components/presentation/container.jsx (1)
262-263: Clarify shouldRestoreOnUpdate semantics and guard the “no presentation yet” caseThe ternary:
const shouldRestoreOnUpdate = userIsPresenter && currentPresentationId === prevPresentationId ? false : restoreOnUpdate;relies on operator precedence and on treating
undefined === undefinedas “same presentation”. For presenters, that means:
- When there is no presentation yet (
currentPresentationIdandprevPresentationIdbothundefined),shouldRestoreOnUpdatebecomesfalse.- Once a presentation is loaded and the ID stabilizes, subsequent renders with the same ID also force
false.- In all other cases (viewers or ID change), the raw
restoreOnUpdatesetting is used.If the intent is only to disable restore-on-update for presenters when the same non-empty presentation stays active (and not in the “no presentation yet” state), it may be clearer and safer to make this explicit and avoid the
undefined === undefinedpath being treated as “same presentation”, e.g.:const isSamePresentation = currentPresentationId != null && prevPresentationId != null && currentPresentationId === prevPresentationId; const shouldRestoreOnUpdate = userIsPresenter && isSamePresentation ? false : restoreOnUpdate;This also improves readability by separating the condition from the ternary and making the precedence unambiguous.
Please confirm that the current behavior (including the
undefinedcase) matches the product expectation; otherwise, consider the refactor above.bigbluebutton-html5/imports/ui/components/layout/layout-manager/customLayout.jsx (1)
245-256: Sidebar content height now ignores navbar/actionbar on desktop – double‑check layout impactThe new
calculatesSidebarContentHeightuses onlywindowHeight()andbannerAreaHeight()(andnavBarHeighton mobile), whereas other layouts (e.g.,participantsAndChatOnlyLayout.jsx) subtract navbar + actionbar from the available height. This means, on desktop, sidebar content getswindowHeight() - bannerAreaHeight()as height and may visually overlap or extend behind the navbar/actionbar depending on how bounds are used.Please verify in the main “custom” layout that:
- Sidebar content does not render under the navbar/actionbar.
- Resizing/chat scroll behavior still matches expectations from #22388 (no weird gaps or clipped content).
If the intent was to match the other layouts, you may want to subtract
calculatesNavbarHeight()andcalculatesActionbarHeight().heighthere as well.Also applies to: 518-518
bigbluebutton-html5/imports/ui/components/webcam/component.tsx (1)
309-359: Grid enablement tied directly to presentation open state
isGridEnabledis now!presentationIsOpen, andswapLayoutis derived the same way. This aligns with the PR goal of “switched grid mode control to presentation state” and removes the dependency on layout types/settings.Behavioural implications to be aware of:
- With presentation open, an empty webcam grid will no longer render (camera dock appears only once there is at least one stream).
- Grid mode implicitly tracks “presentation hidden/closed”.
If that matches the intended UX, the change looks good. Otherwise, consider basing
isGridEnabledon a more explicit “grid mode” flag rather than presentation state alone.bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx (1)
353-434: Overflow tile logic works but assumes presence of at least one GRID streamThe overflow handling is nicely contained:
shouldShowOverflowTile = isGridEnabled && overflowCount > 0;- When
shouldShowOverflowTileis true and there’s at least oneVIDEO_TYPES.GRIDstream, you drop the last grid stream and append anOverflowTile, keepingvideoItems.length === streams.lengthsooptimalGridstill fits.One subtle edge case: if
overflowCount > 0ever occurs without anyVIDEO_TYPES.GRIDstream instreams,lastGridUserIndexremainsundefined,streamsToRenderstays asstreams, and you append anOverflowTile, rendering one more item thanoptimalGridwas sized for.To make the invariant explicit and future-proof, consider tightening the condition, e.g.:
const hasGridStream = streams.some((s) => s.type === VIDEO_TYPES.GRID); const shouldShowOverflowTile = isGridEnabled && overflowCount > 0 && hasGridStream;This keeps behaviour unchanged under current assumptions and prevents layout mismatch if upstream logic changes.
bigbluebutton-html5/imports/ui/components/nav-bar/options-dropdown/component.jsx (1)
231-283: Add propTypes/defaultProps for new AFK toggle props
renderMenuItemsnow relies onawayandhandleToggleAFK, but these props are not declared inpropTypesordefaultProps. That makes it easier to accidentally omit them at the container level without getting a warning.Consider updating the definitions:
const propTypes = { ... isDirectLeaveButtonEnabled: PropTypes.bool.isRequired, + away: PropTypes.bool.isRequired, + handleToggleAFK: PropTypes.func.isRequired, optionsDropdownItems: PropTypes.arrayOf(PropTypes.shape({ @@ const defaultProps = { ... isBreakoutRoom: false, isDropdownOpen: false, audioCaptionsEnabled: false, + away: false, };This keeps the public surface of
OptionsDropdownself-documenting and easier to maintain.bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts (1)
58-62: Consider extracting magic numbers for avatar spacing.The avatar positioning at line 60 uses a hardcoded
28pxoffset, which creates a 22px overlap with the 50px avatar size (line 65). If the avatar size changes in the future, this spacing will need manual adjustment.Consider extracting these as constants at the top of the file:
+const AVATAR_SIZE = 50; +const AVATAR_SPACING = 28; +const AVATAR_OVERLAP = AVATAR_SIZE - AVATAR_SPACING; // 22px + const AvatarWrapper = styled.div<{ $index: number }>` position: absolute; - left: ${({ $index }) => $index * 28}px; + left: ${({ $index }) => $index * AVATAR_SPACING}px; z-index: ${({ $index }) => 3 - $index}; `; const Avatar = styled.div<{ $color: string }>` - width: 50px; - height: 50px; + width: ${AVATAR_SIZE}px; + height: ${AVATAR_SIZE}px; border-radius: 50%;bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx (1)
18-37: Improve OverflowTile accessibility and avoid inline click lambdaThe overflow tile logic is sound, but it’s currently mouse-only and recreates an inline arrow function on each render. Consider:
- Making the tile keyboard-activatable (role + tabIndex + key handler).
- Passing the click handler directly instead of wrapping it in a lambda.
For example:
- const handleOpenUserList = () => { + const handleOpenUserList = () => { layoutContextDispatch({ type: ACTIONS.SET_SIDEBAR_NAVIGATION_IS_OPEN, value: true, }); layoutContextDispatch({ type: ACTIONS.SET_SIDEBAR_NAVIGATION_PANEL, value: PANELS.USERLIST, }); }; @@ - return ( - <Styled.OverflowTileContainer data-test="overflowTile" onClick={() => handleOpenUserList()}> + return ( + <Styled.OverflowTileContainer + data-test="overflowTile" + role="button" + tabIndex={0} + onClick={handleOpenUserList} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') handleOpenUserList(); + }} + >This keeps behavior unchanged while improving accessibility and avoiding an unnecessary closure.
Also applies to: 39-53
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/styles.ts (1)
11-12: FixcustomHighlightprop typing to match RGB tuple usageIn
WebcamConnectingyou’ve added talking/background styles that treatcustomHighlightas an RGB array:${({ talking, customHighlight }) => talking && customHighlight && customHighlight.length > 0 && ` background-color: rgba(${customHighlight[0]}, ${customHighlight[1]}, ${customHighlight[2]}, 0.15); `}but the styled props are currently declared as:
const WebcamConnecting = styled.div<{ animations: boolean; talking: boolean; customHighlight: boolean; }>;Given the indexing and
.lengthchecks,customHighlightshould be typed as an array/tuple, not boolean. Even with@ts-nocheck, this declaration is misleading and makes it easier to misuse the component.Consider updating it (and mirroring whatever type is used on the corresponding
Contentprops):-const WebcamConnecting = styled.div<{ - animations: boolean; - talking: boolean; - customHighlight: boolean; -}>` +const WebcamConnecting = styled.div<{ + animations: boolean; + talking: boolean; + customHighlight?: [number, number, number]; +}>`This better documents the expected shape and aligns with how the value is used at runtime.
Also applies to: 101-105, 116-122
bigbluebutton-tests/playwright/parameters/createParameters.ts (1)
176-195: Prefer condition-based wait instead of fixed 5000ms timeoutThe added
waitForTimeout(5000)stabilizes the test but adds 5s to every run and can still be flaky if the UI takes longer. Consider replacing it with (or augmenting it by) a more specific condition (e.g., waiting for the layout/DOM state you need before toggling the user list) or reusing an existing wait constant to avoid a hard-coded magic number.bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx (1)
116-117: Session flags for grid mode and presentation state look coherent but could be centralizedStoring
isGridEnabledas!presentationIsOpenboth in the initial layout effect and in the layout-change effect, and persistingpresentationLastStatefrommeetingPresentationIsOpen, keeps these derived flags consistent with the new “grid tied to presentation visibility” rule. Behavior-wise this is sound, but you now have two places writingisGridEnabled; if this grows more complex later, consider centralizing the derivation in a small helper to avoid drift between effects.Please double-check that all consumers of
Session.getItem('isGridEnabled')expect it to be purely derived frompresentationIsOpen(and not independently toggled), since this change tightens that coupling.Also applies to: 218-226, 318-321
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (19)
bigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/moderator-custom-layout-2-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/moderator-custom-layout-3-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/moderator-custom-layout-4-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/moderator-pagination-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/moderator-pagination-second-page-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/user-custom-layout-2-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/user-custom-layout-3-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/user-custom-layout-4-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/user-grid-layout-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/user-pagination-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/layouts/layouts.spec.ts-snapshots/user-pagination-second-page-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/moderator-custom-layout-4-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/moderator-enforce-custom-layout-2-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/moderator-enforce-custom-layout-3-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/moderator-enforce-custom-layout-4-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/user-enforce-custom-layout-1-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/user-enforce-custom-layout-2-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/user-enforce-custom-layout-3-Chromium-linux.pngis excluded by!**/*.pngbigbluebutton-tests/playwright/parameters/parameters.spec.ts-snapshots/user-enforce-custom-layout-4-Chromium-linux.pngis excluded by!**/*.png
📒 Files selected for processing (54)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala(1 hunks)bigbluebutton-html5/imports/ui/Types/meetingClientSettings.ts(0 hunks)bigbluebutton-html5/imports/ui/components/actions-bar/actions-dropdown/component.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx(1 hunks)bigbluebutton-html5/imports/ui/components/actions-bar/presentation-options/component.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/layout/context.jsx(1 hunks)bigbluebutton-html5/imports/ui/components/layout/enums.js(0 hunks)bigbluebutton-html5/imports/ui/components/layout/layout-manager/customLayout.jsx(6 hunks)bigbluebutton-html5/imports/ui/components/layout/layout-manager/layoutEngine.jsx(1 hunks)bigbluebutton-html5/imports/ui/components/layout/layout-manager/presentationFocusLayout.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/layout/layout-manager/smartLayout.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/layout/layout-manager/videoFocusLayout.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/layout/modal/component.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/layout/modal/container.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/layout/modal/styles.js(0 hunks)bigbluebutton-html5/imports/ui/components/layout/push-layout/hooks.ts(2 hunks)bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx(5 hunks)bigbluebutton-html5/imports/ui/components/layout/utils.js(0 hunks)bigbluebutton-html5/imports/ui/components/nav-bar/options-dropdown/component.jsx(2 hunks)bigbluebutton-html5/imports/ui/components/nav-bar/options-dropdown/container.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/presentation/component.jsx(3 hunks)bigbluebutton-html5/imports/ui/components/presentation/container.jsx(4 hunks)bigbluebutton-html5/imports/ui/components/settings/service.js(0 hunks)bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx(0 hunks)bigbluebutton-html5/imports/ui/components/video-provider/component.tsx(3 hunks)bigbluebutton-html5/imports/ui/components/video-provider/container.tsx(2 hunks)bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts(4 hunks)bigbluebutton-html5/imports/ui/components/video-provider/livekit-camera-bridge/component.tsx(4 hunks)bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx(4 hunks)bigbluebutton-html5/imports/ui/components/video-provider/video-list/container.tsx(3 hunks)bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx(1 hunks)bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts(1 hunks)bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.tsx(2 hunks)bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/styles.ts(3 hunks)bigbluebutton-html5/imports/ui/components/webcam/component.tsx(2 hunks)bigbluebutton-html5/imports/ui/core/initial-values/meetingClientSettings.ts(0 hunks)bigbluebutton-html5/imports/ui/services/features/index.js(0 hunks)bigbluebutton-html5/imports/ui/stylesheets/styled-components/palette.js(2 hunks)bigbluebutton-html5/private/config/settings.yml(1 hunks)bigbluebutton-html5/public/locales/en.json(1 hunks)bigbluebutton-tests/playwright/core/elements.ts(1 hunks)bigbluebutton-tests/playwright/layouts/layouts.spec.ts(0 hunks)bigbluebutton-tests/playwright/layouts/layouts.ts(3 hunks)bigbluebutton-tests/playwright/layouts/util.ts(0 hunks)bigbluebutton-tests/playwright/parameters/createParameters.ts(3 hunks)bigbluebutton-tests/playwright/parameters/customparameters.ts(3 hunks)bigbluebutton-tests/playwright/parameters/parameters.spec.ts(0 hunks)bigbluebutton-tests/playwright/sharednotes/sharednotes.ts(1 hunks)bigbluebutton-tests/playwright/user/multiusers.ts(2 hunks)bigbluebutton-tests/playwright/webcam/webcam.ts(0 hunks)bigbluebutton-web/grails-app/conf/bigbluebutton.properties(1 hunks)docs/docs/administration/customize.md(1 hunks)docs/docs/data/join.tsx(1 hunks)
💤 Files with no reviewable changes (21)
- bigbluebutton-html5/imports/ui/components/actions-bar/presentation-options/component.jsx
- bigbluebutton-html5/imports/ui/components/settings/service.js
- bigbluebutton-tests/playwright/layouts/util.ts
- bigbluebutton-html5/imports/ui/components/layout/enums.js
- bigbluebutton-html5/imports/ui/components/actions-bar/actions-dropdown/component.jsx
- bigbluebutton-html5/imports/ui/core/initial-values/meetingClientSettings.ts
- bigbluebutton-tests/playwright/webcam/webcam.ts
- bigbluebutton-html5/imports/ui/components/layout/layout-manager/videoFocusLayout.jsx
- bigbluebutton-tests/playwright/parameters/parameters.spec.ts
- bigbluebutton-html5/imports/ui/Types/meetingClientSettings.ts
- bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx
- bigbluebutton-html5/imports/ui/components/layout/modal/component.jsx
- bigbluebutton-html5/imports/ui/components/layout/layout-manager/smartLayout.jsx
- bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx
- bigbluebutton-html5/imports/ui/services/features/index.js
- bigbluebutton-html5/imports/ui/components/nav-bar/options-dropdown/container.jsx
- bigbluebutton-tests/playwright/layouts/layouts.spec.ts
- bigbluebutton-html5/imports/ui/components/layout/modal/container.jsx
- bigbluebutton-html5/imports/ui/components/layout/modal/styles.js
- bigbluebutton-html5/imports/ui/components/layout/layout-manager/presentationFocusLayout.jsx
- bigbluebutton-html5/imports/ui/components/layout/utils.js
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-10-10T12:15:03.265Z
Learnt from: jaapjansma
Repo: bigbluebutton/bigbluebutton PR: 21204
File: bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala:21-21
Timestamp: 2024-10-10T12:15:03.265Z
Learning: When reviewing code changes in BigBlueButton, particularly in case classes like `RegisterUser` in `MeetingsManagerActor.scala`, ensure to accurately distinguish between added parameters and replaced parameters to avoid incorrect assessments.
Applied to files:
bigbluebutton-web/grails-app/conf/bigbluebutton.propertiesbigbluebutton-tests/playwright/user/multiusers.tsakka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scalabigbluebutton-tests/playwright/parameters/createParameters.ts
📚 Learning: 2025-02-05T20:23:17.109Z
Learnt from: kepstin
Repo: bigbluebutton/bigbluebutton PR: 22200
File: docs/src/components/APITableComponent/index.tsx:79-80
Timestamp: 2025-02-05T20:23:17.109Z
Learning: In the BigBlueButton documentation site components, React key properties are not required for mapped elements as the pages are statically generated and don't require runtime reconciliation.
Applied to files:
bigbluebutton-html5/imports/ui/components/nav-bar/options-dropdown/component.jsx
📚 Learning: 2025-10-15T17:52:37.432Z
Learnt from: guiiBecker
Repo: bigbluebutton/bigbluebutton PR: 24084
File: bigbluebutton-html5/public/locales/pt.json:323-323
Timestamp: 2025-10-15T17:52:37.432Z
Learning: Translation issues in locale files (bigbluebutton-html5/public/locales/*.json) should be updated in Transifex, the translation management platform used by the BigBlueButton project, rather than being fixed directly in pull requests.
Applied to files:
bigbluebutton-html5/public/locales/en.json
📚 Learning: 2025-10-15T17:57:46.195Z
Learnt from: guiiBecker
Repo: bigbluebutton/bigbluebutton PR: 24084
File: bigbluebutton-html5/public/locales/ja.json:723-727
Timestamp: 2025-10-15T17:57:46.195Z
Learning: In the bigbluebutton repository, locale files (e.g., public/locales/*.json) are managed through Transifex and should not be edited directly in pull requests. Translation corrections and updates should be made in Transifex, which then syncs to the repository.
Applied to files:
bigbluebutton-html5/public/locales/en.json
🧬 Code graph analysis (12)
bigbluebutton-html5/imports/ui/components/webcam/component.tsx (1)
bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx (1)
presentationIsOpen(378-378)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx (1)
bigbluebutton-html5/imports/ui/components/layout/context.jsx (1)
layoutDispatch(1581-1581)
bigbluebutton-html5/imports/ui/components/layout/context.jsx (1)
bigbluebutton-html5/imports/ui/components/layout/enums.js (4)
ACTIONS(52-136)ACTIONS(52-136)PANELS(146-157)PANELS(146-157)
bigbluebutton-html5/imports/ui/components/layout/push-layout/hooks.ts (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala (1)
setPushLayout(14-16)bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx (6)
applicationSettings(335-335)applicationSettings(336-338)cameraDockOutput(329-329)cameraDockInput(330-330)presentationInput(331-331)setMeetingLayout(397-402)
bigbluebutton-html5/imports/ui/components/presentation/container.jsx (1)
bigbluebutton-html5/imports/ui/components/whiteboard/container.jsx (1)
currentPresentationPage(137-137)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/styles.ts (1)
bigbluebutton-html5/imports/ui/stylesheets/styled-components/palette.js (1)
webcamTalkingBackgroundColor(127-127)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts (1)
bigbluebutton-html5/imports/ui/stylesheets/styled-components/palette.js (3)
webcamBackgroundColor(123-123)webcamPlaceholderBorder(124-124)colorWhite(1-1)
bigbluebutton-tests/playwright/layouts/layouts.ts (1)
bigbluebutton-tests/playwright/layouts/util.ts (1)
checkScreenshots(23-50)
bigbluebutton-html5/imports/ui/components/presentation/component.jsx (2)
bigbluebutton-html5/imports/ui/components/layout/layout-manager/layoutEngine.jsx (1)
isMobile(44-44)bigbluebutton-html5/imports/ui/components/layout/utils.js (1)
isMobile(16-16)
bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx (3)
bigbluebutton-html5/imports/ui/components/presentation/container.jsx (1)
presentationIsOpen(39-39)bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx (1)
setMeetingLayout(96-101)bigbluebutton-html5/imports/ui/components/layout/layout-manager/layoutEngine.jsx (1)
selectedLayout(40-40)
bigbluebutton-html5/imports/ui/components/layout/layout-manager/customLayout.jsx (6)
bigbluebutton-html5/imports/ui/components/layout/layout-manager/presentationOnlyLayout.jsx (2)
calculatesSidebarContentHeight(74-78)presentationInput(35-35)bigbluebutton-html5/imports/ui/components/layout/layout-manager/participantsAndChatOnlyLayout.jsx (3)
calculatesSidebarContentHeight(56-68)cameraDockInput(39-39)presentationInput(35-35)bigbluebutton-html5/imports/ui/components/layout/layout-manager/camerasOnly.jsx (1)
calculatesSidebarContentHeight(84-88)bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx (2)
cameraDockInput(330-330)presentationInput(331-331)bigbluebutton-html5/imports/ui/components/layout/layout-manager/layoutEngine.jsx (2)
cameraDockInput(20-20)presentationInput(21-21)bigbluebutton-html5/imports/ui/components/layout/layout-manager/mediaOnlyLayout.jsx (2)
cameraDockInput(35-35)presentationInput(34-34)
bigbluebutton-html5/imports/ui/components/layout/layout-manager/layoutEngine.jsx (2)
bigbluebutton-html5/imports/ui/components/layout/context.jsx (2)
isPresentationEnabled(1528-1528)isSharedNotesPinned(1525-1525)bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx (1)
cameraDockInput(330-330)
🔇 Additional comments (22)
bigbluebutton-tests/playwright/sharednotes/sharednotes.ts (1)
299-302: LGTM! Test correctly validates the new layout synchronization behavior.The updated assertion properly verifies that the attendee's layout now automatically syncs with the presenter's state when notes are unpinned, rather than maintaining an independent minimized presentation state. The message clearly documents this expected behavior.
bigbluebutton-html5/imports/ui/components/presentation/component.jsx (1)
14-14: Import narrowed to onlyACTIONSlooks correctThis aligns with the current usage in this component (only
ACTIONS.*is referenced) and reflects the removal of layout-type-specific logic.bigbluebutton-tests/playwright/core/elements.ts (1)
520-530: NewwebcamOptionsMenuSqueezedselector looks consistent and test-friendlyThe added selector name and
data-testpattern align with existing webcam-related entries and provide a clear hook for tests exercising the squeezed options menu behavior. No issues from my side.bigbluebutton-html5/imports/ui/components/presentation/container.jsx (3)
32-32: usePreviousValue import matches new usageImporting
usePreviousValuehere is consistent with its usage later for trackingcurrentPresentationIdacross renders; no issues from a module/layout standpoint.
52-54: Current/previous presentationId tracking is straightforwardDeriving
currentPresentationIdfromcurrentPresentationPageand feeding it intousePreviousValueis clear and safe (optional chaining avoids crashes when there is no active page). This is a reasonable way to detect presentation changes in the container.
285-289: Updated props to Presentation are consistent with new container statePassing
currentPresentationIdexplicitly and mappingrestoreOnUpdateto the derivedshouldRestoreOnUpdatekeeps the Presentation component’s API stable while encapsulating the presenter-specific logic in the container. This looks coherent with the new previous-ID tracking and should make downstream behavior easier to reason about, assuming the Presentation component has been updated to interpretrestoreOnUpdatein this way.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala (1)
18-18: Permission check is correct. The original concern was not substantiated.The
permissionFailedfunction usesisAllowed, which checks that bothpermissionToLevel(user) >= permissionLevelandroleToLevel(users, user) >= roleLevelare true. For the check on line 18,permissionFailed(GUEST_LEVEL=0, PRESENTER_LEVEL=100, ...)requiresroleToLevel(user) >= 100. SinceroleToLevelreturns 100 for presenters/moderators and 0 for guests/viewers, only presenters can broadcast layouts. Guests attempting this operation will be ejected. This pattern is consistent across 30+ similar presenter-only operations in the codebase.bigbluebutton-html5/imports/ui/components/layout/layout-manager/customLayout.jsx (3)
294-308: Webcam size persistence per orientation looks consistentThe updated persistence logic for
webcamSizenow:
- Stores only
heightwhen docked top/bottom, keepingwidthunchanged.- Stores only
widthwhen docked left/right, keepingheightunchanged.This matches how
lastHeightandlastWidthare actually used later in the top/bottom vs left/right branches and avoids overwriting the unused dimension. The read‑back right afterStorage.setItemalso keepslastWidth/lastHeightin sync for subsequent calculations.I don’t see functional issues here; the change improves clarity of which dimension is persisted for which orientation.
637-669: Broader camera dock display condition – consider edge cases with non‑presentation media
SET_CAMERA_DOCK_OUTPUTnow uses:display: cameraDockInput.numCameras > 0 || !presentationInput.isOpen,This ensures the camera dock area is visible whenever there are cameras, or whenever the presentation is not open (even with
numCameras === 0). That seems aligned with having a “default” cameras area when there’s no presentation, but it also means:
- If only screenshare or external video is open (no presentation, no webcams), the camera dock will still be “displayed” (with 0 tiles), potentially reserving space or rendering an empty region depending on the view layer.
Also,
resizableEdge.topis now bound solely toinput.cameraDock.position === CONTENT_BOTTOM, which looks correct given the removal of other bottom positions, but narrows when the top handle appears.Recommend explicitly testing:
- No webcams + no presentation (empty meeting).
- No webcams + screenshare only.
- No webcams + external video only.
to ensure the dock’s visibility and resize handles behave as desired in all these cases.
742-745: Export remains straightforward
export default CustomLayout;is unchanged in behavior and remains appropriate for this module.bigbluebutton-html5/private/config/settings.yml (1)
535-548: Confirm new default pagination and grid sizes against UX/scale expectationsViewer page size (desktop) now defaults to 4 and grid sizes to 25 (desktop) / 8 (mobile) for both roles. That’s consistent with the new grid/overflow approach but is a behaviour change for existing deployments.
Please double-check:
- That Playwright/layout tests and any capacity guidance docs are updated for these new limits.
- That these defaults match the intended UX for typical class sizes.
bigbluebutton-web/grails-app/conf/bigbluebutton.properties (1)
223-225: defaultMeetingLayout docs align with new layout setThe updated comment correctly reflects the narrowed standard layout (
CUSTOM_LAYOUT) plus the non-UI layouts (CAMERAS_ONLY,PARTICIPANTS_CHAT_ONLY,PRESENTATION_ONLY,PLUGINS_ONLY,MEDIA_ONLY). This matches the broader layout refactor and the administration docs.bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx (1)
71-88: Prop surface update for overflowCountExtending
VideoListPropswithoverflowCount: numberis straightforward. Just ensure all call sites (video-list/container, livekit bridge, main provider container) are passing this prop; otherwise TypeScript will complain in those files.bigbluebutton-tests/playwright/layouts/layouts.ts (1)
26-30: Verify duplicate drop area usage is intentional.Both line 26 and line 29 drag and drop webcams to
e.dropAreaRight. If this is testing a toggle or reset behavior, consider adding a comment explaining the intent. If this is a copy-paste error, update line 29 to use a different drop area.bigbluebutton-html5/imports/ui/components/layout/layout-manager/layoutEngine.jsx (1)
79-89: No issues found. The early-return condition is correct and intentional.The logic properly handles all scenarios:
- When no cameras exist AND presentation is open with slides: returns zero bounds (line 84) to collapse the camera dock while the presentation is displayed.
- When the presentation is minimized (isOpen = false) despite having slides: falls through to line 91, where
!isOpenevaluates true, returning full media area bounds for the camera dock.- When there's no presentation content at all: line 91's
isGeneralMediaOffcondition handles it, also returning full bounds.The state-based condition (
hasPresentation && isOpen) is more direct and correct than the original layout-based approach (selectedLayout !== VIDEO_FOCUS). It ensures zero bounds only when the presentation is actively displayed, allowing the camera dock full space in all other situations.bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx (1)
31-31: Layout updater wiring looks consistent with new push-layout semantics
useMeetingLayoutUpdateris correctly imported and invoked with the camera dock, presentation input, andapplicationSettings, and the resultingsetMeetingLayoutis cleanly threaded intoActionsBar. This matches the refactor goal of centralizing layout sync and removing explicit push-layout toggles without introducing new logic branches here.Also applies to: 96-101
bigbluebutton-html5/imports/ui/components/video-provider/component.tsx (1)
93-101: Overflow count plumbing through VideoProvider is straightforwardAdding
overflowCounttoVideoProviderProps, destructuring it inrender, and forwarding it toVideoListContainerkeeps overflow logic encapsulated in hooks and list components without affecting the WebRTC logic here. This is a clean, low‑risk extension of the public API.Also applies to: 1368-1389
bigbluebutton-tests/playwright/parameters/customparameters.ts (1)
655-682: All selectors confirmed; code changes are validVerification confirms that
e.dropAreaRightande.dropAreaLeftare properly defined inbigbluebutton-tests/playwright/core/elements.tsas'div[data-test="dropArea-contentLeft"]'and'div[data-test="dropArea-contentRight"]', and are actively used throughout the test suite. TheenforceCustomLayout()function correctly uses these selectors at lines 748 and 757, andenforceCamerasOnly()is properly implemented with appropriate waits and screenshot assertions. No functional concerns.bigbluebutton-tests/playwright/parameters/createParameters.ts (2)
7-9: New VIDEO_LOADING_WAIT_TIME import is correctly wiredThe new VIDEO_LOADING_WAIT_TIME import is used consistently in the cameras-only flow and keeps timing configuration centralized rather than inlined literals. Looks good.
197-225: camerasOnly flow covers mod and viewer webcams correctlyThe new
camerasOnlyscenario verifies that the whiteboard is absent for both moderator and attendee, exercises webcam join/share for each, and usesVIDEO_LOADING_WAIT_TIMEfor the critical waits before asserting containers and taking screenshots. This matches the expected cameras-only layout behavior and should be robust as long aswasRemovedinternally waits for disappearance.Please confirm that
wasRemovedperforms a proper wait (not a single immediate check) so layout transitions don’t introduce flakiness around the whiteboard assertions.bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx (1)
16-18: Always-on layout propagation aligns with simplified push-layout modelUsing
useMeetingLayoutUpdaterand callingsetMeetingLayout()wheneverlayoutChangedis true (whileisPresenterandlayoutPropagateElements.length > 0) removes the old push-layout branching and matches the new “always push the presenter’s layout” behavior. TheupdateSettingscall insidereplicateLayoutTypecontinues to gate persistence onpushLayoutMeeting, so persisted user settings won’t be updated unexpectedly when propagation is disabled at the meeting level. Overall the wiring looks consistent with the new layout model.If you haven’t already, it’s worth running through a manual loop (presenter tweaking layout repeatedly) to confirm there’s no unintended overwrite loop between meeting layout updates and local layout state, given the new unconditional
setMeetingLayout()call.Also applies to: 31-31, 199-216, 307-316
bigbluebutton-html5/public/locales/en.json (1)
1256-1256: New overflow users label is clear; ensure it’s synced via Transifex
"app.video.overflowUsers": "+{overflowCount} users"is concise and uses a well-named{overflowCount}placeholder; semantically it matches an overflow-tile count. Please also ensure this new key is added/updated in Transifex so localization remains the single source of truth for translations.Based on learnings
| // rgba version of colorPrimary (0F70D7) with 15% opacity for talking indicator background | ||
| const webcamTalkingBackgroundColor = 'var(--webcam-talking-background-color, rgba(13, 109, 252, 0.15))'; |
There was a problem hiding this comment.
Fix color value mismatch with colorPrimary.
The comment states this should be the rgba version of colorPrimary (#0F70D7) with 15% opacity, but the RGB values don't match:
colorPrimary(#0F70D7) = rgb(15, 112, 215)- Provided value = rgba(13, 109, 252, 0.15)
The green and blue channels are significantly different (112 vs 109, 215 vs 252).
Apply this diff to use the correct RGB values:
-// rgba version of colorPrimary (0F70D7) with 15% opacity for talking indicator background
-const webcamTalkingBackgroundColor = 'var(--webcam-talking-background-color, rgba(13, 109, 252, 0.15))';
+// rgba version of colorPrimary (0F70D7) with 15% opacity for talking indicator background
+const webcamTalkingBackgroundColor = 'var(--webcam-talking-background-color, rgba(15, 112, 215, 0.15))';📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // rgba version of colorPrimary (0F70D7) with 15% opacity for talking indicator background | |
| const webcamTalkingBackgroundColor = 'var(--webcam-talking-background-color, rgba(13, 109, 252, 0.15))'; | |
| // rgba version of colorPrimary (0F70D7) with 15% opacity for talking indicator background | |
| const webcamTalkingBackgroundColor = 'var(--webcam-talking-background-color, rgba(15, 112, 215, 0.15))'; |
🤖 Prompt for AI Agents
In bigbluebutton-html5/imports/ui/stylesheets/styled-components/palette.js
around lines 126 to 127, the rgba fallback for webcamTalkingBackgroundColor does
not match colorPrimary (#0F70D7). Replace the incorrect rgba(13, 109, 252, 0.15)
with the correct rgba using colorPrimary's RGB values rgba(15, 112, 215, 0.15)
and keep the CSS variable fallback pattern
(var(--webcam-talking-background-color, rgba(15, 112, 215, 0.15))).
| await this.userPage.hasElementCount(e.webcamVideoItem, 5, 'should display 5 webcams for the attendee'); | ||
| await checkScreenshots(this, 'pagination should work for the attendees', 'video', 'pagination'); | ||
| await this.userPage.waitAndClick(e.nextPageVideoPagination); | ||
| await this.userPage.hasElementCount(e.webcamVideoItem, 2, 'should display 2 webcams for the attendee'); | ||
| await this.userPage.hasElementCount(e.webcamVideoItem, 3, 'should display 3 webcams for the attendee'); | ||
| await checkScreenshots(this, 'pagination should work for the attendees', 'video', 'pagination-second-page'); |
There was a problem hiding this comment.
🧩 Analysis chain
Verify webcam count expectations align with overflow handling.
Line 166 expects 5 webcams for the attendee on the first page, and line 169 expects 3 webcams on the second page (total: 8). However, line 142 shows the moderator sees 7 webcams total.
With the new overflow tile feature introduced in this PR, confirm whether:
- The overflow tile counts as a "webcam item" in the test selector
- The expected counts (5 and 3) are correct given the overflow behavior
- The math aligns: if there are 7 total users with webcams, pagination should show 5 on page 1 and 2 on page 2, not 3
🏁 Script executed:
#!/bin/bash
# Description: Check the overflow tile implementation and how it affects webcam counts
# Search for overflow tile rendering and how it's counted
ast-grep --pattern 'overflowCount'
# Search for webcamVideoItem selector usage in tests
rg -n 'webcamVideoItem' bigbluebutton-tests/playwright/Length of output: 3210
I need to examine the test setup to understand the total number of users and how pagination works with the overflow tile.
I need to examine the test setup more closely to understand the total number of users and how the pagination works.
---
🏁 Script executed:
```shell
#!/bin/bash
# Search for test setup and context around lines 142-170 in layouts.ts
sed -n '1,180p' bigbluebutton-tests/playwright/layouts/layouts.ts | head -170
# Also search for pagination click handlers and their implementation
rg -n 'nextPageVideoPagination' -A5 -B5 bigbluebutton-tests/playwright/
Length of output: 164
---
🏁 Script executed:
```shell
#!/bin/bash
# Find and display the test setup in layouts.ts around the webcam assertions
# First, find the file
find . -name "layouts.ts" -path "*/playwright/layouts/*"
Length of output: 51
---
🏁 Script executed:
```shell
#!/bin/bash
# Display the full test scenario around lines 142-170
sed -n '120,180p' ./bigbluebutton-tests/playwright/layouts/layouts.ts
# Also search for where users are created/added in this test
grep -n "joinUser\|addUsers\|join\|webcam" ./bigbluebutton-tests/playwright/layouts/layouts.ts | head -30
Length of output: 3086
---
🏁 Script executed:
```shell
#!/bin/bash
# Check the OverflowTile component to see if it has data-test="webcamVideoItem"
cat ./bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx
# Also check the grid component rendering logic
sed -n '350,440p' ./bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx
Length of output: 4430
Verify the pagination count expectations—8 total exceeds the 7 users available.
The test setup confirms 7 users with webcams: 1 moderator + 1 attendee + 5 new users. However, the pagination expectations total 8 items (5 + 3). Since the OverflowTile uses data-test="overflowTile" (not "webcamVideoItem"), it is not counted by the test selector. With 7 users total, pagination should split as 5 + 2, not 5 + 3. Adjust line 169 to expect 2 webcams on the second page, or verify if an additional user should be created.
🤖 Prompt for AI Agents
bigbluebutton-tests/playwright/layouts/layouts.ts around lines 166-170: the test
expects 5 + 3 webcams across pagination but only 7 webcam elements exist
(overflowTile is not counted), so change the second-page expectation from 3 to 2
on the hasElementCount call at line 169; alternatively, if the intent is to
assert 8 items, create an additional user with a webcam in the test setup before
asserting pagination.
| "name": "enforceLayout", | ||
| "required": false, | ||
| "type": "String", | ||
| "description": (<>If passed it overrides the value of `meetingLayout` passed on CREATE or the value of `defaultMeetingLayout` read from configuration. Accepted values are the standard layouts: CUSTOM_LAYOUT, SMART_LAYOUT, PRESENTATION_FOCUS, VIDEO_FOCUS, but also several layouts which are not meant to be selectable via UI: CAMERAS_ONLY, PARTICIPANTS_CHAT_ONLY, PRESENTATION_ONLY, MEDIA_ONLY. Added in BBB 3.0</>) | ||
| "description": (<>If passed it overrides the value of `meetingLayout` passed on CREATE or the value of `defaultMeetingLayout` read from configuration. Accepted values are the standard layout: CUSTOM_LAYOUT, but also several layouts which are not meant to be selectable via UI: CAMERAS_ONLY, PARTICIPANTS_CHAT_ONLY, PRESENTATION_ONLY, MEDIA_ONLY. Added in BBB 3.0</>) | ||
| } |
There was a problem hiding this comment.
enforceLayout accepted values are inconsistent with other docs
Here you list CUSTOM_LAYOUT plus CAMERAS_ONLY, PARTICIPANTS_CHAT_ONLY, PRESENTATION_ONLY, MEDIA_ONLY, but omit PLUGINS_ONLY, which is documented as valid in bigbluebutton.properties and customize.md. This will confuse API users.
Consider updating the description to also mention PLUGINS_ONLY, keeping the list in sync with defaultMeetingLayout documentation.
🤖 Prompt for AI Agents
In docs/docs/data/join.tsx around lines 118 to 122, the enforceLayout
accepted-values list omits PLUGINS_ONLY which is documented elsewhere; update
the description text to include "PLUGINS_ONLY" among the accepted values and
ensure the wording mirrors the defaultMeetingLayout/customize.md documentation
so both lists remain in sync (adjust punctuation/ordering to match existing
style).
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts (1)
2-6: Consider relative imports for consistency with best practices.SonarCloud flags the absolute path import on line 6. While this appears to be a common pattern in the codebase, relative imports are generally preferred for better portability and IDE support.
Apply this diff if adopting relative imports:
-import { - colorWhite, - webcamBackgroundColor, - webcamPlaceholderBorder, -} from '/imports/ui/stylesheets/styled-components/palette'; +import { + colorWhite, + webcamBackgroundColor, + webcamPlaceholderBorder, +} from '../../../stylesheets/styled-components/palette';Based on static analysis hints.
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx (2)
4-6: Consider relative imports for consistency with best practices.SonarCloud flags absolute path imports on lines 4-6. While this appears to be a common codebase pattern, relative imports are generally preferred for better portability and IDE support.
Apply this diff if adopting relative imports:
-import { layoutDispatch, layoutSelectInput } from '/imports/ui/components/layout/context'; -import { Input } from '/imports/ui/components/layout/layoutTypes'; -import { PANELS, ACTIONS } from '/imports/ui/components/layout/enums'; +import { layoutDispatch, layoutSelectInput } from '../../layout/context'; +import { Input } from '../../layout/layoutTypes'; +import { PANELS, ACTIONS } from '../../layout/enums';Based on static analysis hints.
46-56: Consider enhancing avatar representation for better UX.The current implementation uses placeholder avatars with hard-coded values:
- Fixed 3 avatars regardless of overflow count
- Hard-coded color
#4a148c- Generic initials "Us"
While functional, consider these enhancements for better user experience:
- Display actual user initials/colors from the overflow users (at least for the first few)
- Show 1-3 avatars based on min(overflowCount, 3) for more accurate representation
- Extract the avatar color to a constant or use varied colors
Example enhancement:
{Array.from({ length: Math.min(overflowCount, 3) }, (_, index) => ( <Styled.AvatarWrapper key={index} $index={index}> <Styled.Avatar $color={AVATAR_COLORS[index % AVATAR_COLORS.length]}> <Styled.AvatarInitials> {/* Fetch actual user initials if available */} U{index + 1} </Styled.AvatarInitials> </Styled.Avatar> </Styled.AvatarWrapper> ))}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx(1 hunks)bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts (1)
bigbluebutton-html5/imports/ui/stylesheets/styled-components/palette.js (3)
webcamBackgroundColor(123-123)webcamPlaceholderBorder(124-124)colorWhite(1-1)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx (1)
bigbluebutton-html5/imports/ui/components/layout/context.jsx (1)
layoutDispatch(1581-1581)
🪛 GitHub Check: SonarCloud Code Analysis
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts
[failure] 6-6: Do not import modules using an absolute path
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx
[failure] 4-4: Do not import modules using an absolute path
[failure] 5-5: Do not import modules using an absolute path
[failure] 6-6: Do not import modules using an absolute path
⏰ 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-web)
- GitHub Check: build-package (bbb-html5)
🔇 Additional comments (2)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/styles.ts (1)
8-91: LGTM! Clean styled-components implementation.The styling is well-structured with:
- Proper dynamic prop usage for
isClickableand positioning- Consistent palette variable usage
- Good visual hierarchy and hover states
- Clean component composition
bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx (1)
19-42: LGTM! Component logic is well-implemented.The component correctly:
- Returns early when overflowCount is 0 or negative
- Checks if user list panel is already open before dispatching actions
- Uses layout context properly to manage sidebar state
|
Great work so far! I am testing a few use cases, here are things to adjust:
|
|
712578d to
0ec7ad7
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (1)
295-344: Confirm overflowCount semantics and underlying count assumptions
overflowCountis derived asuserCount - gridSize, then incremented by 1 when overflow exists to account for the replaced grid user. This assumes that:
USER_AGGREGATE_COUNT_SUBSCRIPTIONandGRID_USERS_SUBSCRIPTIONoperate over the same user population, and- the grid always consumes exactly
gridSizeslots (with the last one being turned into the overflow tile).If either assumption is off (e.g.,
userCountincludes users that never appear in the grid), the overflow tile label may not match the actual number of hidden users. It may be worth double‑checking the two GraphQL queries and either documenting these invariants here or deriving overflow fromgridData.user.lengthandvisibleStreamCountso the math reflects the actually rendered set.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (2)
bigbluebutton-html5/imports/ui/components/video-provider/service.ts (1)
isGridEnabled(192-194)bigbluebutton-html5/imports/ui/components/video-preview/container.jsx (1)
streams(28-28)
⏰ 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 (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (1)
391-445: Check other call sites of useGridUsers after changing its return shape
useVideoStreamsnow correctly adapts touseGridUsersreturning{ gridUsers, overflowCount }and exposesoverflowCountto consumers, which looks coherent. However, sinceuseGridUserspreviously returned justGridItem[], any other direct callers (outside this file) that still treat it as an array will now break at compile time/runtime.Please verify that
useVideoStreamsis the only consumer, or update remaining call sites to use the new object shape (or consider funneling all usage throughuseVideoStreamsfor a single source of truth).
@antobinary the issues don't seem to be happening anymore after the latest updates. Could you please test again and confirm? |
|
I did a bunch of testing on these changes + #24250 New reports:
|
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (1)
437-437: Minor: Overflow count may be slightly inaccurate when grid users overlap with streams.The destructuring and filtering logic correctly handles the updated return signature from
useGridUsers. Line 441 properly prevents duplicate tiles by filtering out grid users who already appear instreams.However,
overflowCountis calculated before this filtering. If a grid user is filtered out (e.g., due to a race condition where the user appears in bothgridDataandstreams), the overflow count will not reflect the actual number of hidden users. This is unlikely to cause functional issues but may result in the overflow tile displaying an inaccurate count in rare scenarios.Also applies to: 441-442
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (2)
bigbluebutton-html5/imports/ui/components/video-provider/service.ts (1)
isGridEnabled(192-194)bigbluebutton-html5/imports/ui/components/video-preview/container.jsx (1)
streams(28-28)
⏰ 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). (3)
- GitHub Check: build-package (bbb-web)
- GitHub Check: build-package (bbb-html5)
- GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (1)
295-344: The repository clone failed in the sandbox environment. Let me analyze the original review comment to determine whether the concerns raised are critical, speculative, or need verification through alternative means.Based on my analysis of the review comment without repository access:
The original comment raises logical concerns about potential misalignment between the query limit and available display slots, but these are conditional on how the rendering logic works. The code itself includes documentation explaining the +1 adjustment. Since I cannot access the repository to verify the actual rendering implementation and confirm whether these concerns represent real bugs or are already handled by the display logic, I must mark this for verification.
Verify overflow tile logic with rendering implementation.
The overflow count calculation logic includes a comment explaining the +1 adjustment (one grid slot reserved for the overflow tile), but verification requires examining the actual rendering code to confirm:
- The rendering component properly limits displayed grid users to
gridSize - visibleStreamCount - 1when overflow exists, ensuring space for the overflow tile.- When
visibleStreamCount >= gridSize, the rendering gracefully handles zero available grid slots despite a calculatedoverflowCount.Without confirming these details in the rendering implementation, the concerns remain unresolved.
Automated tests Summary✅ All the CI tests have passed! |
|
closing in favor of #24316 |


What does this PR do?
This PR simplifies the BigBlueButton layout system by removing deprecated layout options and streamlining the layout synchronization mechanism. The changes include:
Closes Issue(s)
closes (partially) #24186
closes #22156
closes #21700
closes #23404
closes #22388
Motivation
Simplifying layouts by eliminating underused options and enhancing the features users rely on most (more details in #24186)
How to test
Test basic layout behavior:
enforceLayoutcustom parameter) stay in this layout and not on the default oneTest layout synchronization:
More
Remaining tasks for #24186: