Skip to content

Commit 56d459f

Browse files
carocao-msftedwardlee-msftJoshuaLaiLeah-Xia-Microsoftdmceachernmsft
authored
[Updated based on ARB] Deprecated old joinCall API and create new overload with options bag (#3337)
* fix mobile but * Change files * Duplicate change files for beta release * new join call api * Change files * Duplicate change files for beta release * videoOption type * [bugfix][a11y] Label side pane tab header currently active tab as aria-label (#3345) * Add selected state to side pane tabheader tabs * [Chat] introducing new type for future scalability (#3156) * [Chat] Fix chat sample app conditional comment (#3314) * Fix conditional comments for Chat sample app * Change files * Duplicate change files for beta release * Add type check to stable sample chat app * [Chat] cleaning up some unused property for FileMetaData (#3347) * [BugFix] Update Captions banner to not obstruct verticalGallery controls on landscape mobile (#3305) * move control bar to left when landscape mode * refactor captions styles * move styling changes to component * remove CC demo code.. oops. * Change files * Duplicate change files for beta release * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots * Update packages/react-composites CallWithChatComposite browser test snapshots * Change control bar positioning logic * fix legacy control view * remove test.only * change to move control bar when container is 16:9 * address comments * fix stable build * Update change/@azure-communication-react-20b35cc7-52f0-40ed-8502-191c5fe29c38.json Co-authored-by: edwardlee-msft <edwardlee@microsoft.com> Signed-off-by: Donald McEachern <94866715+dmceachernmsft@users.noreply.github.com> * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots * update contol bar movement * control bar movement * 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 * fix nits --------- Signed-off-by: Donald McEachern <94866715+dmceachernmsft@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: edwardlee-msft <edwardlee@microsoft.com> * If video effect fails, none effect in picker is highlighted (#3334) * If video effect fails, none effect in picker is highlighted * Change files * Duplicate change files for beta release * Minor changes * Fix unread chat messages badge on the CallWithChatComposite being cleared when the call goes on hold (#3332) * Added capabilites feature to stateful client (#3340) * Added capabilites feature to stateful client * Change files * Duplicate change files for beta * update api undocumented comment --------- Co-authored-by: Donald McEachern <94866715+dmceachernmsft@users.noreply.github.com> * [Chat] Fix mention popover position incorrect when insert mention in the middle of long text (#3348) * Fix Mention Popover's position is too low when insert mention in the middle of a very long text * Change files * Duplicate change files for beta release * [A11y bugfix] Fix video effects pane tab ordering on call screen (#3351) * add focus zones * Change files * Duplicate change files for beta release * fix nit * Effects pane header misaligned (#3338) * Effects pane header misaligned * Change files * Duplicate change files for beta release * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots * Minor changes * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallWithChatComposite 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> * Fix breaking change check by ensuring dependencies are installed for the base branch (#3356) * Update pnpm version to 8.6.9 (#3357) * Fix bug where captions keep scrolling to the bottom when new captions are received (#3353) * scrolling bug * Change files * Duplicate change files for beta release * api * file * file * lint * update storybook * update storybook * update * update --------- Signed-off-by: Donald McEachern <94866715+dmceachernmsft@users.noreply.github.com> Co-authored-by: edwardlee-msft <edwardlee@microsoft.com> Co-authored-by: JoshuaLai <9044372+JoshuaLai@users.noreply.github.com> Co-authored-by: Leah Xia <107075081+Leah-Xia-Microsoft@users.noreply.github.com> Co-authored-by: Donald McEachern <94866715+dmceachernmsft@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: prabhjot-msft <97124699+prabhjot-msft@users.noreply.github.com> Co-authored-by: James Burnside <2684369+JamesBurnside@users.noreply.github.com> Co-authored-by: mgamis-msft <79475487+mgamis-msft@users.noreply.github.com>
1 parent 02b605e commit 56d459f

16 files changed

Lines changed: 186 additions & 149 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Deprecate old joinCall API and replace with joinCall API with options bag",
4+
"packageName": "@azure/communication-react",
5+
"email": "carolinecao@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Deprecate old joinCall API and replace with joinCall API with options bag",
4+
"packageName": "@azure/communication-react",
5+
"email": "carolinecao@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

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

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,9 @@ export interface BrowserPermissionDeniedStyles extends BaseCustomStyles {
303303

304304
// @public
305305
export interface CallAdapter extends CommonCallAdapter {
306+
// @deprecated
306307
joinCall(microphoneOn?: boolean): Call | undefined;
307-
joinCallWithOptions(options?: {
308-
microphoneOn?: boolean;
309-
cameraOn?: boolean;
310-
}): Call | undefined;
308+
joinCall(options?: JoinCallOptions): Call | undefined;
311309
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
312310
// @beta
313311
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;
@@ -320,11 +318,9 @@ export type CallAdapterCallEndedEvent = {
320318

321319
// @public @deprecated
322320
export interface CallAdapterCallManagement extends CallAdapterCallOperations {
321+
// @deprecated
323322
joinCall(microphoneOn?: boolean): Call | undefined;
324-
joinCallWithOptions(options?: {
325-
microphoneOn?: boolean;
326-
cameraOn?: boolean;
327-
}): Call | undefined;
323+
joinCall(options?: JoinCallOptions): Call | undefined;
328324
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
329325
// @beta
330326
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;
@@ -869,11 +865,9 @@ export interface CallWithChatAdapterManagement {
869865
fetchInitialData(): Promise<void>;
870866
// @beta
871867
holdCall: () => Promise<void>;
868+
// @deprecated
872869
joinCall(microphoneOn?: boolean): Call | undefined;
873-
joinCallWithOptions(options?: {
874-
microphoneOn?: boolean;
875-
cameraOn?: boolean;
876-
}): Call | undefined;
870+
joinCall(options?: JoinCallOptions): Call | undefined;
877871
leaveCall(forEveryone?: boolean): Promise<void>;
878872
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
879873
mute(): Promise<void>;
@@ -1631,11 +1625,9 @@ export type Common<A, B> = Pick<A, CommonProperties<A, B>>;
16311625

16321626
// @public
16331627
export interface CommonCallAdapter extends AdapterState<CallAdapterState>, Disposable, CallAdapterCallOperations, CallAdapterDeviceManagement, CallAdapterSubscribers {
1628+
// @deprecated
16341629
joinCall(microphoneOn?: boolean): void;
1635-
joinCallWithOptions(options?: {
1636-
microphoneOn?: boolean;
1637-
cameraOn?: boolean;
1638-
}): void;
1630+
joinCall(options?: JoinCallOptions): void;
16391631
startCall(participants: string[], options?: StartCallOptions): void;
16401632
// @beta
16411633
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): void;
@@ -2762,6 +2754,12 @@ export type IsSpeakingChangedListener = (event: {
27622754
isSpeaking: boolean;
27632755
}) => void;
27642756

2757+
// @public
2758+
export interface JoinCallOptions {
2759+
cameraOn?: boolean | 'keep';
2760+
microphoneOn?: boolean | 'keep';
2761+
}
2762+
27652763
// @public
27662764
export interface JumpToNewMessageButtonProps {
27672765
onClick: () => void;
@@ -3522,12 +3520,10 @@ export type TeamsAdapterOptions = CommonCallAdapterOptions;
35223520

35233521
// @beta
35243522
export interface TeamsCallAdapter extends CommonCallAdapter {
3523+
// @deprecated
35253524
joinCall(microphoneOn?: boolean): TeamsCall | undefined;
35263525
// @public
3527-
joinCallWithOptions(options?: {
3528-
microphoneOn?: boolean;
3529-
cameraOn?: boolean;
3530-
}): TeamsCall | undefined;
3526+
joinCall(options?: JoinCallOptions): TeamsCall | undefined;
35313527
startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;
35323528
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): TeamsCall | undefined;
35333529
}

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,9 @@ export interface BaseCustomStyles {
168168

169169
// @public
170170
export interface CallAdapter extends CommonCallAdapter {
171+
// @deprecated
171172
joinCall(microphoneOn?: boolean): Call | undefined;
172-
joinCallWithOptions(options?: {
173-
microphoneOn?: boolean;
174-
cameraOn?: boolean;
175-
}): Call | undefined;
173+
joinCall(options?: JoinCallOptions): Call | undefined;
176174
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
177175
}
178176

@@ -183,11 +181,9 @@ export type CallAdapterCallEndedEvent = {
183181

184182
// @public @deprecated
185183
export interface CallAdapterCallManagement extends CallAdapterCallOperations {
184+
// @deprecated
186185
joinCall(microphoneOn?: boolean): Call | undefined;
187-
joinCallWithOptions(options?: {
188-
microphoneOn?: boolean;
189-
cameraOn?: boolean;
190-
}): Call | undefined;
186+
joinCall(options?: JoinCallOptions): Call | undefined;
191187
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
192188
}
193189

@@ -577,11 +573,9 @@ export interface CallWithChatAdapterManagement {
577573
disposeScreenShareStreamView(remoteUserId: string): Promise<void>;
578574
disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;
579575
fetchInitialData(): Promise<void>;
576+
// @deprecated
580577
joinCall(microphoneOn?: boolean): Call | undefined;
581-
joinCallWithOptions(options?: {
582-
microphoneOn?: boolean;
583-
cameraOn?: boolean;
584-
}): Call | undefined;
578+
joinCall(options?: JoinCallOptions): Call | undefined;
585579
leaveCall(forEveryone?: boolean): Promise<void>;
586580
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
587581
mute(): Promise<void>;
@@ -1102,11 +1096,9 @@ export type Common<A, B> = Pick<A, CommonProperties<A, B>>;
11021096

11031097
// @public
11041098
export interface CommonCallAdapter extends AdapterState<CallAdapterState>, Disposable, CallAdapterCallOperations, CallAdapterDeviceManagement, CallAdapterSubscribers {
1099+
// @deprecated
11051100
joinCall(microphoneOn?: boolean): void;
1106-
joinCallWithOptions(options?: {
1107-
microphoneOn?: boolean;
1108-
cameraOn?: boolean;
1109-
}): void;
1101+
joinCall(options?: JoinCallOptions): void;
11101102
startCall(participants: string[], options?: StartCallOptions): void;
11111103
}
11121104

@@ -1856,6 +1848,12 @@ export type IsSpeakingChangedListener = (event: {
18561848
isSpeaking: boolean;
18571849
}) => void;
18581850

1851+
// @public
1852+
export interface JoinCallOptions {
1853+
cameraOn?: boolean | 'keep';
1854+
microphoneOn?: boolean | 'keep';
1855+
}
1856+
18591857
// @public
18601858
export interface JumpToNewMessageButtonProps {
18611859
onClick: () => void;

packages/react-composites/review/beta/react-composites.api.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,9 @@ export interface BaseCompositeProps<TIcons extends Record<string, JSX.Element>>
156156

157157
// @public
158158
export interface CallAdapter extends CommonCallAdapter {
159+
// @deprecated
159160
joinCall(microphoneOn?: boolean): Call | undefined;
160-
joinCallWithOptions(options?: {
161-
microphoneOn?: boolean;
162-
cameraOn?: boolean;
163-
}): Call | undefined;
161+
joinCall(options?: JoinCallOptions): Call | undefined;
164162
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
165163
// @beta
166164
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;
@@ -173,11 +171,9 @@ export type CallAdapterCallEndedEvent = {
173171

174172
// @public @deprecated
175173
export interface CallAdapterCallManagement extends CallAdapterCallOperations {
174+
// @deprecated
176175
joinCall(microphoneOn?: boolean): Call | undefined;
177-
joinCallWithOptions(options?: {
178-
microphoneOn?: boolean;
179-
cameraOn?: boolean;
180-
}): Call | undefined;
176+
joinCall(options?: JoinCallOptions): Call | undefined;
181177
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
182178
// @beta
183179
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;
@@ -575,11 +571,9 @@ export interface CallWithChatAdapterManagement {
575571
fetchInitialData(): Promise<void>;
576572
// @beta
577573
holdCall: () => Promise<void>;
574+
// @deprecated
578575
joinCall(microphoneOn?: boolean): Call | undefined;
579-
joinCallWithOptions(options?: {
580-
microphoneOn?: boolean;
581-
cameraOn?: boolean;
582-
}): Call | undefined;
576+
joinCall(options?: JoinCallOptions): Call | undefined;
583577
leaveCall(forEveryone?: boolean): Promise<void>;
584578
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
585579
mute(): Promise<void>;
@@ -1001,11 +995,9 @@ export type _ChatThreadRestError = {
1001995

1002996
// @public
1003997
export interface CommonCallAdapter extends AdapterState<CallAdapterState>, Disposable, CallAdapterCallOperations, CallAdapterDeviceManagement, CallAdapterSubscribers {
998+
// @deprecated
1004999
joinCall(microphoneOn?: boolean): void;
1005-
joinCallWithOptions(options?: {
1006-
microphoneOn?: boolean;
1007-
cameraOn?: boolean;
1008-
}): void;
1000+
joinCall(options?: JoinCallOptions): void;
10091001
startCall(participants: string[], options?: StartCallOptions): void;
10101002
// @beta
10111003
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): void;
@@ -1441,6 +1433,12 @@ export type IsSpeakingChangedListener = (event: {
14411433
isSpeaking: boolean;
14421434
}) => void;
14431435

1436+
// @public
1437+
export interface JoinCallOptions {
1438+
cameraOn?: boolean | 'keep';
1439+
microphoneOn?: boolean | 'keep';
1440+
}
1441+
14441442
// @beta
14451443
export interface LocalVideoTileOptions {
14461444
position?: 'grid' | 'floating';
@@ -1518,12 +1516,10 @@ export type TeamsAdapterOptions = CommonCallAdapterOptions;
15181516

15191517
// @beta
15201518
export interface TeamsCallAdapter extends CommonCallAdapter {
1519+
// @deprecated
15211520
joinCall(microphoneOn?: boolean): TeamsCall | undefined;
15221521
// @public
1523-
joinCallWithOptions(options?: {
1524-
microphoneOn?: boolean;
1525-
cameraOn?: boolean;
1526-
}): TeamsCall | undefined;
1522+
joinCall(options?: JoinCallOptions): TeamsCall | undefined;
15271523
startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;
15281524
startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): TeamsCall | undefined;
15291525
}

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,9 @@ export interface BaseCompositeProps<TIcons extends Record<string, JSX.Element>>
120120

121121
// @public
122122
export interface CallAdapter extends CommonCallAdapter {
123+
// @deprecated
123124
joinCall(microphoneOn?: boolean): Call | undefined;
124-
joinCallWithOptions(options?: {
125-
microphoneOn?: boolean;
126-
cameraOn?: boolean;
127-
}): Call | undefined;
125+
joinCall(options?: JoinCallOptions): Call | undefined;
128126
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
129127
}
130128

@@ -135,11 +133,9 @@ export type CallAdapterCallEndedEvent = {
135133

136134
// @public @deprecated
137135
export interface CallAdapterCallManagement extends CallAdapterCallOperations {
136+
// @deprecated
138137
joinCall(microphoneOn?: boolean): Call | undefined;
139-
joinCallWithOptions(options?: {
140-
microphoneOn?: boolean;
141-
cameraOn?: boolean;
142-
}): Call | undefined;
138+
joinCall(options?: JoinCallOptions): Call | undefined;
143139
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
144140
}
145141

@@ -392,11 +388,9 @@ export interface CallWithChatAdapterManagement {
392388
disposeScreenShareStreamView(remoteUserId: string): Promise<void>;
393389
disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;
394390
fetchInitialData(): Promise<void>;
391+
// @deprecated
395392
joinCall(microphoneOn?: boolean): Call | undefined;
396-
joinCallWithOptions(options?: {
397-
microphoneOn?: boolean;
398-
cameraOn?: boolean;
399-
}): Call | undefined;
393+
joinCall(options?: JoinCallOptions): Call | undefined;
400394
leaveCall(forEveryone?: boolean): Promise<void>;
401395
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
402396
mute(): Promise<void>;
@@ -732,11 +726,9 @@ export type _ChatThreadRestError = {
732726

733727
// @public
734728
export interface CommonCallAdapter extends AdapterState<CallAdapterState>, Disposable, CallAdapterCallOperations, CallAdapterDeviceManagement, CallAdapterSubscribers {
729+
// @deprecated
735730
joinCall(microphoneOn?: boolean): void;
736-
joinCallWithOptions(options?: {
737-
microphoneOn?: boolean;
738-
cameraOn?: boolean;
739-
}): void;
731+
joinCall(options?: JoinCallOptions): void;
740732
startCall(participants: string[], options?: StartCallOptions): void;
741733
}
742734

@@ -1001,6 +993,12 @@ export type IsSpeakingChangedListener = (event: {
1001993
isSpeaking: boolean;
1002994
}) => void;
1003995

996+
// @public
997+
export interface JoinCallOptions {
998+
cameraOn?: boolean | 'keep';
999+
microphoneOn?: boolean | 'keep';
1000+
}
1001+
10041002
// @public
10051003
export type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {
10061004
type: 'media';

packages/react-composites/src/composites/CallComposite/MockCallAdapter.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ export class MockCallAdapter implements CallAdapter {
6161
joinCall(): Call | undefined {
6262
throw Error('joinCall not implemented');
6363
}
64-
joinCallWithOptions(): Call | undefined {
65-
throw Error('joinCallWithOptions not implemented');
66-
}
6764
leaveCall(): Promise<void> {
6865
throw Error('leaveCall not implemented');
6966
}

0 commit comments

Comments
 (0)