From 6708f87c37794a4411c7a1eb2586fa996aeb7757 Mon Sep 17 00:00:00 2001 From: Porter Nan Date: Tue, 2 Nov 2021 11:43:24 -0700 Subject: [PATCH] Resolve all comments in azure review (#998) * Resovle all comments from dom in azure review https://apiview.dev/Assemblies/Review/42fe51ace1e24184a42351ff89044352 * Update packages/react-components/src/components/MessageThread.tsx Co-authored-by: Nan Jiang Co-authored-by: James Burnside <2684369+JamesBurnside@users.noreply.github.com> --- ...-2d6fa32c-8bcc-4f5f-bc3b-cf99f61fd2f7.json | 7 +++++ ...-46b853bf-8444-4209-a24b-a3d093f0f372.json | 7 +++++ ...-de669021-913e-493b-a21f-f5b50735af32.json | 7 +++++ ...-e0f7c92a-b9ea-4bce-9538-c33cb71fb8e0.json | 7 +++++ ...-e8c218c4-5ab6-4f77-ac50-c1904a3fb10a.json | 7 +++++ ...-827b3b0a-2580-4b96-a306-a82bf78e4353.json | 7 +++++ .../review/calling-component-bindings.api.md | 2 +- .../src/handlers/createHandlers.ts | 6 ++--- .../review/calling-stateful-client.api.md | 2 +- .../src/CallClientState.ts | 2 +- .../review/chat-component-bindings.api.md | 2 +- .../src/errorBarSelector.ts | 4 +-- .../src/handlers/createHandlers.ts | 4 +-- .../review/communication-react.api.md | 26 +++++++++---------- .../review/react-components.api.md | 12 ++++----- .../src/components/ChatMessageComponent.tsx | 6 ++--- .../src/components/ErrorBar.tsx | 8 +++--- .../src/components/MessageThread.tsx | 17 +++++++++--- .../src/components/ParticipantList.tsx | 12 ++++----- .../src/components/ParticipantsButton.tsx | 8 +++--- .../localization/locales/de-DE/strings.json | 4 +-- .../localization/locales/en-GB/strings.json | 4 +-- .../localization/locales/en-US/strings.json | 4 +-- .../localization/locales/es-ES/strings.json | 4 +-- .../localization/locales/fr-FR/strings.json | 4 +-- .../localization/locales/it-IT/strings.json | 4 +-- .../localization/locales/ja-JP/strings.json | 4 +-- .../localization/locales/ko-KR/strings.json | 4 +-- .../localization/locales/nl-NL/strings.json | 4 +-- .../localization/locales/pt-BR/strings.json | 4 +-- .../localization/locales/ru-RU/strings.json | 4 +-- .../localization/locales/tr-TR/strings.json | 4 +-- .../localization/locales/zh-CN/strings.json | 4 +-- .../localization/locales/zh-TW/strings.json | 4 +-- .../review/react-composites.api.md | 8 +++--- .../adapter/AzureCommunicationCallAdapter.ts | 2 +- .../CallComposite/hooks/useHandlers.ts | 2 +- .../AzureCommunicationChatAdapter.test.ts | 2 +- .../adapter/AzureCommunicationChatAdapter.ts | 6 ++--- .../ChatComposite/hooks/useHandlers.ts | 2 +- .../composites/MeetingComposite/SidePane.tsx | 4 +-- .../AzureCommunicationMeetingAdapter.ts | 6 ++--- .../tests/browser/chat/app/index.tsx | 4 +-- .../tests/browser/meeting/app/index.tsx | 6 ++--- .../CustomBehaviorExampleContainer.tsx | 2 +- .../snippets/Container.snippet.tsx | 2 +- ...ustomDataModelExampleContainer.snippet.tsx | 2 +- .../snippets/CustomizeBehavior.snippet.tsx | 2 +- .../snippets/Meeting.snippet.tsx | 2 +- .../QuickstartCompositeAdapter.snippet.tsx | 2 +- .../QuickstartCompositeComplete.snippet.tsx | 2 +- .../snippets/ChatAdapterExample.snippet.tsx | 2 +- packages/storybook/stories/controlsUtils.ts | 4 +-- .../LocalizedComposites.snippet.tsx | 2 +- samples/Chat/src/app/ChatScreen.tsx | 2 +- samples/StaticHtmlComposites/index.html | 4 +-- .../StaticHtmlComposites/src/chatComposite.js | 4 +-- 57 files changed, 167 insertions(+), 116 deletions(-) create mode 100644 change/@internal-calling-component-bindings-2d6fa32c-8bcc-4f5f-bc3b-cf99f61fd2f7.json create mode 100644 change/@internal-calling-stateful-client-46b853bf-8444-4209-a24b-a3d093f0f372.json create mode 100644 change/@internal-chat-component-bindings-de669021-913e-493b-a21f-f5b50735af32.json create mode 100644 change/@internal-react-components-e0f7c92a-b9ea-4bce-9538-c33cb71fb8e0.json create mode 100644 change/@internal-react-composites-e8c218c4-5ab6-4f77-ac50-c1904a3fb10a.json create mode 100644 change/@internal-storybook-827b3b0a-2580-4b96-a306-a82bf78e4353.json diff --git a/change/@internal-calling-component-bindings-2d6fa32c-8bcc-4f5f-bc3b-cf99f61fd2f7.json b/change/@internal-calling-component-bindings-2d6fa32c-8bcc-4f5f-bc3b-cf99f61fd2f7.json new file mode 100644 index 00000000000..dea15658170 --- /dev/null +++ b/change/@internal-calling-component-bindings-2d6fa32c-8bcc-4f5f-bc3b-cf99f61fd2f7.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Update according to azure review", + "packageName": "@internal/calling-component-bindings", + "email": "jinan@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@internal-calling-stateful-client-46b853bf-8444-4209-a24b-a3d093f0f372.json b/change/@internal-calling-stateful-client-46b853bf-8444-4209-a24b-a3d093f0f372.json new file mode 100644 index 00000000000..4afa6e1bcc2 --- /dev/null +++ b/change/@internal-calling-stateful-client-46b853bf-8444-4209-a24b-a3d093f0f372.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Update according to azure review", + "packageName": "@internal/calling-stateful-client", + "email": "jinan@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@internal-chat-component-bindings-de669021-913e-493b-a21f-f5b50735af32.json b/change/@internal-chat-component-bindings-de669021-913e-493b-a21f-f5b50735af32.json new file mode 100644 index 00000000000..414744f3fb3 --- /dev/null +++ b/change/@internal-chat-component-bindings-de669021-913e-493b-a21f-f5b50735af32.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Update according to azure review", + "packageName": "@internal/chat-component-bindings", + "email": "jinan@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@internal-react-components-e0f7c92a-b9ea-4bce-9538-c33cb71fb8e0.json b/change/@internal-react-components-e0f7c92a-b9ea-4bce-9538-c33cb71fb8e0.json new file mode 100644 index 00000000000..913d4aa28f8 --- /dev/null +++ b/change/@internal-react-components-e0f7c92a-b9ea-4bce-9538-c33cb71fb8e0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Update according to azure review", + "packageName": "@internal/react-components", + "email": "jinan@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@internal-react-composites-e8c218c4-5ab6-4f77-ac50-c1904a3fb10a.json b/change/@internal-react-composites-e8c218c4-5ab6-4f77-ac50-c1904a3fb10a.json new file mode 100644 index 00000000000..4de9ed86502 --- /dev/null +++ b/change/@internal-react-composites-e8c218c4-5ab6-4f77-ac50-c1904a3fb10a.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Update according to azure review", + "packageName": "@internal/react-composites", + "email": "jinan@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@internal-storybook-827b3b0a-2580-4b96-a306-a82bf78e4353.json b/change/@internal-storybook-827b3b0a-2580-4b96-a306-a82bf78e4353.json new file mode 100644 index 00000000000..ff062b761e7 --- /dev/null +++ b/change/@internal-storybook-827b3b0a-2580-4b96-a306-a82bf78e4353.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Update according to azure review", + "packageName": "@internal/storybook", + "email": "jinan@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/calling-component-bindings/review/calling-component-bindings.api.md b/packages/calling-component-bindings/review/calling-component-bindings.api.md index 4ac83fff1e1..edd543c4b7b 100644 --- a/packages/calling-component-bindings/review/calling-component-bindings.api.md +++ b/packages/calling-component-bindings/review/calling-component-bindings.api.md @@ -80,7 +80,7 @@ export type CallingHandlers = { onHangUp: () => Promise; onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise; onCreateRemoteStreamView: (userId: string, options?: VideoStreamOptions) => Promise; - onParticipantRemove: (userId: string) => Promise; + onRemoveParticipant: (userId: string) => Promise; onDisposeRemoteStreamView: (userId: string) => Promise; onDisposeLocalStreamView: () => Promise; }; diff --git a/packages/calling-component-bindings/src/handlers/createHandlers.ts b/packages/calling-component-bindings/src/handlers/createHandlers.ts index c8be84f9512..0744a4134f1 100644 --- a/packages/calling-component-bindings/src/handlers/createHandlers.ts +++ b/packages/calling-component-bindings/src/handlers/createHandlers.ts @@ -42,7 +42,7 @@ export type CallingHandlers = { onHangUp: () => Promise; onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise; onCreateRemoteStreamView: (userId: string, options?: VideoStreamOptions) => Promise; - onParticipantRemove: (userId: string) => Promise; + onRemoveParticipant: (userId: string) => Promise; onDisposeRemoteStreamView: (userId: string) => Promise; onDisposeLocalStreamView: () => Promise; }; @@ -284,7 +284,7 @@ export const createDefaultCallingHandlers = memoizeOne( await disposeAllLocalPreviewViews(callClient); }; - const onParticipantRemove = async (userId: string): Promise => { + const onRemoveParticipant = async (userId: string): Promise => { await call?.removeParticipant(fromFlatCommunicationIdentifier(userId)); }; @@ -301,7 +301,7 @@ export const createDefaultCallingHandlers = memoizeOne( onToggleScreenShare, onCreateLocalStreamView, onCreateRemoteStreamView, - onParticipantRemove, + onRemoveParticipant, onStartLocalVideo, onDisposeRemoteStreamView, onDisposeLocalStreamView diff --git a/packages/calling-stateful-client/review/calling-stateful-client.api.md b/packages/calling-stateful-client/review/calling-stateful-client.api.md index 59da5f76285..0f7d1d27b72 100644 --- a/packages/calling-stateful-client/review/calling-stateful-client.api.md +++ b/packages/calling-stateful-client/review/calling-stateful-client.api.md @@ -127,7 +127,7 @@ export interface DiagnosticsCallFeatureState { export interface IncomingCallState { callEndReason?: CallEndReason; callerInfo: CallerInfo; - endTime: Date | undefined; + endTime?: Date; id: string; startTime: Date; } diff --git a/packages/calling-stateful-client/src/CallClientState.ts b/packages/calling-stateful-client/src/CallClientState.ts index 35a1ceea1c2..da72e241445 100644 --- a/packages/calling-stateful-client/src/CallClientState.ts +++ b/packages/calling-stateful-client/src/CallClientState.ts @@ -368,7 +368,7 @@ export interface IncomingCallState { * Stores the local date when the call ended on the client. This property is added by the stateful layer and is not a * proxy of SDK state. It is undefined if the call is not ended yet. */ - endTime: Date | undefined; + endTime?: Date; } /** diff --git a/packages/chat-component-bindings/review/chat-component-bindings.api.md b/packages/chat-component-bindings/review/chat-component-bindings.api.md index 9333e722f1d..76c85063f89 100644 --- a/packages/chat-component-bindings/review/chat-component-bindings.api.md +++ b/packages/chat-component-bindings/review/chat-component-bindings.api.md @@ -41,7 +41,7 @@ export type ChatHandlers = { onSendMessage: (content: string) => Promise; onMessageSeen: (chatMessageId: string) => Promise; onTyping: () => Promise; - onParticipantRemove: (userId: string) => Promise; + onRemoveParticipant: (userId: string) => Promise; updateThreadTopicName: (topicName: string) => Promise; onLoadPreviousChatMessages: (messagesToLoad: number) => Promise; onUpdateMessage: (messageId: string, content: string) => Promise; diff --git a/packages/chat-component-bindings/src/errorBarSelector.ts b/packages/chat-component-bindings/src/errorBarSelector.ts index 19847fc5478..67152580144 100644 --- a/packages/chat-component-bindings/src/errorBarSelector.ts +++ b/packages/chat-component-bindings/src/errorBarSelector.ts @@ -61,7 +61,7 @@ export const errorBarSelector: ErrorBarSelector = createSelector( if (error !== undefined) { if (sendMessageError !== undefined) { activeErrorMessages.push({ - type: 'sendMessageNotInThisThread', + type: 'sendMessageNotInChatThread', // Set the latest timestamp of all the errors that translated to an active error. timestamp: sendMessageError.timestamp > (error.timestamp ?? 0) ? sendMessageError.timestamp : error.timestamp @@ -106,7 +106,7 @@ const latestAccessDeniedError = (latestErrors: ChatErrors): ActiveErrorMessage | }; const latestNotInThisThreadError = (latestErrors: ChatErrors): ActiveErrorMessage | undefined => { - return latestActiveErrorSatisfying(latestErrors, 'userNotInThisThread', (error: ChatError): boolean => { + return latestActiveErrorSatisfying(latestErrors, 'userNotInChatThread', (error: ChatError): boolean => { if (!error || !error.innerError) { return false; } diff --git a/packages/chat-component-bindings/src/handlers/createHandlers.ts b/packages/chat-component-bindings/src/handlers/createHandlers.ts index d7f6339f230..98cd078e157 100644 --- a/packages/chat-component-bindings/src/handlers/createHandlers.ts +++ b/packages/chat-component-bindings/src/handlers/createHandlers.ts @@ -20,7 +20,7 @@ export type ChatHandlers = { onSendMessage: (content: string) => Promise; onMessageSeen: (chatMessageId: string) => Promise; onTyping: () => Promise; - onParticipantRemove: (userId: string) => Promise; + onRemoveParticipant: (userId: string) => Promise; updateThreadTopicName: (topicName: string) => Promise; onLoadPreviousChatMessages: (messagesToLoad: number) => Promise; onUpdateMessage: (messageId: string, content: string) => Promise; @@ -61,7 +61,7 @@ export const createDefaultChatHandlers = memoizeOne( onTyping: async () => { await chatThreadClient.sendTypingNotification(); }, - onParticipantRemove: async (userId: string) => { + onRemoveParticipant: async (userId: string) => { await chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId)); }, updateThreadTopicName: async (topicName: string) => { diff --git a/packages/communication-react/review/communication-react.api.md b/packages/communication-react/review/communication-react.api.md index bd97b2e7101..55cde59f22f 100644 --- a/packages/communication-react/review/communication-react.api.md +++ b/packages/communication-react/review/communication-react.api.md @@ -126,7 +126,7 @@ export type AzureCommunicationCallAdapterArgs = { // @public export type AzureCommunicationChatAdapterArgs = { - endpointUrl: string; + endpoint: string; userId: CommunicationUserIdentifier; displayName: string; credential: CommunicationTokenCredential; @@ -135,7 +135,7 @@ export type AzureCommunicationChatAdapterArgs = { // @alpha export type AzureCommunicationMeetingAdapterArgs = { - endpointUrl: string; + endpoint: string; userId: CommunicationUserIdentifier; displayName: string; credential: CommunicationTokenCredential; @@ -409,7 +409,7 @@ export type CallingHandlers = { onHangUp: () => Promise; onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise; onCreateRemoteStreamView: (userId: string, options?: VideoStreamOptions) => Promise; - onParticipantRemove: (userId: string) => Promise; + onRemoveParticipant: (userId: string) => Promise; onDisposeRemoteStreamView: (userId: string) => Promise; onDisposeLocalStreamView: () => Promise; }; @@ -624,7 +624,7 @@ export type ChatHandlers = { onSendMessage: (content: string) => Promise; onMessageSeen: (chatMessageId: string) => Promise; onTyping: () => Promise; - onParticipantRemove: (userId: string) => Promise; + onRemoveParticipant: (userId: string) => Promise; updateThreadTopicName: (topicName: string) => Promise; onLoadPreviousChatMessages: (messagesToLoad: number) => Promise; onUpdateMessage: (messageId: string, content: string) => Promise; @@ -906,13 +906,13 @@ export const createAzureCommunicationCallAdapter: ({ userId, displayName, creden export const createAzureCommunicationCallAdapterFromClient: (callClient: StatefulCallClient, callAgent: CallAgent, locator: TeamsMeetingLinkLocator | GroupCallLocator) => Promise; // @public -export const createAzureCommunicationChatAdapter: ({ endpointUrl, userId, displayName, credential, threadId }: AzureCommunicationChatAdapterArgs) => Promise; +export const createAzureCommunicationChatAdapter: ({ endpoint: endpointUrl, userId, displayName, credential, threadId }: AzureCommunicationChatAdapterArgs) => Promise; // @public export const createAzureCommunicationChatAdapterFromClient: (chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient) => Promise; // @alpha -export const createAzureCommunicationMeetingAdapter: ({ userId, displayName, credential, endpointUrl, chatThreadId, callLocator }: AzureCommunicationMeetingAdapterArgs) => Promise; +export const createAzureCommunicationMeetingAdapter: ({ userId, displayName, credential, endpoint, chatThreadId, callLocator }: AzureCommunicationMeetingAdapterArgs) => Promise; // @public export const createDefaultCallingHandlers: (callClient: StatefulCallClient, callAgent: CallAgent | undefined, deviceManager: StatefulDeviceManager | undefined, call: Call | undefined) => CallingHandlers; @@ -1113,14 +1113,14 @@ export interface ErrorBarStrings { callNoSpeakerFound: string; muteGeneric: string; sendMessageGeneric: string; - sendMessageNotInThisThread: string; + sendMessageNotInChatThread: string; startScreenShareGeneric: string; startVideoGeneric: string; stopScreenShareGeneric: string; stopVideoGeneric: string; unableToReachChatService: string; unmuteGeneric: string; - userNotInThisThread: string; + userNotInChatThread: string; } // @public @@ -1191,7 +1191,7 @@ export interface _Identifiers { export interface IncomingCallState { callEndReason?: CallEndReason; callerInfo: CallerInfo; - endTime: Date | undefined; + endTime?: Date; id: string; startTime: Date; } @@ -1403,7 +1403,7 @@ export type MessageProps = { strings: MessageThreadStrings; messageContainerStyle?: ComponentSlotStyle; showDate?: boolean; - editDisabled?: boolean; + disableEditing?: boolean; onUpdateMessage?: (messageId: string, content: string) => Promise; onDeleteMessage?: (messageId: string) => Promise; }; @@ -1466,7 +1466,7 @@ export type MessageThreadProps = { onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element; onUpdateMessage?: (messageId: string, content: string) => Promise; onDeleteMessage?: (messageId: string) => Promise; - editDisabled?: boolean; + disableEditing?: boolean; strings?: Partial; }; @@ -1660,7 +1660,7 @@ export type ParticipantListProps = { excludeMe?: boolean; onRenderParticipant?: (participant: CommunicationParticipant) => JSX.Element | null; onRenderAvatar?: OnRenderAvatarCallback; - onParticipantRemove?: (userId: string) => void; + onRemoveParticipant?: (userId: string) => void; onFetchParticipantMenuItems?: ParticipantMenuItemsCallback; styles?: ParticipantListStyles; }; @@ -1709,7 +1709,7 @@ export interface ParticipantsButtonProps extends ControlBarButtonProps { myUserId?: string; onFetchParticipantMenuItems?: ParticipantMenuItemsCallback; onMuteAll?: () => void; - onParticipantRemove?: (userId: string) => void; + onRemoveParticipant?: (userId: string) => void; onRenderAvatar?: OnRenderAvatarCallback; onRenderParticipant?: (participant: CommunicationParticipant) => JSX.Element | null; onRenderParticipantList?: (props: ParticipantListProps) => JSX.Element | null; diff --git a/packages/react-components/review/react-components.api.md b/packages/react-components/review/react-components.api.md index 2779c496c29..fde7b810649 100644 --- a/packages/react-components/review/react-components.api.md +++ b/packages/react-components/review/react-components.api.md @@ -317,14 +317,14 @@ export interface ErrorBarStrings { callNoSpeakerFound: string; muteGeneric: string; sendMessageGeneric: string; - sendMessageNotInThisThread: string; + sendMessageNotInChatThread: string; startScreenShareGeneric: string; startVideoGeneric: string; stopScreenShareGeneric: string; stopVideoGeneric: string; unableToReachChatService: string; unmuteGeneric: string; - userNotInThisThread: string; + userNotInChatThread: string; } // @public @@ -425,7 +425,7 @@ export type MessageProps = { strings: MessageThreadStrings; messageContainerStyle?: ComponentSlotStyle; showDate?: boolean; - editDisabled?: boolean; + disableEditing?: boolean; onUpdateMessage?: (messageId: string, content: string) => Promise; onDeleteMessage?: (messageId: string) => Promise; }; @@ -471,7 +471,7 @@ export type MessageThreadProps = { onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element; onUpdateMessage?: (messageId: string, content: string) => Promise; onDeleteMessage?: (messageId: string) => Promise; - editDisabled?: boolean; + disableEditing?: boolean; strings?: Partial; }; @@ -631,7 +631,7 @@ export type ParticipantListProps = { excludeMe?: boolean; onRenderParticipant?: (participant: CommunicationParticipant) => JSX.Element | null; onRenderAvatar?: OnRenderAvatarCallback; - onParticipantRemove?: (userId: string) => void; + onRemoveParticipant?: (userId: string) => void; onFetchParticipantMenuItems?: ParticipantMenuItemsCallback; styles?: ParticipantListStyles; }; @@ -668,7 +668,7 @@ export interface ParticipantsButtonProps extends ControlBarButtonProps { myUserId?: string; onFetchParticipantMenuItems?: ParticipantMenuItemsCallback; onMuteAll?: () => void; - onParticipantRemove?: (userId: string) => void; + onRemoveParticipant?: (userId: string) => void; onRenderAvatar?: OnRenderAvatarCallback; onRenderParticipant?: (participant: CommunicationParticipant) => JSX.Element | null; onRenderParticipantList?: (props: ParticipantListProps) => JSX.Element | null; diff --git a/packages/react-components/src/components/ChatMessageComponent.tsx b/packages/react-components/src/components/ChatMessageComponent.tsx index b3094044c3a..75e7968a5cf 100644 --- a/packages/react-components/src/components/ChatMessageComponent.tsx +++ b/packages/react-components/src/components/ChatMessageComponent.tsx @@ -27,7 +27,7 @@ type ChatMessageProps = { message: ChatMessage; messageContainerStyle?: ComponentSlotStyle; showDate?: boolean; - editDisabled?: boolean; + disableEditing?: boolean; onUpdateMessage?: (messageId: string, content: string) => Promise; onDeleteMessage?: (messageId: string) => Promise; strings: MessageThreadStrings; @@ -95,7 +95,7 @@ export const ChatMessageComponent = (props: ChatMessageProps): JSX.Element => { const ids = useIdentifiers(); const theme = useTheme(); - const { message, onUpdateMessage, onDeleteMessage, editDisabled, showDate, messageContainerStyle, strings } = props; + const { message, onUpdateMessage, onDeleteMessage, disableEditing, showDate, messageContainerStyle, strings } = props; const [isEditing, setIsEditing] = useState(false); const menuClass = mergeStyles(chatActionsCSS, { @@ -170,7 +170,7 @@ export const ChatMessageComponent = (props: ChatMessageProps): JSX.Element => { message.editedOn ?
{strings.editedTag}
: undefined } positionActionMenu={false} - actionMenu={!editDisabled && message.status !== 'sending' && message.mine ? actionMenu : undefined} + actionMenu={!disableEditing && message.status !== 'sending' && message.mine ? actionMenu : undefined} /> ); }; diff --git a/packages/react-components/src/components/ErrorBar.tsx b/packages/react-components/src/components/ErrorBar.tsx index a90727b0dbe..581f978cc84 100644 --- a/packages/react-components/src/components/ErrorBar.tsx +++ b/packages/react-components/src/components/ErrorBar.tsx @@ -49,14 +49,14 @@ export interface ErrorBarStrings { /** * User is no longer on the thread. * - * See also: {@link ErrorBarStrings.sendMessageNotInThisThread} for a more specific error. + * See also: {@link ErrorBarStrings.sendMessageNotInChatThread} for a more specific error. */ - userNotInThisThread: string; + userNotInChatThread: string; /** * Sending message failed because user is no longer on the thread. */ - sendMessageNotInThisThread: string; + sendMessageNotInChatThread: string; /** * A generic message when sending message fails. @@ -180,7 +180,7 @@ export interface ActiveErrorMessage { * * This component internally tracks dismissed by the user. * * Errors that have an associated timestamp: The error is shown on the UI again if it occurs after being dismissed. - * * Errors that do not have a timestamp: The error is dismissed until it dissappears from the props. + * * Errors that do not have a timestamp: The error is dismissed until it disappears from the props. * If the error recurs, it is shown in the UI. * * Uses {@link @fluentui/react#MessageBar} UI element. diff --git a/packages/react-components/src/components/MessageThread.tsx b/packages/react-components/src/components/MessageThread.tsx index 642cef871d5..02fe7e36d9f 100644 --- a/packages/react-components/src/components/MessageThread.tsx +++ b/packages/react-components/src/components/MessageThread.tsx @@ -511,9 +511,14 @@ export type MessageThreadProps = { onDeleteMessage?: (messageId: string) => Promise; /** - * Whether disable the editing feature, false by default + /** + * Disable editing messages. + * + * @remarks This removes the action menu on messages. + * + * @defaultValue `false` */ - editDisabled?: boolean; + disableEditing?: boolean; /** * Optional strings to override in component @@ -548,9 +553,13 @@ export type MessageProps = { */ showDate?: boolean; /** - * Whether edit feature is disabled or not + * Disable editing messages. + * + * @remarks This removes the action menu on messages. + * + * @defaultValue `false` */ - editDisabled?: boolean; + disableEditing?: boolean; /** * Optional callback to edit a message. * diff --git a/packages/react-components/src/components/ParticipantList.tsx b/packages/react-components/src/components/ParticipantList.tsx index 63bd75fc0c2..2074d4ffd82 100644 --- a/packages/react-components/src/components/ParticipantList.tsx +++ b/packages/react-components/src/components/ParticipantList.tsx @@ -69,7 +69,7 @@ export type ParticipantListProps = { /** Optional callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned. */ onRenderAvatar?: OnRenderAvatarCallback; /** Optional callback to render the context menu for each participant */ - onParticipantRemove?: (userId: string) => void; + onRemoveParticipant?: (userId: string) => void; /** Optional callback to render custom menu items for each participant. */ onFetchParticipantMenuItems?: ParticipantMenuItemsCallback; /** Styles for the {@link ParticipantList} */ @@ -80,7 +80,7 @@ const onRenderParticipantDefault = ( participant: CommunicationParticipant, strings: ParticipantItemStrings, myUserId?: string, - onParticipantRemove?: (userId: string) => void, + onRemoveParticipant?: (userId: string) => void, onRenderAvatar?: OnRenderAvatarCallback, createParticipantMenuItems?: (participant: CommunicationParticipant) => IContextualMenuItem[], styles?: ParticipantListItemStyles @@ -168,7 +168,7 @@ export const ParticipantList = (props: ParticipantListProps): JSX.Element => { excludeMe = false, myUserId, participants, - onParticipantRemove, + onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems @@ -183,11 +183,11 @@ export const ParticipantList = (props: ParticipantListProps): JSX.Element => { const createParticipantMenuItems = (participant): IContextualMenuItem[] => { let menuItems: IContextualMenuItem[] = []; - if (participant.userId !== myUserId && onParticipantRemove) { + if (participant.userId !== myUserId && onRemoveParticipant) { menuItems.push({ key: 'remove', text: strings.removeButtonLabel, - onClick: () => onParticipantRemove(participant.userId), + onClick: () => onRemoveParticipant(participant.userId), itemProps: { styles: props.styles?.participantItemStyles?.participantSubMenuItemsStyles }, @@ -212,7 +212,7 @@ export const ParticipantList = (props: ParticipantListProps): JSX.Element => { participant, strings, myUserId, - onParticipantRemove, + onRemoveParticipant, onRenderAvatar, createParticipantMenuItems, participantItemStyles diff --git a/packages/react-components/src/components/ParticipantsButton.tsx b/packages/react-components/src/components/ParticipantsButton.tsx index 2ec5c1c8ae6..4c54585a063 100644 --- a/packages/react-components/src/components/ParticipantsButton.tsx +++ b/packages/react-components/src/components/ParticipantsButton.tsx @@ -107,7 +107,7 @@ export interface ParticipantsButtonProps extends ControlBarButtonProps { /** * Callback to render the context menu for each participant */ - onParticipantRemove?: (userId: string) => void; + onRemoveParticipant?: (userId: string) => void; /** * Callback to render custom menu items for each participant. */ @@ -165,7 +165,7 @@ export const ParticipantsButton = (props: ParticipantsButtonProps): JSX.Element excludeMe, onRenderParticipant, onRenderAvatar, - onParticipantRemove, + onRemoveParticipant, onFetchParticipantMenuItems } = props; @@ -185,7 +185,7 @@ export const ParticipantsButton = (props: ParticipantsButtonProps): JSX.Element excludeMe={excludeMe} onRenderParticipant={onRenderParticipant} onRenderAvatar={onRenderAvatar} - onParticipantRemove={onParticipantRemove} + onRemoveParticipant={onRemoveParticipant} onFetchParticipantMenuItems={onFetchParticipantMenuItems} styles={merge(defaultParticipantListContainerStyle, styles?.menuStyles?.participantListStyles)} /> @@ -193,7 +193,7 @@ export const ParticipantsButton = (props: ParticipantsButtonProps): JSX.Element }, [ excludeMe, myUserId, - onParticipantRemove, + onRemoveParticipant, onRenderAvatar, onRenderParticipant, participants, diff --git a/packages/react-components/src/localization/locales/de-DE/strings.json b/packages/react-components/src/localization/locales/de-DE/strings.json index 07728768780..7204367f1b3 100644 --- a/packages/react-components/src/localization/locales/de-DE/strings.json +++ b/packages/react-components/src/localization/locales/de-DE/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "Sie sind offline.", "accessDenied": "Auf die Chatdienste kann nicht zugegriffen werden. Überprüfen Sie die angegebenen Benutzeranmeldeinformationen.", - "userNotInThisThread": "Sie sind nicht mehr in diesem Chatthread vertreten.", - "sendMessageNotInThisThread": "Fehler beim Senden der Nachricht, weil Sie sich nicht mehr in diesem Chatthread befinden.", + "userNotInChatThread": "Sie sind nicht mehr in diesem Chatthread vertreten.", + "sendMessageNotInChatThread": "Fehler beim Senden der Nachricht, weil Sie sich nicht mehr in diesem Chatthread befinden.", "sendMessageGeneric": "Fehler beim Senden der Nachricht", "callingNetworkFailure": "Problematische Anrufverbindung – Sie scheinen offline zu sein", "startVideoGeneric": "Video konnte nicht gestartet werden", diff --git a/packages/react-components/src/localization/locales/en-GB/strings.json b/packages/react-components/src/localization/locales/en-GB/strings.json index 7d8e863f06d..57853207035 100644 --- a/packages/react-components/src/localization/locales/en-GB/strings.json +++ b/packages/react-components/src/localization/locales/en-GB/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "You are offline", "accessDenied": "Unable to access chat services - please check the user credentials provided", - "userNotInThisThread": "You are no longer in this chat thread", - "sendMessageNotInThisThread": "Failed to send message because you are no longer in this chat thread", + "userNotInChatThread": "You are no longer in this chat thread", + "sendMessageNotInChatThread": "Failed to send message because you are no longer in this chat thread", "sendMessageGeneric": "Failed to send message", "callingNetworkFailure": "Troubling connecting call - you seem to be offline", "startVideoGeneric": "Failed to start video", diff --git a/packages/react-components/src/localization/locales/en-US/strings.json b/packages/react-components/src/localization/locales/en-US/strings.json index 949c52d8480..e74f2946f5e 100644 --- a/packages/react-components/src/localization/locales/en-US/strings.json +++ b/packages/react-components/src/localization/locales/en-US/strings.json @@ -77,8 +77,8 @@ "errorBar": { "unableToReachChatService": "You are offline", "accessDenied": "Unable to access chat services - please check the user credentials provided", - "userNotInThisThread": "You are no longer in this chat thread", - "sendMessageNotInThisThread": "Failed to send message because you are no longer in this chat thread", + "userNotInChatThread": "You are no longer in this chat thread", + "sendMessageNotInChatThread": "Failed to send message because you are no longer in this chat thread", "sendMessageGeneric": "Failed to send message", "callingNetworkFailure": "Troubling connecting call - you seem to be offline", "startVideoGeneric": "Failed to start video", diff --git a/packages/react-components/src/localization/locales/es-ES/strings.json b/packages/react-components/src/localization/locales/es-ES/strings.json index 3091ba8b061..3ef88937b5d 100644 --- a/packages/react-components/src/localization/locales/es-ES/strings.json +++ b/packages/react-components/src/localization/locales/es-ES/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "Sin conexión", "accessDenied": "No se puede acceder a los servicios de chat. Compruebe las credenciales de usuario proporcionadas.", - "userNotInThisThread": "Ya no está en este hilo de chat", - "sendMessageNotInThisThread": "No se pudo enviar el mensaje porque ya no está en este hilo de chat", + "userNotInChatThread": "Ya no está en este hilo de chat", + "sendMessageNotInChatThread": "No se pudo enviar el mensaje porque ya no está en este hilo de chat", "sendMessageGeneric": "Error al enviar el mensaje", "callingNetworkFailure": "Problema al conectar la llamada; parece que no hay conexión", "startVideoGeneric": "No se pudo iniciar el vídeo", diff --git a/packages/react-components/src/localization/locales/fr-FR/strings.json b/packages/react-components/src/localization/locales/fr-FR/strings.json index a2e95720408..d1cfee2e000 100644 --- a/packages/react-components/src/localization/locales/fr-FR/strings.json +++ b/packages/react-components/src/localization/locales/fr-FR/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "Vous êtes hors connexion", "accessDenied": "Impossible d’accéder aux services de conversation. Vérifiez les informations d’identification de l’utilisateur fournies", - "userNotInThisThread": "Vous n’est plus dans ce thread de conversation", - "sendMessageNotInThisThread": "Échec de l’envoi du message car vous n’êtes plus dans ce thread de conversation", + "userNotInChatThread": "Vous n’est plus dans ce thread de conversation", + "sendMessageNotInChatThread": "Échec de l’envoi du message car vous n’êtes plus dans ce thread de conversation", "sendMessageGeneric": "Échec de l’envoi du message", "callingNetworkFailure": "Perturbation de l’appel de connexion : vous semblez être hors connexion", "startVideoGeneric": "Échec du démarrage de la vidéo", diff --git a/packages/react-components/src/localization/locales/it-IT/strings.json b/packages/react-components/src/localization/locales/it-IT/strings.json index 6954241e4e8..2bdc936d4a6 100644 --- a/packages/react-components/src/localization/locales/it-IT/strings.json +++ b/packages/react-components/src/localization/locales/it-IT/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "Sei offline", "accessDenied": "Non è possibile accedere ai servizi di chat. Controllare le credenziali utente specificate", - "userNotInThisThread": "Non fai più parte di questo thread di chat", - "sendMessageNotInThisThread": "Non è stato possibile inviare il messaggio perché non sei più in questo thread di chat", + "userNotInChatThread": "Non fai più parte di questo thread di chat", + "sendMessageNotInChatThread": "Non è stato possibile inviare il messaggio perché non sei più in questo thread di chat", "sendMessageGeneric": "Impossibile inviare il messaggio", "callingNetworkFailure": "Problema di connessione della chiamata: sembra che tu sia offline", "startVideoGeneric": "Non è stato possibile avviare il video", diff --git a/packages/react-components/src/localization/locales/ja-JP/strings.json b/packages/react-components/src/localization/locales/ja-JP/strings.json index f7e625be5da..b585ff3b7a6 100644 --- a/packages/react-components/src/localization/locales/ja-JP/strings.json +++ b/packages/react-components/src/localization/locales/ja-JP/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "オフラインです", "accessDenied": "チャット サービスにアクセスできません- 指定されたユーザー資格情報をご確認ください", - "userNotInThisThread": "このチャット スレッドにはもう参加していません", - "sendMessageNotInThisThread": "このチャット スレッドに参加していないため、メッセージを送信できませんでした", + "userNotInChatThread": "このチャット スレッドにはもう参加していません", + "sendMessageNotInChatThread": "このチャット スレッドに参加していないため、メッセージを送信できませんでした", "sendMessageGeneric": "メッセージを送信できませんでした。", "callingNetworkFailure": "通話の接続中に問題が発生しました。オフラインのようです。", "startVideoGeneric": "ビデオを開始できませんでした", diff --git a/packages/react-components/src/localization/locales/ko-KR/strings.json b/packages/react-components/src/localization/locales/ko-KR/strings.json index 738a28265d4..601e0589791 100644 --- a/packages/react-components/src/localization/locales/ko-KR/strings.json +++ b/packages/react-components/src/localization/locales/ko-KR/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "오프라인 상태입니다.", "accessDenied": "채팅 서비스에 액세스할 수 없습니다. 제공된 사용자 자격 증명을 확인하세요.", - "userNotInThisThread": "이 채팅 스레드에 더 이상 없습니다.", - "sendMessageNotInThisThread": "이 채팅 스레드에 더 이상 존재하지 않으므로 메시지를 보내지 못했습니다.", + "userNotInChatThread": "이 채팅 스레드에 더 이상 없습니다.", + "sendMessageNotInChatThread": "이 채팅 스레드에 더 이상 존재하지 않으므로 메시지를 보내지 못했습니다.", "sendMessageGeneric": "메시지를 보내지 못했습니다", "callingNetworkFailure": "통화 연결 중 - 오프라인 상태인 것 같습니다.", "startVideoGeneric": "비디오를 시작하지 못함", diff --git a/packages/react-components/src/localization/locales/nl-NL/strings.json b/packages/react-components/src/localization/locales/nl-NL/strings.json index 6703588e064..21989c3c6b4 100644 --- a/packages/react-components/src/localization/locales/nl-NL/strings.json +++ b/packages/react-components/src/localization/locales/nl-NL/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "U bent offline", "accessDenied": "Kan geen toegang krijgen tot chatservices. Controleer de opgegeven gebruikersreferenties", - "userNotInThisThread": "U bent niet meer aanwezig in deze chatthread", - "sendMessageNotInThisThread": "Verzenden van bericht is mislukt omdat u zich niet meer in deze chatthread bevindt", + "userNotInChatThread": "U bent niet meer aanwezig in deze chatthread", + "sendMessageNotInChatThread": "Verzenden van bericht is mislukt omdat u zich niet meer in deze chatthread bevindt", "sendMessageGeneric": "Kan bericht niet verzenden", "callingNetworkFailure": "Er zijn problemen met het verbinden van een gesprek - Het lijkt erop dat u offline bent", "startVideoGeneric": "Kan video niet starten", diff --git a/packages/react-components/src/localization/locales/pt-BR/strings.json b/packages/react-components/src/localization/locales/pt-BR/strings.json index 86c27a5ac08..be07d068403 100644 --- a/packages/react-components/src/localization/locales/pt-BR/strings.json +++ b/packages/react-components/src/localization/locales/pt-BR/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "Você está offline", "accessDenied": "Não é possível acessar os serviços de chat - verifique as credenciais do usuário fornecidas", - "userNotInThisThread": "Você não está mais neste tópico de chat", - "sendMessageNotInThisThread": "Falha ao enviar mensagem porque você não está mais neste thread de chat", + "userNotInChatThread": "Você não está mais neste tópico de chat", + "sendMessageNotInChatThread": "Falha ao enviar mensagem porque você não está mais neste thread de chat", "sendMessageGeneric": "Falha ao enviar mensagem", "callingNetworkFailure": "Chamada de conexão desabilitar - parece que você está offline", "startVideoGeneric": "Falha ao iniciar o vídeo", diff --git a/packages/react-components/src/localization/locales/ru-RU/strings.json b/packages/react-components/src/localization/locales/ru-RU/strings.json index a77baf2c81c..c741ebd4bbe 100644 --- a/packages/react-components/src/localization/locales/ru-RU/strings.json +++ b/packages/react-components/src/localization/locales/ru-RU/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "Вы не в сети", "accessDenied": "Не удалось получить доступ к службам чата. Проверьте предоставленные учетные данные пользователя", - "userNotInThisThread": "Вы больше не находитесь в цепочке этого чата", - "sendMessageNotInThisThread": "Не удалось отправить сообщение, так как вы больше не находитесь в цепочке этого чата", + "userNotInChatThread": "Вы больше не находитесь в цепочке этого чата", + "sendMessageNotInChatThread": "Не удалось отправить сообщение, так как вы больше не находитесь в цепочке этого чата", "sendMessageGeneric": "Не удалось отправить сообщение", "callingNetworkFailure": "Тревожное подключение вызова — кажется, вы не в сети", "startVideoGeneric": "Не удалось запустить видео", diff --git a/packages/react-components/src/localization/locales/tr-TR/strings.json b/packages/react-components/src/localization/locales/tr-TR/strings.json index c5ec0aa76f1..f64fddd99be 100644 --- a/packages/react-components/src/localization/locales/tr-TR/strings.json +++ b/packages/react-components/src/localization/locales/tr-TR/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "Çevrimdışısınız", "accessDenied": "Sohbet hizmetlerine erişilemedi. Lütfen sağlanan kullanıcı kimlik bilgilerini denetleyin", - "userNotInThisThread": "Artık bu sohbet yazışması içinde değilsiniz", - "sendMessageNotInThisThread": "Artık bu sohbet yazışması içinde olmadığınız için ileti gönderilemedi", + "userNotInChatThread": "Artık bu sohbet yazışması içinde değilsiniz", + "sendMessageNotInChatThread": "Artık bu sohbet yazışması içinde olmadığınız için ileti gönderilemedi", "sendMessageGeneric": "İleti gönderilemedi", "callingNetworkFailure": "Arama bağlanırken sorun oluştu; çevrimdışı görünüyorsunuz", "startVideoGeneric": "Video başlatılamadı", diff --git a/packages/react-components/src/localization/locales/zh-CN/strings.json b/packages/react-components/src/localization/locales/zh-CN/strings.json index 89c26f382c6..58d52db6ac5 100644 --- a/packages/react-components/src/localization/locales/zh-CN/strings.json +++ b/packages/react-components/src/localization/locales/zh-CN/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "你已脱机", "accessDenied": "无法访问聊天服务 - 请检查提供的用户凭据", - "userNotInThisThread": "你不再处于此聊天会话中", - "sendMessageNotInThisThread": "无法发送消息,因为你不再在此聊天会话中", + "userNotInChatThread": "你不再处于此聊天会话中", + "sendMessageNotInChatThread": "无法发送消息,因为你不再在此聊天会话中", "sendMessageGeneric": "未能发送消息", "callingNetworkFailure": "正在连接呼叫 - 你似乎处于脱机状态", "startVideoGeneric": "无法启动视频", diff --git a/packages/react-components/src/localization/locales/zh-TW/strings.json b/packages/react-components/src/localization/locales/zh-TW/strings.json index 5002cbe2dde..808d847a7ae 100644 --- a/packages/react-components/src/localization/locales/zh-TW/strings.json +++ b/packages/react-components/src/localization/locales/zh-TW/strings.json @@ -66,8 +66,8 @@ "errorBar": { "unableToReachChatService": "您處於離線狀態", "accessDenied": "無法存取聊天服務 - 請檢查提供的使用者認證", - "userNotInThisThread": "您已不在此聊天對話中", - "sendMessageNotInThisThread": "無法傳送訊息,因為您已不在此聊天對話中", + "userNotInChatThread": "您已不在此聊天對話中", + "sendMessageNotInChatThread": "無法傳送訊息,因為您已不在此聊天對話中", "sendMessageGeneric": "無法傳送訊息", "callingNetworkFailure": "連線通話發生錯誤 - 您似乎已離線", "startVideoGeneric": "無法啟動影片", diff --git a/packages/react-composites/review/react-composites.api.md b/packages/react-composites/review/react-composites.api.md index 7bcb0418823..c4e2806618d 100644 --- a/packages/react-composites/review/react-composites.api.md +++ b/packages/react-composites/review/react-composites.api.md @@ -85,7 +85,7 @@ export type AzureCommunicationCallAdapterArgs = { // @public export type AzureCommunicationChatAdapterArgs = { - endpointUrl: string; + endpoint: string; userId: CommunicationUserIdentifier; displayName: string; credential: CommunicationTokenCredential; @@ -94,7 +94,7 @@ export type AzureCommunicationChatAdapterArgs = { // @alpha export type AzureCommunicationMeetingAdapterArgs = { - endpointUrl: string; + endpoint: string; userId: CommunicationUserIdentifier; displayName: string; credential: CommunicationTokenCredential; @@ -426,13 +426,13 @@ export const createAzureCommunicationCallAdapter: ({ userId, displayName, creden export const createAzureCommunicationCallAdapterFromClient: (callClient: StatefulCallClient, callAgent: CallAgent, locator: TeamsMeetingLinkLocator | GroupCallLocator) => Promise; // @public -export const createAzureCommunicationChatAdapter: ({ endpointUrl, userId, displayName, credential, threadId }: AzureCommunicationChatAdapterArgs) => Promise; +export const createAzureCommunicationChatAdapter: ({ endpoint: endpointUrl, userId, displayName, credential, threadId }: AzureCommunicationChatAdapterArgs) => Promise; // @public export const createAzureCommunicationChatAdapterFromClient: (chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient) => Promise; // @alpha -export const createAzureCommunicationMeetingAdapter: ({ userId, displayName, credential, endpointUrl, chatThreadId, callLocator }: AzureCommunicationMeetingAdapterArgs) => Promise; +export const createAzureCommunicationMeetingAdapter: ({ userId, displayName, credential, endpoint, chatThreadId, callLocator }: AzureCommunicationMeetingAdapterArgs) => Promise; // @public export const DEFAULT_COMPOSITE_ICONS: { diff --git a/packages/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts b/packages/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts index bddacdaebbf..339bdbf339f 100644 --- a/packages/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts +++ b/packages/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts @@ -370,7 +370,7 @@ export class AzureCommunicationCallAdapter implements CallAdapter { } public async removeParticipant(userId: string): Promise { - this.handlers.onParticipantRemove(userId); + this.handlers.onRemoveParticipant(userId); } public getState(): CallAdapterState { diff --git a/packages/react-composites/src/composites/CallComposite/hooks/useHandlers.ts b/packages/react-composites/src/composites/CallComposite/hooks/useHandlers.ts index 951de83b04d..255c9849f8e 100644 --- a/packages/react-composites/src/composites/CallComposite/hooks/useHandlers.ts +++ b/packages/react-composites/src/composites/CallComposite/hooks/useHandlers.ts @@ -31,7 +31,7 @@ const createCompositeHandlers = memoizeOne( onHangUp: async () => { await adapter.leaveCall(); }, - onParticipantRemove: async (userId) => { + onRemoveParticipant: async (userId) => { await adapter.removeParticipant(userId); }, onSelectCamera: async (deviceInfo, options) => { diff --git a/packages/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.test.ts b/packages/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.test.ts index 3cbad9a6b06..95d3ba672c6 100644 --- a/packages/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.test.ts +++ b/packages/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.test.ts @@ -130,7 +130,7 @@ const createChatAdapterWithStubs = async (chatClient: StubChatClient): Promise { await this.asyncTeeErrorToEventEmitter(async () => { - await this.handlers.onParticipantRemove(userId); + await this.handlers.onRemoveParticipant(userId); }); } @@ -320,7 +320,7 @@ const convertEventType = (type: string): ChatMessageType => { * @public */ export type AzureCommunicationChatAdapterArgs = { - endpointUrl: string; + endpoint: string; userId: CommunicationUserIdentifier; displayName: string; credential: CommunicationTokenCredential; @@ -335,7 +335,7 @@ export type AzureCommunicationChatAdapterArgs = { * @public */ export const createAzureCommunicationChatAdapter = async ({ - endpointUrl, + endpoint: endpointUrl, userId, displayName, credential, diff --git a/packages/react-composites/src/composites/ChatComposite/hooks/useHandlers.ts b/packages/react-composites/src/composites/ChatComposite/hooks/useHandlers.ts index 132c15995eb..6217e010164 100644 --- a/packages/react-composites/src/composites/ChatComposite/hooks/useHandlers.ts +++ b/packages/react-composites/src/composites/ChatComposite/hooks/useHandlers.ts @@ -26,7 +26,7 @@ const createCompositeHandlers = memoizeOne( onLoadPreviousChatMessages: adapter.loadPreviousChatMessages, onMessageSeen: adapter.sendReadReceipt, onTyping: adapter.sendTypingIndicator, - onParticipantRemove: adapter.removeParticipant, + onRemoveParticipant: adapter.removeParticipant, updateThreadTopicName: adapter.setTopic, onUpdateMessage: adapter.updateMessage, onDeleteMessage: adapter.deleteMessage diff --git a/packages/react-composites/src/composites/MeetingComposite/SidePane.tsx b/packages/react-composites/src/composites/MeetingComposite/SidePane.tsx index b46f6d31408..40721ddd8c8 100644 --- a/packages/react-composites/src/composites/MeetingComposite/SidePane.tsx +++ b/packages/react-composites/src/composites/MeetingComposite/SidePane.tsx @@ -86,11 +86,11 @@ export const EmbeddedPeoplePane = (props: { const participantListDefaultProps = usePropsFor(ParticipantList); const participantListProps = useMemo(() => { - const onParticipantRemove = async (participantId: string): Promise => + const onRemoveParticipant = async (participantId: string): Promise => removeParticipantFromMeeting(callAdapter, chatAdapter, participantId); return { ...participantListDefaultProps, - onParticipantRemove + onRemoveParticipant }; }, [participantListDefaultProps, callAdapter, chatAdapter]); diff --git a/packages/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.ts b/packages/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.ts index 94c1c27773e..c57b43cb400 100644 --- a/packages/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.ts +++ b/packages/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.ts @@ -393,7 +393,7 @@ export class AzureCommunicationMeetingAdapter implements MeetingAdapter { * @alpha */ export type AzureCommunicationMeetingAdapterArgs = { - endpointUrl: string; + endpoint: string; userId: CommunicationUserIdentifier; displayName: string; credential: CommunicationTokenCredential; @@ -411,7 +411,7 @@ export const createAzureCommunicationMeetingAdapter = async ({ userId, displayName, credential, - endpointUrl, + endpoint, chatThreadId, callLocator }: AzureCommunicationMeetingAdapterArgs): Promise => { @@ -423,7 +423,7 @@ export const createAzureCommunicationMeetingAdapter = async ({ }); const chatAdapter = await createAzureCommunicationChatAdapter({ - endpointUrl, + endpoint, userId, displayName, credential, diff --git a/packages/react-composites/tests/browser/chat/app/index.tsx b/packages/react-composites/tests/browser/chat/app/index.tsx index 34e549d3948..5b535af241c 100644 --- a/packages/react-composites/tests/browser/chat/app/index.tsx +++ b/packages/react-composites/tests/browser/chat/app/index.tsx @@ -21,7 +21,7 @@ const params = Object.fromEntries(urlSearchParams.entries()); // Required params const displayName = verifyParamExists(params.displayName, 'displayName'); const token = verifyParamExists(params.token, 'token'); -const endpointUrl = verifyParamExists(params.endpointUrl, 'endpointUrl'); +const endpoint = verifyParamExists(params.endpointUrl, 'endpointUrl'); const threadId = verifyParamExists(params.threadId, 'threadId'); const userId = verifyParamExists(params.userId, 'userId'); @@ -36,7 +36,7 @@ function App(): JSX.Element { const initialize = async (): Promise => { setChatAdapter( await createAzureCommunicationChatAdapter({ - endpointUrl, + endpoint, userId: { communicationUserId: userId }, displayName, credential: new AzureCommunicationTokenCredential(token), diff --git a/packages/react-composites/tests/browser/meeting/app/index.tsx b/packages/react-composites/tests/browser/meeting/app/index.tsx index a37d2b3f4ce..058602c48ac 100644 --- a/packages/react-composites/tests/browser/meeting/app/index.tsx +++ b/packages/react-composites/tests/browser/meeting/app/index.tsx @@ -24,7 +24,7 @@ const displayName = verifyParamExists(params.displayName, 'displayName'); const token = verifyParamExists(params.token, 'token'); const groupId = verifyParamExists(params.groupId, 'groupId'); const userId = verifyParamExists(params.userId, 'userId'); -const endpointUrl = verifyParamExists(params.endpointUrl, 'endpointUrl'); +const endpoint = verifyParamExists(params.endpointUrl, 'endpointUrl'); const threadId = verifyParamExists(params.threadId, 'threadId'); function App(): JSX.Element { @@ -38,7 +38,7 @@ function App(): JSX.Element { displayName, credential, callLocator: { groupId: groupId }, - endpointUrl, + endpoint, chatThreadId: threadId }); setMeetingAdapter(wrapAdapterForTests(adapter)); @@ -56,7 +56,7 @@ function App(): JSX.Element { else if (!displayName) return

ERROR: No Display name set.

; else if (!groupId) return

ERROR: No groupId set.

; else if (!userId) return

ERROR: No userId set.

; - else if (!endpointUrl) return

ERROR: No endpointUrl set.

; + else if (!endpoint) return

ERROR: No endpoint set.

; else if (!threadId) return

ERROR: No threadId set.

; else if (!meetingAdapter) return

Initializing meeting adapters...

; diff --git a/packages/storybook/stories/ChatComposite/CustomBehaviorExampleContainer.tsx b/packages/storybook/stories/ChatComposite/CustomBehaviorExampleContainer.tsx index fe14790c401..c828339c5b3 100644 --- a/packages/storybook/stories/ChatComposite/CustomBehaviorExampleContainer.tsx +++ b/packages/storybook/stories/ChatComposite/CustomBehaviorExampleContainer.tsx @@ -32,7 +32,7 @@ export const ContosoChatContainer = (props: ContainerProps): JSX.Element => { const createAdapter = async (): Promise => { const newAdapter = await createAzureCommunicationChatAdapter({ - endpointUrl: props.endpointUrl, + endpoint: props.endpointUrl, userId: props.userId, displayName: props.displayName, credential: new AzureCommunicationTokenCredential(props.token), diff --git a/packages/storybook/stories/ChatComposite/snippets/Container.snippet.tsx b/packages/storybook/stories/ChatComposite/snippets/Container.snippet.tsx index 4439ac3d111..e36087f3193 100644 --- a/packages/storybook/stories/ChatComposite/snippets/Container.snippet.tsx +++ b/packages/storybook/stories/ChatComposite/snippets/Container.snippet.tsx @@ -40,7 +40,7 @@ export const ContosoChatContainer = (props: ContainerProps): JSX.Element => { const createAdapter = async (credential: AzureCommunicationTokenCredential): Promise => { setAdapter( await createAzureCommunicationChatAdapter({ - endpointUrl: props.endpointUrl, + endpoint: props.endpointUrl, userId: props.userId, displayName: props.displayName, credential, diff --git a/packages/storybook/stories/ChatComposite/snippets/CustomDataModelExampleContainer.snippet.tsx b/packages/storybook/stories/ChatComposite/snippets/CustomDataModelExampleContainer.snippet.tsx index 0e5f4f5f607..91cae1ba258 100644 --- a/packages/storybook/stories/ChatComposite/snippets/CustomDataModelExampleContainer.snippet.tsx +++ b/packages/storybook/stories/ChatComposite/snippets/CustomDataModelExampleContainer.snippet.tsx @@ -32,7 +32,7 @@ export const CustomDataModelExampleContainer = (props: CustomDataModelExampleCon const createAdapter = async (): Promise => { setAdapter( await createAzureCommunicationChatAdapter({ - endpointUrl: props.endpointUrl, + endpoint: props.endpointUrl, userId: props.userId, // Data model injection: The display name for the local user comes from Contoso's data model. displayName: props.displayName, diff --git a/packages/storybook/stories/ChatComposite/snippets/CustomizeBehavior.snippet.tsx b/packages/storybook/stories/ChatComposite/snippets/CustomizeBehavior.snippet.tsx index ea6fa8befca..596913600ee 100644 --- a/packages/storybook/stories/ChatComposite/snippets/CustomizeBehavior.snippet.tsx +++ b/packages/storybook/stories/ChatComposite/snippets/CustomizeBehavior.snippet.tsx @@ -24,7 +24,7 @@ export const ContosoChatContainer = (props: ContainerProps): JSX.Element => { const createAdapter = async (): Promise => { const chatAdapter = await createAzureCommunicationChatAdapter({ - endpointUrl: props.endpointUrl, + endpoint: props.endpointUrl, userId: props.userId, displayName: props.displayName, credential: new AzureCommunicationTokenCredential(props.token), diff --git a/packages/storybook/stories/MeetingComposite/snippets/Meeting.snippet.tsx b/packages/storybook/stories/MeetingComposite/snippets/Meeting.snippet.tsx index de70538bee2..c6cc3737644 100644 --- a/packages/storybook/stories/MeetingComposite/snippets/Meeting.snippet.tsx +++ b/packages/storybook/stories/MeetingComposite/snippets/Meeting.snippet.tsx @@ -44,7 +44,7 @@ export const MeetingExperience = (props: MeetingExampleProps): JSX.Element => { displayName: props.displayName, credential, callLocator: props.locator, - endpointUrl: props.endpointUrl, + endpoint: props.endpointUrl, chatThreadId: props.threadId }) ); diff --git a/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeAdapter.snippet.tsx b/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeAdapter.snippet.tsx index a42bc4cbea5..7250339586e 100644 --- a/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeAdapter.snippet.tsx +++ b/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeAdapter.snippet.tsx @@ -37,7 +37,7 @@ function App(): JSX.Element { const createAdapter = async (credential: AzureCommunicationTokenCredential): Promise => { setChatAdapter( await createAzureCommunicationChatAdapter({ - endpointUrl, + endpoint: endpointUrl, userId: { communicationUserId: userId }, displayName, credential, diff --git a/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeComplete.snippet.tsx b/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeComplete.snippet.tsx index fb822442408..899e9c3bcb0 100644 --- a/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeComplete.snippet.tsx +++ b/packages/storybook/stories/QuickStarts/snippets/QuickstartCompositeComplete.snippet.tsx @@ -38,7 +38,7 @@ function App(): JSX.Element { const createAdapter = async (): Promise => { setChatAdapter( await createAzureCommunicationChatAdapter({ - endpointUrl, + endpoint: endpointUrl, userId: { communicationUserId: userId }, displayName, credential: new AzureCommunicationTokenCredential(token), diff --git a/packages/storybook/stories/Stateful Client/snippets/ChatAdapterExample.snippet.tsx b/packages/storybook/stories/Stateful Client/snippets/ChatAdapterExample.snippet.tsx index 35e2ce0e815..a9cef2da4d8 100644 --- a/packages/storybook/stories/Stateful Client/snippets/ChatAdapterExample.snippet.tsx +++ b/packages/storybook/stories/Stateful Client/snippets/ChatAdapterExample.snippet.tsx @@ -17,7 +17,7 @@ export const ChatAdapterExample = (props: ChatAdapterExampleProps): JSX.Element const createAdapter = async (): Promise => { setChatAdapter( await createAzureCommunicationChatAdapter({ - endpointUrl: props.endpointUrl, + endpoint: props.endpointUrl, userId: props.userId, displayName: props.displayName, credential: new AzureCommunicationTokenCredential(props.accessToken), diff --git a/packages/storybook/stories/controlsUtils.ts b/packages/storybook/stories/controlsUtils.ts index a22732e37af..a8ab04e649a 100644 --- a/packages/storybook/stories/controlsUtils.ts +++ b/packages/storybook/stories/controlsUtils.ts @@ -95,8 +95,8 @@ const defaultTypingUsers = [ const errorOptions: ErrorType[] = [ 'unableToReachChatService', 'accessDenied', - 'userNotInThisThread', - 'sendMessageNotInThisThread', + 'userNotInChatThread', + 'sendMessageNotInChatThread', 'sendMessageGeneric', 'startVideoGeneric', 'stopVideoGeneric', diff --git a/packages/storybook/stories/snippets/localization/LocalizedComposites.snippet.tsx b/packages/storybook/stories/snippets/localization/LocalizedComposites.snippet.tsx index 20c02280dee..cea10bd3b55 100644 --- a/packages/storybook/stories/snippets/localization/LocalizedComposites.snippet.tsx +++ b/packages/storybook/stories/snippets/localization/LocalizedComposites.snippet.tsx @@ -39,7 +39,7 @@ function App(): JSX.Element { const createAdapter = async (): Promise => { setChatAdapter( await createAzureCommunicationChatAdapter({ - endpointUrl, + endpoint: endpointUrl, userId: { communicationUserId: userId }, displayName, credential: new AzureCommunicationTokenCredential(token), diff --git a/samples/Chat/src/app/ChatScreen.tsx b/samples/Chat/src/app/ChatScreen.tsx index 0ed36e63579..538b60d10cf 100644 --- a/samples/Chat/src/app/ChatScreen.tsx +++ b/samples/Chat/src/app/ChatScreen.tsx @@ -44,7 +44,7 @@ export const ChatScreen = (props: ChatScreenProps): JSX.Element => { useEffect(() => { (async () => { const adapter = await createAzureCommunicationChatAdapter({ - endpointUrl: endpointUrl, + endpoint: endpointUrl, userId: { communicationUserId: userId }, displayName: displayName, credential: createAutoRefreshingCredential(userId, token), diff --git a/samples/StaticHtmlComposites/index.html b/samples/StaticHtmlComposites/index.html index 650a1470433..df8522dd207 100644 --- a/samples/StaticHtmlComposites/index.html +++ b/samples/StaticHtmlComposites/index.html @@ -35,14 +35,14 @@ const threadId = testParams.threadId ?? (await service.createChatThread()); testParams.threadId ?? (await service.addChatUser(threadId, user, displayName)); - const endpointUrl = testParams.endpointUrl ?? (await service.getEndpointUrl()); + const endpoint = testParams.endpointUrl ?? (await service.getEndpointUrl()); // Chat composite sample code starts here const chatAdapter = await chatComposite.loadChatComposite( { displayName: displayName, threadId: threadId, - endpointUrl: endpointUrl, + endpoint: endpoint, userId: user, token: token }, diff --git a/samples/StaticHtmlComposites/src/chatComposite.js b/samples/StaticHtmlComposites/src/chatComposite.js index 19223f2235a..fae1c53f50f 100644 --- a/samples/StaticHtmlComposites/src/chatComposite.js +++ b/samples/StaticHtmlComposites/src/chatComposite.js @@ -7,9 +7,9 @@ import { AzureCommunicationTokenCredential } from '@azure/communication-common'; import { ChatComposite, createAzureCommunicationChatAdapter } from '@azure/communication-react'; export const loadChatComposite = async function (args, htmlElement, props) { - const { userId, token, endpointUrl, threadId, displayName } = args; + const { userId, token, endpoint, threadId, displayName } = args; const adapter = await createAzureCommunicationChatAdapter({ - endpointUrl, + endpoint, userId, displayName: displayName ?? 'anonymous', credential: new AzureCommunicationTokenCredential(token),