Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(breakout-rooms, feature-flags): handle breakout button feature flag on participant pane footer component (#14003)

Julian LADJANI4290cdf53daa
diff --git a/react/features/participants-pane/components/breakout-rooms/components/web/RoomParticipantContextMenu.tsx b/react/features/participants-pane/components/breakout-rooms/components/web/RoomParticipantContextMenu.tsx
index ef3bfc2403..ad2ef17661 100644
--- a/react/features/participants-pane/components/breakout-rooms/components/web/RoomParticipantContextMenu.tsx
+++ b/react/features/participants-pane/components/breakout-rooms/components/web/RoomParticipantContextMenu.tsx
@@ -128,6 +128,7 @@ export const RoomParticipantContextMenu = ({
size = { AVATAR_SIZE } />,
text: entity?.participantName
} ] } />}
+
<ContextMenuItemGroup>
<div className = { styles.text }>
{t('breakoutRooms.actions.sendToBreakoutRoom')}
diff --git a/react/features/participants-pane/components/native/ParticipantsPaneFooter.tsx b/react/features/participants-pane/components/native/ParticipantsPaneFooter.tsx
index 6eaf905c11..8e67686945 100644
--- a/react/features/participants-pane/components/native/ParticipantsPaneFooter.tsx
+++ b/react/features/participants-pane/components/native/ParticipantsPaneFooter.tsx
@@ -6,6 +6,10 @@ import { useDispatch, useSelector } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { openDialog, openSheet } from '../../../base/dialog/actions';
+import {
+ BREAKOUT_ROOMS_BUTTON_ENABLED
+} from '../../../base/flags/constants';
+import { getFeatureFlag } from '../../../base/flags/functions';
import Icon from '../../../base/icons/components/Icon';
import { IconDotsHorizontal, IconRingGroup } from '../../../base/icons/svg';
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
@@ -34,6 +38,9 @@ const ParticipantsPaneFooter = (): JSX.Element => {
const isBreakoutRoomsSupported = useSelector((state: IReduxState) =>
state['features/base/conference'].conference?.getBreakoutRooms()?.isSupported()
);
+ const isBreakoutRoomsEnabled = useSelector((state: IReduxState) =>
+ getFeatureFlag(state, BREAKOUT_ROOMS_BUTTON_ENABLED, true)
+ );
const openMoreMenu = useCallback(() => dispatch(openSheet(ContextMenuMore)), [ dispatch ]);
const muteAll = useCallback(() => dispatch(openDialog(MuteEveryoneDialog)),
[ dispatch ]);
@@ -44,6 +51,7 @@ const ParticipantsPaneFooter = (): JSX.Element => {
<View style = { styles.participantsPaneFooterContainer as ViewStyle }>
{
isBreakoutRoomsSupported
+ && isBreakoutRoomsEnabled
&& <Button
accessibilityLabel = 'participantsPane.actions.breakoutRooms'
// eslint-disable-next-line react/jsx-no-bind, no-confusing-arrow