Skip to content

Commit 6f3f451

Browse files
GA raise hand (#3548)
* Add raise hand feature to stable * Change files * Duplicate change files for beta release * Update packages/react-composites CallComposite browser test snapshots * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f9cb264 commit 6f3f451

209 files changed

Lines changed: 190 additions & 20 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "prerelease",
3+
"area": "feature",
4+
"workstream": "Raise hand",
5+
"comment": "Add raise hand feature to stable",
6+
"packageName": "@azure/communication-react",
7+
"email": "79475487+mgamis-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "prerelease",
3+
"area": "feature",
4+
"workstream": "Raise hand",
5+
"comment": "Add raise hand feature to stable",
6+
"packageName": "@azure/communication-react",
7+
"email": "79475487+mgamis-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

common/config/babel/.babelrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ process.env['COMMUNICATION_REACT_FLAVOR'] !== 'beta' &&
4141
'one-to-n-calling',
4242
// PSTN calls
4343
'PSTN-calls',
44-
// raise hands feature
45-
'raise-hand',
4644
// rooms
4745
'rooms',
4846
// Adhoc calls to a Teams user.
@@ -104,7 +102,9 @@ process.env['COMMUNICATION_REACT_FLAVOR'] !== 'beta' &&
104102
// Closed captions
105103
'close-captions',
106104
// Optimal Video Count
107-
'optimal-video-count'
105+
'optimal-video-count',
106+
// raise hands feature
107+
'raise-hand'
108108
]
109109
}
110110
]);

packages/calling-component-bindings/review/stable/calling-component-bindings.api.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ export interface CommonCallingHandlers {
152152
// (undocumented)
153153
onHangUp: (forEveryone?: boolean) => Promise<void>;
154154
// (undocumented)
155+
onLowerHand: () => Promise<void>;
156+
// (undocumented)
157+
onRaiseHand: () => Promise<void>;
158+
// (undocumented)
155159
onRemoveParticipant(userId: string): Promise<void>;
156160
// (undocumented)
157161
onRemoveVideoBackgroundEffects: () => Promise<void>;
@@ -184,6 +188,8 @@ export interface CommonCallingHandlers {
184188
// (undocumented)
185189
onToggleMicrophone: () => Promise<void>;
186190
// (undocumented)
191+
onToggleRaiseHand: () => Promise<void>;
192+
// (undocumented)
187193
onToggleScreenShare: () => Promise<void>;
188194
}
189195

@@ -257,6 +263,15 @@ export type ParticipantsButtonSelector = (state: CallClientState, props: Calling
257263
myUserId: string;
258264
};
259265

266+
// @public
267+
export type RaiseHandButtonSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
268+
checked?: boolean;
269+
disabled?: boolean;
270+
};
271+
272+
// @public
273+
export const raiseHandButtonSelector: RaiseHandButtonSelector;
274+
260275
// @public
261276
export type ScreenShareButtonSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
262277
checked?: boolean;

packages/calling-component-bindings/src/baseSelectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export const getDiagnostics = (
149149
props: CallingBaseSelectorProps
150150
): DiagnosticsCallFeatureState | undefined => state.calls[props.callId]?.diagnostics;
151151

152-
/* @conditional-compile-remove(PSTN-calls) */
152+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(raise-hand) */
153153
/**
154154
* @private
155155
*/

packages/calling-component-bindings/src/callControlSelectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from './baseSelectors';
1515
/* @conditional-compile-remove(capabilities) */
1616
import { getCapabilites, getRole } from './baseSelectors';
17-
/* @conditional-compile-remove(PSTN-calls) */
17+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(raise-hand) */
1818
import { getCallState } from './baseSelectors';
1919
import { _isPreviewOn } from './utils/callUtils';
2020
/* @conditional-compile-remove(raise-hand) */

