Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
1b0950e to
b97e43f
Compare
germanocaumo
left a comment
There was a problem hiding this comment.
I know this is still a draft; here is a first pass so it doesn't have to wait. I deployed it on a dev server (with #26099 underneath) and ran it: roomModePanel.spec.ts 33/33 with --repeat-each=3, the whole pre-flight/ folder 37/37, and manual checks of the gate (viewer, bot, breakout, a room that already has a mode, room modes on with the pre-flight off), the keyboard and both themes. The gate holds, and Start room joins without sending anything, as described.
Two layout problems, both reproduced on the dev server, are the main things:
- Crossing 640 px remounts the setup column for every pre-flight user, not only moderators: the camera restarts and unsaved picks revert. Rotating a phone is enough to trigger it. Details inline on
pre-flight/component.tsx. - Between 641 and about 900 px the cards don't fit. At 768 px (a tablet in portrait) the card text gets no width at all and the pills overlap it. Details inline on
room-mode/styles.ts.
The rest is smaller and inline: an unreachable loading branch that would trap the moderator if it were ever reached, copy, the empty right column, alignment, the illustration, a duplicate live region, and some test gaps.
When it leaves draft, the description needs a refresh: it still describes the getRoomMode read with the 10 s fallback, its commit links point to an earlier rebase, the spec has 11 cases (Playwright's total of 12 counts the setup file), and pre-flight/ is 37 cases now.
|
Unsure what a room mode controls. At the moment this can be and is maybe (always) better managed by frontends like GL, PILOS, Moodle, etc by passing room type specific parameters. How this is already implemented in PILOS
|
|
Hi @samuelwei, good to see you here, and thanks for the input. |
|
@fcecagno Maybe this feature would allow for setting the room mode on the create call and still allow for later changes ? |
|
"The problem of doing the configuration beforehand is that, once the room is started, there's no easy way to change it." sound to me, like the moderator can set the room mode on join and later change it. My request was, if the moderator can set and change during session, it might be also good to set using the API and also allow for a change during the session (maybe the change can be restricted via another parameter, allow_mode_change ) |
I don't think this is planned for the first deliver, but it makes a lot of sense to let it be set by the create call. Another requirement that makes sense, in my opinion, is to configure modes and restrictions applied to each mode using a configuration file (e.g. settings.yml), this way different deployments can have different room modes. |
|
This pull request has conflicts ☹ |
The join's notices ("Device permission pending", joining without
audio) live in the join step's header, and the join button points at
one of them with aria-describedby. A second panel beside the setup one
has to show the same notices above its own footer and start the room
with the same join.
Move the notices into JoinNotices, rendered by exactly one place, and
let JoiningRoomHeader leave them out. JoiningRoomActions takes an
optional label and a secondary action shown before the button. The
screen itself is unchanged.
The pre-flight lays out the setup panel and the join step side by side, stacked on a phone. The moderator's room mode panel needs a place of its own beside the setup panel. PreFlight takes an optional panel. Beside the setup panel it replaces the join step, with the actions as its footer; the session's heading stays in the page, visually hidden, as its heading and title. An error still takes the panel's place, as it takes the join step's. On a phone the panels become tabs, "Set up devices" and "Set up room", with the actions pinned below both. The panels stay mounted and are only hidden, so the camera preview and the picks survive switching. The setup panel is always inside the tabs on a phone, with the tab list hidden while it is alone, so a panel arriving later does not remount it.
A moderator entering a room nobody has configured has nowhere in the pre-flight to say what the session is for. With the room mode panel setting on, a moderator entering a room whose room mode is empty (not a bot, not in a breakout) gets a "Room mode" panel beside the setup panel. The mode is read before the join through the getRoomMode operation, which the middleware lets through for users who have not joined yet. A spinner holds the join button's place while it is read; a read that fails or gets no answer in 10 seconds falls back to the regular join step. Class and Meeting can be picked; Event, Streamed session (Webinar) and Thesis defense are listed as coming soon. The cards form a radio group, with the arrow keys moving between the modes that can be picked. Until a pick, the panel shows an illustration, with a dark variant for the dark theme since an image cannot read its tokens; then the selected mode. Cancel clears the pick (not on a phone, as in the design) and Start room joins, with or without a mode. The pick only lives in the pre-flight's state: nothing reaches the room yet, so starting leaves the room as it was created.
feat(pre-flight): add the moderator room mode panel A moderator entering a room nobody has configured has nowhere in the pre-flight to say what the session is for. With the room mode panel setting on, a moderator entering a room whose room mode is empty (not a bot, not in a breakout) gets a "Room mode" panel beside the setup panel. The mode is read before the join from user_current.meeting, which userCurrentSubscription already carries for users who have not joined yet. A spinner holds the join button's place until it arrives. Class and Meeting can be picked; Event, Streamed session (Webinar) and Thesis defense are listed as coming soon. The cards form a radio group, with the arrow keys moving between the modes that can be picked. Until a pick, the panel shows an illustration, with a dark variant for the dark theme since an image cannot read its tokens; then the selected mode. Cancel clears the pick (not on a phone, as in the design) and Start room joins, with or without a mode. The pick only lives in the pre-flight's state: nothing reaches the room yet, so starting leaves the room as it was created.
A tablet has no room for the room mode panel beside the setup panel. While the panel is up, the pre-flight takes the phone layout there: the presence manager decides it once and passes it down, and the phone styles follow a data-phone-layout attribute on the page and on the error dialog. A participant on a tablet keeps the desktop layout. The mode cards stay focusable while the room starts but ignore clicks and arrow keys, the summary fills the panel's height again, and the two cards' footer rules line up.
The summary centres its content at every width, as the desktop empty state sat at the top of the full-height box. The room modes list drops its pointer to a design record that is not in this repository, and the case for a viewer on a tablet checks the layout itself, since a single panel draws no tabs in either layout.
Install the client settings overrides on the breakout's context with upstream's applyClientSettingsOverridesToContext, which replaces installClientSettingsOverrides.
🚨 Automated tests failed |



