Skip to content

Commit

Permalink
remove cc for conference coordinates (#5166)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmceachernmsft authored Sep 12, 2024
1 parent e413910 commit db232bb
Show file tree
Hide file tree
Showing 31 changed files with 91 additions and 223 deletions.
2 changes: 0 additions & 2 deletions common/config/babel/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ module.exports = {
'end-call-options',
// Feature to support file sharing in Teams interoperability chats
"file-sharing-teams-interop",
// Get join conference information
'teams-meeting-conference',
// Close captions feature for ACS calls
"acs-close-captions",
// Feature for showing notifications
Expand Down
2 changes: 0 additions & 2 deletions packages/calling-component-bindings/src/baseSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { CaptionsInfo } from '@internal/calling-stateful-client';
import { CaptionsKind } from '@azure/communication-calling';
import { RaisedHandState } from '@internal/calling-stateful-client';
import { _SupportedCaptionLanguage, _SupportedSpokenLanguage } from '@internal/react-components';
/* @conditional-compile-remove(teams-meeting-conference) */
import { ConferencePhoneInfo } from '@internal/calling-stateful-client';
/* @conditional-compile-remove(breakout-rooms) */
import { CallNotifications } from '@internal/calling-stateful-client';
Expand Down Expand Up @@ -270,7 +269,6 @@ export const getSupportedSpokenLanguages = (
return state.calls[props.callId]?.captionsFeature.supportedSpokenLanguages as _SupportedSpokenLanguage[];
};

/* @conditional-compile-remove(teams-meeting-conference) */
/** @private */
export const getMeetingConferencePhones = (
state: CallClientState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const notificationStackSelector: NotificationStackSelector = createSelect
getDiagnostics,
getDeviceManager,
getEnvironmentInfo,
/* @conditional-compile-remove(teams-meeting-conference) */ getMeetingConferencePhones,
getMeetingConferencePhones,
/* @conditional-compile-remove(breakout-rooms) */ getAssignedBreakoutRoom
],
(
Expand All @@ -59,7 +59,7 @@ export const notificationStackSelector: NotificationStackSelector = createSelect
diagnostics,
deviceManager,
environmentInfo,
/* @conditional-compile-remove(teams-meeting-conference) */ meetingConference,
meetingConference,
/* @conditional-compile-remove(breakout-rooms) */ assignedBreakoutRoom
): { activeErrorMessages: ActiveNotification[]; activeNotifications: ActiveNotification[] } => {
// The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.
Expand All @@ -85,7 +85,7 @@ export const notificationStackSelector: NotificationStackSelector = createSelect

// Errors reported via diagnostics are more reliable than from API method failures, so process those first.
let isTeamsMeetingWithPhones = false;
/* @conditional-compile-remove(teams-meeting-conference) */

if (meetingConference && meetingConference.length > 0) {
isTeamsMeetingWithPhones = true;
}
Expand Down
1 change: 0 additions & 1 deletion packages/calling-stateful-client/src/CallClientState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ export interface CallState {
*/
info?: TeamsCallInfo | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* Proxy of {@link @azure/communication-calling#TeamsMeetingAudioConferencingCallFeature}.
*/
Expand Down
5 changes: 1 addition & 4 deletions packages/calling-stateful-client/src/CallContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import { RaisedHand } from '@azure/communication-calling';
/* @conditional-compile-remove(breakout-rooms) */
import { BreakoutRoom, BreakoutRoomsSettings } from '@azure/communication-calling';

/* @conditional-compile-remove(teams-meeting-conference) */
import { TeamsMeetingAudioConferencingDetails } from '@azure/communication-calling';
/* @conditional-compile-remove(teams-meeting-conference) */
import { convertConferencePhoneInfo } from './Converter';

import { CapabilitiesChangeInfo, ParticipantCapabilities } from '@azure/communication-calling';
Expand Down Expand Up @@ -189,7 +187,7 @@ export class CallContext {
existingCall.captionsFeature.currentSpokenLanguage = call.captionsFeature.currentSpokenLanguage;
existingCall.captionsFeature.currentCaptionLanguage = call.captionsFeature.currentCaptionLanguage;
existingCall.info = call.info;
/* @conditional-compile-remove(teams-meeting-conference) */

existingCall.meetingConference = call.meetingConference;
} else {
draft.calls[latestCallId] = call;
Expand Down Expand Up @@ -574,7 +572,6 @@ export class CallContext {
});
}

/* @conditional-compile-remove(teams-meeting-conference) */
public setTeamsMeetingConference(
callId: string,
teamsMeetingConferenceDetails: TeamsMeetingAudioConferencingDetails
Expand Down
4 changes: 1 addition & 3 deletions packages/calling-stateful-client/src/CallSubscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export class CallSubscriber {
private subscribe = (): void => {
this._call.on('stateChanged', this.stateChanged);
this._call.on('stateChanged', this.initCaptionSubscriber);
/* @conditional-compile-remove(teams-meeting-conference) */
this._call.on('stateChanged', this.initTeamsMeetingConference);
/* @conditional-compile-remove(local-recording-notification) */
this._call.on('stateChanged', this.initLocalRecordingNotificationSubscriber);
Expand Down Expand Up @@ -170,7 +169,7 @@ export class CallSubscriber {
this._call.off('stateChanged', this.initCaptionSubscriber);
/* @conditional-compile-remove(local-recording-notification) */
this._call.off('stateChanged', this.initLocalRecordingNotificationSubscriber);
/* @conditional-compile-remove(teams-meeting-conference) */

this._call.off('stateChanged', this.initTeamsMeetingConference);
this._call.off('idChanged', this.idChanged);
this._call.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged);
Expand Down Expand Up @@ -253,7 +252,6 @@ export class CallSubscriber {
}
};

/* @conditional-compile-remove(teams-meeting-conference) */
private initTeamsMeetingConference = (): void => {
if (this._call.state === 'Connected') {
this._call
Expand Down
1 change: 0 additions & 1 deletion packages/calling-stateful-client/src/Converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ export function convertSdkCallToDeclarativeCall(call: CallCommon): CallState {
/* @conditional-compile-remove(hide-attendee-name) */
hideAttendeeNames,
info: callInfo,
/* @conditional-compile-remove(teams-meeting-conference) */
meetingConference: { conferencePhones: [] }
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ describe('errors should be reported correctly from Call when', () => {
}
});

/* @conditional-compile-remove(teams-meeting-conference) */
test('Conference call is undefined in acs to acs calls', async () => {
const conference = addMockEmitter({ name: 'Conference' });

Expand Down
1 change: 0 additions & 1 deletion packages/calling-stateful-client/src/index-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export type { ReactionState } from './CallClientState';
export type { SpotlightCallFeatureState, SpotlightState } from './CallClientState';
/* @conditional-compile-remove(local-recording-notification) */
export type { LocalRecordingCallFeatureState } from './CallClientState';
/* @conditional-compile-remove(teams-meeting-conference) */
export type { ConferencePhoneInfo } from './CallClientState';
/* @conditional-compile-remove(breakout-rooms) */
export type { BreakoutRoomsState } from './CallClientState';
1 change: 0 additions & 1 deletion packages/communication-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,5 +443,4 @@ export type {
NotificationType,
ActiveNotification
} from '../../react-components/src';
/* @conditional-compile-remove(teams-meeting-conference) */
export type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';
1 change: 0 additions & 1 deletion packages/react-components/src/components/ErrorBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export interface ErrorBarStrings {
*/
callNetworkQualityLow: string;

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* Message shown when poor network quality is detected during a call.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/* @conditional-compile-remove(teams-meeting-conference) */
import React, { useCallback } from 'react';
/* @conditional-compile-remove(teams-meeting-conference) */
import { useMemo } from 'react';
/* @conditional-compile-remove(teams-meeting-conference) */
import { IModalStyles, Modal, Stack, useTheme, Text, IconButton, Icon } from '@fluentui/react';

/* @conditional-compile-remove(teams-meeting-conference) */
import {
themedPhoneInfoModalStyle,
titleClassName,
Expand All @@ -21,15 +17,11 @@ import {
infoConnectionLinkStyle,
phoneInfoIconStyle
} from './styles/TeamsMeetingConferenceInfo';
/* @conditional-compile-remove(teams-meeting-conference) */
import { _preventDismissOnEvent } from '@internal/acs-ui-common';
/* @conditional-compile-remove(teams-meeting-conference) */
import { useLocale } from '../localization';
/* @conditional-compile-remove(teams-meeting-conference) */
import { _pxToRem } from '@internal/acs-ui-common';
import { _formatPhoneNumber } from './utils/formatPhoneNumber';

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* strings for phone info modal
* @public
Expand Down Expand Up @@ -69,7 +61,6 @@ export interface MeetingConferencePhoneInfoModalStrings {
meetingConferencePhoneInfoModalNoPhoneAvailable: string;
}

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* @public
* MeetingConferencePhoneInfoModal Component Props.
Expand All @@ -80,7 +71,6 @@ export interface MeetingConferencePhoneInfoModalProps {
onDismissMeetingPhoneInfoSettings?: () => void;
}

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* @public
* a component for setting spoken languages
Expand Down Expand Up @@ -191,7 +181,6 @@ export const MeetingConferencePhoneInfoModal = (props: MeetingConferencePhoneInf
);
};

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* @internal
* format phone number link
Expand All @@ -200,7 +189,6 @@ export const formatPhoneNumberLink = (phoneNumber: ConferencePhoneInfo): string
return `tel:+${phoneNumber.phoneNumber},,${phoneNumber.conferenceId}#`;
};

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* @internal
* format phone number
Expand All @@ -219,7 +207,6 @@ export const formatPhoneNumberInfo = (
);
};

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* @internal
* format meeting id
Expand All @@ -235,7 +222,6 @@ export const formatMeetingId = (meetingId?: string): string => {
return [meetingId.slice(0, 3), meetingId.slice(3, 6), meetingId.slice(6, 9)].join(' ') + '#';
};

/* @conditional-compile-remove(teams-meeting-conference) */
/**
* @public
* Information for conference phone info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export interface NotificationStackStrings {
* Message shown when poor network quality is detected during a call.
*/
callNetworkQualityLow?: NotificationStrings;
/* @conditional-compile-remove(teams-meeting-conference) */
/**
* Message shown when poor network quality is detected during a teams meetings.
* Contains actions to open phone info modal.
Expand Down
2 changes: 0 additions & 2 deletions packages/react-components/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,7 @@ export * from './StartCaptionsButton';

export * from './CaptionsSettingsModal';

/* @conditional-compile-remove(teams-meeting-conference) */
export * from './MeetingConferencePhoneInfo';
/* @conditional-compile-remove(teams-meeting-conference) */
export { _formatPhoneNumber } from './utils/formatPhoneNumber';

export { _ErrorBoundary } from './ErrorBoundary';
Expand Down
9 changes: 0 additions & 9 deletions packages/react-components/src/components/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ export const NotificationIconProps = (notificationType: NotificationType): IIcon
*/
export const customNotificationIconName: Partial<{ [key in NotificationType]: string }> = {
callNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',
/* @conditional-compile-remove(teams-meeting-conference) */
teamsMeetingCallNetworkQualityLow: 'ErrorBarCallNetworkQualityLow',
callNoSpeakerFound: 'ErrorBarCallNoSpeakerFound',
callNoMicrophoneFound: 'ErrorBarCallNoMicrophoneFound',
Expand All @@ -342,21 +341,13 @@ export const customNotificationIconName: Partial<{ [key in NotificationType]: st
/* @conditional-compile-remove(soft-mute) */
mutedByRemoteParticipant: 'ErrorBarMutedByRemoteParticipant',
speakingWhileMuted: 'ErrorBarCallMicrophoneMutedBySystem',

recordingStarted: 'NotificationBarRecording',

transcriptionStarted: 'NotificationBarRecording',

recordingStopped: 'NotificationBarRecording',

transcriptionStopped: 'NotificationBarRecording',

recordingAndTranscriptionStarted: 'NotificationBarRecording',

recordingAndTranscriptionStopped: 'NotificationBarRecording',

recordingStoppedStillTranscribing: 'NotificationBarRecording',

transcriptionStoppedStillRecording: 'NotificationBarRecording',
/* @conditional-compile-remove(breakout-rooms) */
assignedBreakoutRoomOpened: 'NotificationBarBreakoutRoomOpened',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import { ImageOverlayStrings } from '../components/ImageOverlay';
import { ReactionButtonStrings } from '../components';
/* @conditional-compile-remove(rich-text-editor) */
import { RichTextSendBoxStrings } from '../components/RichTextEditor/RichTextSendBox';
/* @conditional-compile-remove(teams-meeting-conference) */
import { MeetingConferencePhoneInfoModalStrings } from '../components/MeetingConferencePhoneInfo';
/* @conditional-compile-remove(one-to-n-calling) */
import { IncomingCallNotificationStrings } from '../components/IncomingCallNotification';
Expand Down Expand Up @@ -183,7 +182,6 @@ export interface ComponentStrings {
/* @conditional-compile-remove(total-participant-count) */
/** Strings for the participant list component */
ParticipantList: ParticipantListStrings;
/* @conditional-compile-remove(teams-meeting-conference) */
/** Strings for the MeetingConferencePhoneInfoModal */
meetingConferencePhoneInfo: MeetingConferencePhoneInfoModalStrings;
/* @conditional-compile-remove(one-to-n-calling) */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,6 @@ export interface CallCompositeStrings {
* Aria label to announce when remote participant is pinned
*/
pinParticipantMenuItemAriaLabel: string;
/* @conditional-compile-remove(teams-meeting-conference) */
/**
* Error message when the meeting identifier or passcode is invalid
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ import { getCallStatus, getCaptionsStatus } from '../selectors/baseSelectors';
import { drawerContainerStyles } from '../styles/CallComposite.styles';
import { SidePane } from './SidePane/SidePane';
import { usePeoplePane } from './SidePane/usePeoplePane';
/* @conditional-compile-remove(teams-meeting-conference) */
import { useMeetingPhoneInfoPane } from './SidePane/useMeetingPhoneInfo';
/* @conditional-compile-remove(teams-meeting-conference) */
import { getTeamsMeetingCoordinates } from '../selectors/baseSelectors';

import {
Expand Down Expand Up @@ -185,10 +183,8 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {
}
}, [participantActioned, remoteParticipants]);

/* @conditional-compile-remove(teams-meeting-conference) */
const conferencePhoneInfo = useSelector(getTeamsMeetingCoordinates);

/* @conditional-compile-remove(teams-meeting-conference) */
const meetingPhoneInfoPaneProps = {
updateSidePaneRenderer,
mobileView: props.mobileView,
Expand Down Expand Up @@ -235,19 +231,15 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {
localParticipant
} = videoGalleryProps;

/* @conditional-compile-remove(teams-meeting-conference) */
const [showTeamsMeetingConferenceModal, setShowTeamsMeetingConferenceModal] = useState(false);
/* @conditional-compile-remove(teams-meeting-conference) */
const toggleTeamsMeetingConferenceModal = useCallback((): void => {
setShowTeamsMeetingConferenceModal(!showTeamsMeetingConferenceModal);
}, [showTeamsMeetingConferenceModal]);

/* @conditional-compile-remove(teams-meeting-conference) */
const { isMeetingPhoneInfoPaneOpen, openMeetingPhoneInfoPane, closeMeetingPhoneInfoPane } = useMeetingPhoneInfoPane({
...meetingPhoneInfoPaneProps
});

/* @conditional-compile-remove(teams-meeting-conference) */
const toggleMeetingPhoneInfoPane = useCallback(() => {
if (isMeetingPhoneInfoPaneOpen) {
closeMeetingPhoneInfoPane();
Expand All @@ -256,7 +248,6 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {
}
}, [closeMeetingPhoneInfoPane, isMeetingPhoneInfoPaneOpen, openMeetingPhoneInfoPane]);

/* @conditional-compile-remove(teams-meeting-conference) */
const onMeetingPhoneInfoClicked = useCallback(() => {
setShowDrawer(false);
toggleMeetingPhoneInfoPane();
Expand Down Expand Up @@ -561,9 +552,7 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {
onStopLocalSpotlight={
!hideSpotlightButtons && localParticipant.spotlight ? onStopLocalSpotlightWithPrompt : undefined
}
/* @conditional-compile-remove(teams-meeting-conference) */
onToggleTeamsMeetingConferenceModal={toggleTeamsMeetingConferenceModal}
/* @conditional-compile-remove(teams-meeting-conference) */
teamsMeetingConferenceModalPresent={showTeamsMeetingConferenceModal}
/>
)}
Expand All @@ -587,7 +576,6 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {
onSetDialpadPage={props.onSetDialpadPage}
dtmfDialerPresent={props.dtmfDialerPresent}
reactionResources={adapter.getState().reactions}
/* @conditional-compile-remove(teams-meeting-conference) */
onClickMeetingPhoneInfo={onMeetingPhoneInfoClicked}
/>
</Stack>
Expand Down
Loading

0 comments on commit db232bb

Please sign in to comment.