packages/calling-component-bindings/src/handlers/createCommonHandlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { disposeAllLocalPreviewViews, _isInCall, _isInLobbyOrConnecting, _isPrev
2626
import { CommunicationUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier } from '@azure/communication-common';
2727
/* @conditional-compile-remove(PSTN-calls) */
2828
import { CommunicationIdentifier } from '@azure/communication-common';
29-
/* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(close-captions) */
29+
/* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */
3030
import { Features } from '@azure/communication-calling';
3131
/* @conditional-compile-remove(close-captions) */
3232
import { TeamsCaptions } from '@azure/communication-calling';

packages/calling-component-bindings/src/hooks/usePropsFor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ const findSelector = (component: (props: any) => JSX.Element | undefined): any =
173173
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(raise-hand) */
174174
const findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {
175175
switch (component) {
176+
/* @conditional-compile-remove(PSTN-calls) */
176177
case HoldButton:
178+
/* @conditional-compile-remove(PSTN-calls) */
177179
return holdButtonSelector;
178180
/* @conditional-compile-remove(raise-hand) */
179181
case RaiseHandButton:

packages/calling-stateful-client/review/stable/calling-stateful-client.api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export interface CallState {
102102
isScreenSharingOn: boolean;
103103
localVideoStreams: LocalVideoStreamState[];
104104
optimalVideoCount: OptimalVideoCountFeatureState;
105+
raiseHand: RaiseHandCallFeature;
105106
recording: RecordingCallFeature;
106107
remoteParticipants: {
107108
[keys: string]: RemoteParticipantState;
@@ -226,6 +227,17 @@ export interface OptimalVideoCountFeatureState {
226227
maxRemoteVideoStreams: number;
227228
}
228229

230+
// @public
231+
export type RaisedHandState = {
232+
raisedHandOrderPosition: number;
233+
};
234+
235+
// @public
236+
export interface RaiseHandCallFeature {
237+
localParticipantRaisedHand?: RaisedHandState;
238+
raisedHands: RaisedHandState[];
239+
}
240+
229241
// @public
230242
export interface RecordingCallFeature {
231243
isRecordingActive: boolean;
@@ -238,6 +250,7 @@ export interface RemoteParticipantState {
238250
identifier: CommunicationUserKind | PhoneNumberKind | MicrosoftTeamsUserKind | UnknownIdentifierKind;
239251
isMuted: boolean;
240252
isSpeaking: boolean;
253+
raisedHand?: RaisedHandState;
241254
state: RemoteParticipantState_2;
242255
videoStreams: {
243256
[key: number]: RemoteVideoStreamState;

packages/communication-react/review/stable/communication-react.api.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ export interface CallAdapterCallOperations {
214214
// @deprecated
215215
disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;
216216
leaveCall(forEveryone?: boolean): Promise<void>;
217+
lowerHand(): Promise<void>;
217218
mute(): Promise<void>;
219+
raiseHand(): Promise<void>;
218220
removeParticipant(userId: string): Promise<void>;
219221
setCaptionLanguage(language: string): Promise<void>;
220222
setSpokenLanguage(language: string): Promise<void>;
@@ -377,6 +379,10 @@ export type CallCompositeIcons = {
377379
ControlButtonScreenShareStop?: JSX.Element;
378380
ControlButtonCameraProhibited?: JSX.Element;
379381
ControlButtonMicProhibited?: JSX.Element;
382+
ControlButtonRaiseHand?: JSX.Element;
383+
ControlButtonLowerHand?: JSX.Element;
384+
RaiseHandContextualMenuItem?: JSX.Element;
385+
LowerHandContextualMenuItem?: JSX.Element;
380386
ErrorBarCallCameraAccessDenied?: JSX.Element;
381387
ErrorBarCallCameraAlreadyInUse?: JSX.Element;
382388
ErrorBarCallLocalVideoFreeze?: JSX.Element;
@@ -600,6 +606,7 @@ export interface CallingTheme {
600606
callRedDark: string;
601607
callRedDarker: string;
602608
iconWhite: string;
609+
raiseHandGold: string;
603610
};
604611
}
605612

@@ -609,6 +616,7 @@ export type CallParticipantListParticipant = ParticipantListParticipant & {
609616
isScreenSharing?: boolean;
610617
isMuted?: boolean;
611618
isSpeaking?: boolean;
619+
raisedHand?: RaisedHand;
612620
};
613621

614622
// @public
@@ -637,6 +645,7 @@ export interface CallState {
637645
isScreenSharingOn: boolean;
638646
localVideoStreams: LocalVideoStreamState[];
639647
optimalVideoCount: OptimalVideoCountFeatureState;
648+
raiseHand: RaiseHandCallFeature;
640649
recording: RecordingCallFeature;
641650
remoteParticipants: {
642651
[keys: string]: RemoteParticipantState;
@@ -670,10 +679,12 @@ export interface CallWithChatAdapterManagement {
670679
joinCall(options?: JoinCallOptions): Call | undefined;
671680
leaveCall(forEveryone?: boolean): Promise<void>;
672681
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
682+
lowerHand(): Promise<void>;
673683
mute(): Promise<void>;
674684
queryCameras(): Promise<VideoDeviceInfo[]>;
675685
queryMicrophones(): Promise<AudioDeviceInfo[]>;
676686
querySpeakers(): Promise<AudioDeviceInfo[]>;
687+
raiseHand(): Promise<void>;
677688
removeParticipant(userId: string): Promise<void>;
678689
sendMessage(content: string, options?: SendMessageOptions): Promise<void>;
679690
sendReadReceipt(chatMessageId: string): Promise<void>;
@@ -1376,6 +1387,9 @@ export type CommonCallControlOptions = {
13761387
disabled: boolean;
13771388
};
13781389
moreButton?: boolean;
1390+
raiseHandButton?: boolean | {
1391+
disabled: boolean;
1392+
};
13791393
peopleButton?: boolean;
13801394
};
13811395

@@ -1398,6 +1412,10 @@ export interface CommonCallingHandlers {
13981412
// (undocumented)
13991413
onHangUp: (forEveryone?: boolean) => Promise<void>;
14001414
// (undocumented)
1415+
onLowerHand: () => Promise<void>;
1416+
// (undocumented)
1417+
onRaiseHand: () => Promise<void>;
1418+
// (undocumented)
14011419
onRemoveParticipant(userId: string): Promise<void>;
14021420
// (undocumented)
14031421
onRemoveVideoBackgroundEffects: () => Promise<void>;
@@ -1430,6 +1448,8 @@ export interface CommonCallingHandlers {
14301448
// (undocumented)
14311449
onToggleMicrophone: () => Promise<void>;
14321450
// (undocumented)
1451+
onToggleRaiseHand: () => Promise<void>;
1452+
// (undocumented)
14331453
onToggleScreenShare: () => Promise<void>;
14341454
}
14351455

@@ -1532,6 +1552,7 @@ export interface ComponentStrings {
15321552
microphoneButton: MicrophoneButtonStrings;
15331553
participantItem: ParticipantItemStrings;
15341554
participantsButton: ParticipantsButtonStrings;
1555+
raiseHandButton: RaiseHandButtonStrings;
15351556
screenShareButton: ScreenShareButtonStrings;
15361557
sendBox: SendBoxStrings;
15371558
typingIndicator: TypingIndicatorStrings;
@@ -1750,6 +1771,10 @@ export const DEFAULT_COMPONENT_ICONS: {
17501771
ControlButtonParticipants: JSX.Element;
17511772
ControlButtonScreenShareStart: JSX.Element;
17521773
ControlButtonScreenShareStop: JSX.Element;
1774+
ControlButtonRaiseHand: JSX.Element;
1775+
ControlButtonLowerHand: JSX.Element;
1776+
RaiseHandContextualMenuItem: JSX.Element;
1777+
LowerHandContextualMenuItem: JSX.Element;
17531778
EditBoxCancel: JSX.Element;
17541779
EditBoxSubmit: JSX.Element;
17551780
ErrorBarCallCameraAccessDenied: JSX.Element;
@@ -1833,6 +1858,10 @@ export const DEFAULT_COMPOSITE_ICONS: {
18331858
ControlButtonScreenShareStop: JSX.Element;
18341859
ControlButtonCameraProhibited?: JSX.Element | undefined;
18351860
ControlButtonMicProhibited?: JSX.Element | undefined;
1861+
ControlButtonRaiseHand: JSX.Element;
1862+
ControlButtonLowerHand: JSX.Element;
1863+
RaiseHandContextualMenuItem: JSX.Element;
1864+
LowerHandContextualMenuItem: JSX.Element;
18361865
ErrorBarCallCameraAccessDenied: JSX.Element;
18371866
ErrorBarCallCameraAlreadyInUse: JSX.Element;
18381867
ErrorBarCallLocalVideoFreeze: JSX.Element;
@@ -2648,6 +2677,46 @@ export type ParticipantsRemovedListener = (event: {
26482677
// @public
26492678
export type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
26502679

2680+
// @public
2681+
export type RaisedHand = {
2682+
raisedHandOrderPosition: number;
2683+
};
2684+
2685+
// @public
2686+
export type RaisedHandState = {
2687+
raisedHandOrderPosition: number;
2688+
};
2689+
2690+
// @public
2691+
export const RaiseHandButton: (props: RaiseHandButtonProps) => JSX.Element;
2692+
2693+
// @public
2694+
export interface RaiseHandButtonProps extends ControlBarButtonProps {
2695+
onToggleRaiseHand?: () => Promise<void>;
2696+
strings?: Partial<RaiseHandButtonStrings>;
2697+
}
2698+
2699+
// @public
2700+
export type RaiseHandButtonSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
2701+
checked?: boolean;
2702+
disabled?: boolean;
2703+
};
2704+
2705+
// @public
2706+
export interface RaiseHandButtonStrings {
2707+
offLabel: string;
2708+
onLabel: string;
2709+
tooltipDisabledContent?: string;
2710+
tooltipOffContent?: string;
2711+
tooltipOnContent?: string;
2712+
}
2713+
2714+
// @public
2715+
export interface RaiseHandCallFeature {
2716+
localParticipantRaisedHand?: RaisedHandState;
2717+
raisedHands: RaisedHandState[];
2718+
}
2719+
26512720
// @public
26522721
export type ReadReceiptsBySenderId = {
26532722
[key: string]: {
@@ -2668,6 +2737,7 @@ export interface RemoteParticipantState {
26682737
identifier: CommunicationUserKind | PhoneNumberKind | MicrosoftTeamsUserKind | UnknownIdentifierKind;
26692738
isMuted: boolean;
26702739
isSpeaking: boolean;
2740+
raisedHand?: RaisedHandState;
26712741
state: RemoteParticipantState_2;
26722742
videoStreams: {
26732743
[key: number]: RemoteVideoStreamState;
@@ -3046,6 +3116,7 @@ export type VideoGalleryLayout = 'default' | 'floatingLocalVideo';
30463116

30473117
// @public
30483118
export interface VideoGalleryLocalParticipant extends VideoGalleryParticipant {
3119+
raisedHand?: RaisedHand;
30493120
}
30503121

30513122
// @public
@@ -3090,6 +3161,7 @@ export interface VideoGalleryProps {
30903161
// @public
30913162
export interface VideoGalleryRemoteParticipant extends VideoGalleryParticipant {
30923163
isSpeaking?: boolean;
3164+
raisedHand?: RaisedHand;
30933165
screenShareStream?: VideoGalleryStream;
30943166
}
30953167

@@ -3184,6 +3256,7 @@ export interface VideoTileProps {
31843256
onRenderPlaceholder?: OnRenderAvatarCallback;
31853257
personaMaxSize?: number;
31863258
personaMinSize?: number;
3259+
raisedHand?: RaisedHand;
31873260
renderElement?: JSX.Element | null;
31883261
showLabel?: boolean;
31893262
showMuteIndicator?: boolean;

0 commit comments

Comments
 (0)