From d145a482cbb6f3d5f0e067936c5108984d9f8921 Mon Sep 17 00:00:00 2001 From: Scroody Date: Fri, 30 Jun 2023 10:53:58 -0300 Subject: [PATCH 1/4] Enhancement: Breakout modal UI improved --- .../create-breakout-room/component.jsx | 286 +++++++++--------- .../create-breakout-room/styles.js | 62 +++- bigbluebutton-html5/public/locales/en.json | 11 +- 3 files changed, 189 insertions(+), 170 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/actions-bar/create-breakout-room/component.jsx b/bigbluebutton-html5/imports/ui/components/actions-bar/create-breakout-room/component.jsx index 6d60dd8f73..98d1305d9f 100644 --- a/bigbluebutton-html5/imports/ui/components/actions-bar/create-breakout-room/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/actions-bar/create-breakout-room/component.jsx @@ -172,7 +172,11 @@ const intlMessages = defineMessages({ movedUserLabel: { id: 'app.createBreakoutRoom.movedUserLabel', description: 'screen reader alert when users are moved to rooms', - } + }, + manageRooms: { + id: 'app.createBreakoutRoom.manageRoomsLabel', + description: 'Label for manage rooms', + }, }); const BREAKOUT_LIM = Meteor.settings.public.app.breakouts.breakoutRoomLimit; @@ -219,7 +223,7 @@ class BreakoutRoom extends PureComponent { this.renderUserItemByRoom = this.renderUserItemByRoom.bind(this); this.renderRoomsGrid = this.renderRoomsGrid.bind(this); this.renderBreakoutForm = this.renderBreakoutForm.bind(this); - this.renderCheckboxes = this.renderCheckboxes.bind(this); + this.renderCheckboxes = this.renderUnassingUsers.bind(this); this.renderRoomSortList = this.renderRoomSortList.bind(this); this.renderDesktop = this.renderDesktop.bind(this); this.renderMobile = this.renderMobile.bind(this); @@ -661,10 +665,10 @@ class BreakoutRoom extends PureComponent { ? intl.formatMessage(intlMessages.captureSlidesType) : intl.formatMessage(intlMessages.captureNotesType); - const fileName = `${this.getRoomName(position,true)}_${captureType}`.replace(/ /g, '_'); + const fileName = `${this.getRoomName(position, true)}_${captureType}`.replace(/ /g, '_'); const fileNameDuplicatedCount = presentations.filter((pres) => pres.filename?.startsWith(fileName) - || pres.name?.startsWith(fileName)).length; + || pres.name?.startsWith(fileName)).length; return fileNameDuplicatedCount === 0 ? fileName : `${fileName}(${fileNameDuplicatedCount + 1})`; } @@ -829,6 +833,43 @@ class BreakoutRoom extends PureComponent { }); } + renderContent() { + const { intl } = this.props; + const { + leastOneUserIsValid, + allowDrop, + } = this.state; + const drop = (room) => (ev) => { + ev.preventDefault(); + const data = ev.dataTransfer.getData('text'); + this.changeUserRoom(data, room); + this.setState({ selectedId: '' }); + }; + + return ( + + + + + + + {this.renderUserItemByRoom(0)} + + + {intl.formatMessage(intlMessages.leastOneWarnBreakout)} + + + {this.renderRoomsGrid()} + + ); + } + renderRoomsGrid() { const { intl, isUpdate } = this.props; const { @@ -864,23 +905,6 @@ class BreakoutRoom extends PureComponent { return ( { this.listOfUsers = r; }} data-test="roomGrid"> - - - - - - {this.renderUserItemByRoom(0)} - - - {intl.formatMessage(intlMessages.leastOneWarnBreakout)} - - { range(1, rooms + 1).map((value) => (
@@ -925,12 +949,17 @@ class BreakoutRoom extends PureComponent { const { intl, isUpdate, + isBreakoutRecordable, } = this.props; const { numberOfRooms, durationTime, numberOfRoomsIsValid, durationIsValid, + freeJoin, + record, + captureNotes, + captureSlides, } = this.state; if (isUpdate) return null; @@ -968,42 +997,6 @@ class BreakoutRoom extends PureComponent { aria-label={intl.formatMessage(intlMessages.duration)} data-test="durationTime" /> - -