From 8d737adc65f1b3684118ffd0453641e161c337f6 Mon Sep 17 00:00:00 2001 From: Calin Chitu Date: Fri, 25 Mar 2022 11:09:55 +0200 Subject: [PATCH] feat(participants/native) - updated container styles --- .../components/native/CollapsibleList.js | 2 +- .../native/MeetingParticipantList.js | 23 +++++++++++++++++-- .../components/native/ParticipantsPane.js | 8 +++++++ .../components/native/styles.js | 8 +++++-- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/react/features/participants-pane/components/native/CollapsibleList.js b/react/features/participants-pane/components/native/CollapsibleList.js index 0d7aa6210..06ee9ade0 100644 --- a/react/features/participants-pane/components/native/CollapsibleList.js +++ b/react/features/participants-pane/components/native/CollapsibleList.js @@ -31,7 +31,7 @@ type Props = { } const CollapsibleList = ({ children, containerStyle, onLongPress, title }: Props) => { - const [ collapsed, setCollapsed ] = useState(true); + const [ collapsed, setCollapsed ] = useState(false); const _toggleCollapsed = useCallback(() => { setCollapsed(!collapsed); }, [ collapsed ]); diff --git a/react/features/participants-pane/components/native/MeetingParticipantList.js b/react/features/participants-pane/components/native/MeetingParticipantList.js index 935d8946f..99350f35b 100644 --- a/react/features/participants-pane/components/native/MeetingParticipantList.js +++ b/react/features/participants-pane/components/native/MeetingParticipantList.js @@ -50,11 +50,21 @@ type Props = { */ _sortedRemoteParticipants: Map, + /** + * List of breakout rooms that were created. + */ + breakoutRooms: Array, + /** * The redux dispatch function. */ dispatch: Function, + /** + * List of participants waiting in lobby. + */ + lobbyParticipants: Array, + /** * Participants search string. */ @@ -180,6 +190,8 @@ class MeetingParticipantList extends PureComponent { _participantsCount, _showInviteButton, _sortedRemoteParticipants, + breakoutRooms, + lobbyParticipants, t } = this.props; const title = _currentRoom?.name @@ -192,12 +204,19 @@ class MeetingParticipantList extends PureComponent { // Regarding the fact that we have 3 sections, we apply // a certain height percentage for every section in order for all to fit // inside the participants pane container + // If there are only meeting participants available, + // we take the full container height + const onlyMeetingParticipants + = breakoutRooms.length === 0 && lobbyParticipants.length === 0; const containerStyle - = _participantsCount > 3 && styles.meetingListContainer; + = onlyMeetingParticipants + ? styles.meetingListFullContainer : styles.meetingListContainer; + const finalContainerStyle + = _participantsCount > 3 && containerStyle; return ( { _showInviteButton diff --git a/react/features/participants-pane/components/native/ParticipantsPane.js b/react/features/participants-pane/components/native/ParticipantsPane.js index c802cca49..c7e014fcb 100644 --- a/react/features/participants-pane/components/native/ParticipantsPane.js +++ b/react/features/participants-pane/components/native/ParticipantsPane.js @@ -19,6 +19,10 @@ import { getCurrentRoomId, isInBreakoutRoom } from '../../../breakout-rooms/functions'; +import { + getKnockingParticipants, + getLobbyEnabled +} from '../../../lobby/functions'; import MuteEveryoneDialog from '../../../video-menu/components/native/MuteEveryoneDialog'; import { @@ -63,11 +67,15 @@ const ParticipantsPane = () => { && participantsCount > 2 && rooms.length > 1; const addBreakoutRoom = _isBreakoutRoomsSupported && !hideAddRoomButton && isLocalModerator; + const lobbyEnabled = useSelector(getLobbyEnabled); + const lobbyParticipants = useSelector(getKnockingParticipants); return ( { diff --git a/react/features/participants-pane/components/native/styles.js b/react/features/participants-pane/components/native/styles.js index 95477c116..ecdd27ee9 100644 --- a/react/features/participants-pane/components/native/styles.js +++ b/react/features/participants-pane/components/native/styles.js @@ -196,7 +196,7 @@ export default { }, lobbyListContent: { - height: '20%' + height: '16%' }, lobbyListDescription: { @@ -217,7 +217,11 @@ export default { }, meetingListContainer: { - height: '60%' + height: '56%' + }, + + meetingListFullContainer: { + height: '82%' }, meetingListDescription: {