What does this PR do?
Adds a Room mode panel to the pre-flight for a moderator entering a room with no room mode. On a desktop it sits beside the setup panel. On a phone, and on a tablet, the screen takes the phone layout: the two panels become tabs and Start room is pinned to the bottom. Class or Meeting can be picked, Cancel clears the pick and Start room joins, with or without a mode. Once the room is starting, the cards keep the pick.
Nothing is applied to the room yet, so the panel has its own setting,
public.app.preFlight.roomModes.enabled, off by default. The room mode comes with the moderator's own user data (user_current), so the panel is decided on the first render; with no room mode data, the regular join shows.Builds on #26099: its commits sit below these five and drop out once it is merged. The review fixes are
fixup!commits on top, squashed before merge.In detail:
Closes Issue(s)
None
Motivation
A moderator has no way to say what a session is for before it starts. This panel is the first step: picking the mode.
How to test
Turn on
public.app.preFlight.enabledandpublic.app.preFlight.roomModes.enabled; use a new meeting per row.Tablet means a window between 641 and 1024 px wide. The last row needs
meetingSetRoomMode(#26099).With the panel up:
Automated:
pre-flight/roomModePanel.spec.ts(17 cases,@ci). All ofpre-flight/passes locally, 43 of 43.More
@cicases, and CI splits them into shards by count, so shards 2 and 8 ofinstall-and-run-bbb-testscan hit the 25-minuteRun testslimit here with no test failing. test(playwright): trim the pre-flight E2E suite for CI #26284, on top of this series, trims the pre-flight suite (82 to 34@citests).Desktop, light
Desktop, dark

Tablet, room mode tab, light

Tablet, room mode tab, dark

Tablet, devices tab, light

Tablet, devices tab, dark

Phone, room mode tab, light

Phone, room mode tab, dark

Phone, devices tab, light

Phone, devices tab, dark

Changelog
Technical — Pre-flight room mode panel for moderators, behind
public.app.preFlight.roomModes.enabled(off by default).User-facing — Moderators entering an empty room can pick a room mode before starting it.