Skip to content

Commit

Permalink
Stablize Pinning layouts and rendering options (#3394)
Browse files Browse the repository at this point in the history
* Stablize Pinning layouts and rendering options

* Change files

* Duplicate change files for beta release

* Update packages/react-composites CallComposite browser test snapshots

* rename props

* Stablize Pinning

* Minor changes

* Update packages/react-composites CallComposite browser test snapshots

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Donald McEachern <[email protected]>
  • Loading branch information
3 people authored Sep 1, 2023
1 parent 225d650 commit 8bb2ff8
Show file tree
Hide file tree
Showing 35 changed files with 152 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Stablize Pinning layouts and rendering options",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Stablize Pinning layouts and rendering options",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
4 changes: 2 additions & 2 deletions common/config/babel/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ process.env['COMMUNICATION_REACT_FLAVOR'] !== 'beta' &&
'unsupported-browser',
// Support Calling SDK isReceiving flag, shows a loading spinner on the video tile when isAvailable is true but isReceiving is false
'video-stream-is-receiving-flag',
// Pinned Participants
'pinned-participants',
// Feature to show the total number of participants in a call (currently in beta in calling SDK, hence this must be conditionally compiled)
'total-participant-count',
// feature for tracking environment info API different than unsupported browser. stable use of environment info affects other components possibly sooner
Expand Down Expand Up @@ -101,6 +99,8 @@ process.env['COMMUNICATION_REACT_FLAVOR'] !== 'beta' &&
// Demo feature. Used in live-documentation of conditional compilation.
// Do not use in production code.
'stabilizedDemo',
// Pinned Participants
'pinned-participants'
]
}
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ export interface RemoteVideoStreamState {
id: number;
isAvailable: boolean;
mediaStreamType: MediaStreamType;
streamSize?: {
width: number;
height: number;
};
view?: VideoStreamRendererViewState;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ export type CallCompositeOptions = {
}) => void;
onNetworkingTroubleShootingClick?: () => void;
onEnvironmentInfoTroubleshootingClick?: () => void;
remoteVideoTileMenu?: RemoteVideoTileMenuOptions;
remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;
localVideoTile?: boolean | LocalVideoTileOptions;
galleryOptions?: {
layout?: VideoGalleryLayout;
Expand Down Expand Up @@ -3549,7 +3549,7 @@ export interface RemoteVideoStreamState {
view?: VideoStreamRendererViewState;
}

// @beta
// @public
export interface RemoteVideoTileMenuOptions {
isHidden?: boolean;
}
Expand Down Expand Up @@ -4095,7 +4095,7 @@ export interface VideoGalleryProps {
overflowGalleryPosition?: OverflowGalleryPosition;
pinnedParticipants?: string[];
remoteParticipants?: VideoGalleryRemoteParticipant[];
remoteVideoTileMenuOptions?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
remoteVideoViewOptions?: VideoStreamOptions;
showCameraSwitcherInLocalPreview?: boolean;
showMuteIndicator?: boolean;
Expand Down Expand Up @@ -4178,12 +4178,12 @@ export interface VideoStreamRendererViewState {
// @public
export const VideoTile: (props: VideoTileProps) => JSX.Element;

// @beta
// @public
export interface VideoTileContextualMenuProps {
kind: 'contextual';
}

// @beta
// @public
export interface VideoTileDrawerMenuProps {
hostId?: string;
kind: 'drawer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { IButtonProps } from '@fluentui/react';
import { IButtonStyles } from '@fluentui/react';
import { IContextualMenuItem } from '@fluentui/react';
import { IContextualMenuItemStyles } from '@fluentui/react';
import { IContextualMenuProps } from '@fluentui/react';
import { IContextualMenuStyles } from '@fluentui/react';
import { IMessageBarProps } from '@fluentui/react';
import { IPersonaStyleProps } from '@fluentui/react';
Expand Down Expand Up @@ -377,6 +378,7 @@ export type CallCompositeIcons = {
export type CallCompositeOptions = {
errorBar?: boolean;
callControls?: boolean | CallControlOptions;
remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;
};

// @public
Expand Down Expand Up @@ -1520,6 +1522,12 @@ export const DEFAULT_COMPONENT_ICONS: {
SendBoxSend: JSX.Element;
SendBoxSendHovered: JSX.Element;
VideoTileMicOff: JSX.Element;
VideoTilePinned: JSX.Element;
VideoTileMoreOptions: JSX.Element;
VideoTileScaleFit: JSX.Element;
VideoTileScaleFill: JSX.Element;
PinParticipant: JSX.Element;
UnpinParticipant: JSX.Element;
SplitButtonPrimaryActionCameraOn: JSX.Element;
SplitButtonPrimaryActionCameraOff: JSX.Element;
SplitButtonPrimaryActionMicUnmuted: JSX.Element;
Expand Down Expand Up @@ -1600,6 +1608,12 @@ export const DEFAULT_COMPOSITE_ICONS: {
ErrorBarCallVideoRecoveredBySystem: JSX.Element;
ErrorBarCallVideoStoppedBySystem: JSX.Element;
MessageResend: JSX.Element;
VideoTilePinned: JSX.Element;
VideoTileMoreOptions: JSX.Element;
VideoTileScaleFit: JSX.Element;
VideoTileScaleFill: JSX.Element;
PinParticipant: JSX.Element;
UnpinParticipant: JSX.Element;
SplitButtonPrimaryActionCameraOn: JSX.Element;
SplitButtonPrimaryActionCameraOff: JSX.Element;
SplitButtonPrimaryActionMicUnmuted: JSX.Element;
Expand Down Expand Up @@ -2351,9 +2365,18 @@ export interface RemoteVideoStreamState {
id: number;
isAvailable: boolean;
mediaStreamType: MediaStreamType;
streamSize?: {
width: number;
height: number;
};
view?: VideoStreamRendererViewState;
}

// @public
export interface RemoteVideoTileMenuOptions {
isHidden?: boolean;
}

// @public
export const ScreenShareButton: (props: ScreenShareButtonProps) => JSX.Element;

Expand Down Expand Up @@ -2612,10 +2635,14 @@ export interface VideoGalleryProps {
// @deprecated (undocumented)
onDisposeRemoteStreamView?: (userId: string) => Promise<void>;
onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;
onPinParticipant?: (userId: string) => void;
onRenderAvatar?: OnRenderAvatarCallback;
onRenderLocalVideoTile?: (localParticipant: VideoGalleryLocalParticipant) => JSX.Element;
onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;
onUnpinParticipant?: (userId: string) => void;
pinnedParticipants?: string[];
remoteParticipants?: VideoGalleryRemoteParticipant[];
remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
remoteVideoViewOptions?: VideoStreamOptions;
showCameraSwitcherInLocalPreview?: boolean;
showMuteIndicator?: boolean;
Expand Down Expand Up @@ -2644,17 +2671,30 @@ export interface VideoGalleryStream {
isMirrored?: boolean;
isReceiving?: boolean;
renderElement?: HTMLElement;
scalingMode?: ViewScalingMode;
streamSize?: {
width: number;
height: number;
};
}

// @public
export interface VideoGalleryStrings {
displayNamePlaceholder: string;
fillRemoteParticipantFrame: string;
fitRemoteParticipantToFrame: string;
localVideoCameraSwitcherLabel: string;
localVideoLabel: string;
localVideoMovementLabel: string;
localVideoSelectedDescription: string;
pinnedParticipantAnnouncementAriaLabel: string;
pinParticipantForMe: string;
pinParticipantMenuItemAriaLabel: string;
screenIsBeingSharedMessage: string;
screenShareLoadingMessage: string;
unpinnedParticipantAnnouncementAriaLabel: string;
unpinParticipantForMe: string;
unpinParticipantMenuItemAriaLabel: string;
}

// @public
Expand All @@ -2680,15 +2720,29 @@ export interface VideoStreamRendererViewState {
// @public
export const VideoTile: (props: VideoTileProps) => JSX.Element;

// @public
export interface VideoTileContextualMenuProps {
kind: 'contextual';
}

// @public
export interface VideoTileDrawerMenuProps {
hostId?: string;
kind: 'drawer';
}

// @public
export interface VideoTileProps {
children?: React_2.ReactNode;
contextualMenu?: IContextualMenuProps;
displayName?: string;
initialsName?: string;
isMirrored?: boolean;
isMuted?: boolean;
isPinned?: boolean;
isSpeaking?: boolean;
noVideoAvailableAriaLabel?: string;
onLongTouch?: () => void;
onRenderPlaceholder?: OnRenderAvatarCallback;
personaMaxSize?: number;
personaMinSize?: number;
Expand Down
6 changes: 3 additions & 3 deletions packages/react-components/review/beta/react-components.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,7 @@ export interface VideoGalleryProps {
overflowGalleryPosition?: OverflowGalleryPosition;
pinnedParticipants?: string[];
remoteParticipants?: VideoGalleryRemoteParticipant[];
remoteVideoTileMenuOptions?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
remoteVideoViewOptions?: VideoStreamOptions;
showCameraSwitcherInLocalPreview?: boolean;
showMuteIndicator?: boolean;
Expand Down Expand Up @@ -2390,12 +2390,12 @@ export interface VideoStreamOptions {
// @public
export const VideoTile: (props: VideoTileProps) => JSX.Element;

// @beta
// @public
export interface VideoTileContextualMenuProps {
kind: 'contextual';
}

// @beta
// @public
export interface VideoTileDrawerMenuProps {
hostId?: string;
kind: 'drawer';
Expand Down
38 changes: 38 additions & 0 deletions packages/react-components/review/stable/react-components.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { IButtonProps } from '@fluentui/react';
import { IButtonStyles } from '@fluentui/react';
import { IContextualMenuItem } from '@fluentui/react';
import { IContextualMenuItemStyles } from '@fluentui/react';
import { IContextualMenuProps } from '@fluentui/react';
import { IContextualMenuStyles } from '@fluentui/react';
import { IDropdownOption } from '@fluentui/react';
import { IDropdownStyles } from '@fluentui/react';
Expand Down Expand Up @@ -426,6 +427,12 @@ export const DEFAULT_COMPONENT_ICONS: {
SendBoxSend: JSX.Element;
SendBoxSendHovered: JSX.Element;
VideoTileMicOff: JSX.Element;
VideoTilePinned: JSX.Element;
VideoTileMoreOptions: JSX.Element;
VideoTileScaleFit: JSX.Element;
VideoTileScaleFill: JSX.Element;
PinParticipant: JSX.Element;
UnpinParticipant: JSX.Element;
SplitButtonPrimaryActionCameraOn: JSX.Element;
SplitButtonPrimaryActionCameraOff: JSX.Element;
SplitButtonPrimaryActionMicUnmuted: JSX.Element;
Expand Down Expand Up @@ -1572,10 +1579,14 @@ export interface VideoGalleryProps {
// @deprecated (undocumented)
onDisposeRemoteStreamView?: (userId: string) => Promise<void>;
onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;
onPinParticipant?: (userId: string) => void;
onRenderAvatar?: OnRenderAvatarCallback;
onRenderLocalVideoTile?: (localParticipant: VideoGalleryLocalParticipant) => JSX.Element;
onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;
onUnpinParticipant?: (userId: string) => void;
pinnedParticipants?: string[];
remoteParticipants?: VideoGalleryRemoteParticipant[];
remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
remoteVideoViewOptions?: VideoStreamOptions;
showCameraSwitcherInLocalPreview?: boolean;
showMuteIndicator?: boolean;
Expand All @@ -1596,17 +1607,30 @@ export interface VideoGalleryStream {
isMirrored?: boolean;
isReceiving?: boolean;
renderElement?: HTMLElement;
scalingMode?: ViewScalingMode;
streamSize?: {
width: number;
height: number;
};
}

// @public
export interface VideoGalleryStrings {
displayNamePlaceholder: string;
fillRemoteParticipantFrame: string;
fitRemoteParticipantToFrame: string;
localVideoCameraSwitcherLabel: string;
localVideoLabel: string;
localVideoMovementLabel: string;
localVideoSelectedDescription: string;
pinnedParticipantAnnouncementAriaLabel: string;
pinParticipantForMe: string;
pinParticipantMenuItemAriaLabel: string;
screenIsBeingSharedMessage: string;
screenShareLoadingMessage: string;
unpinnedParticipantAnnouncementAriaLabel: string;
unpinParticipantForMe: string;
unpinParticipantMenuItemAriaLabel: string;
}

// @public
Expand All @@ -1625,15 +1649,29 @@ export interface VideoStreamOptions {
// @public
export const VideoTile: (props: VideoTileProps) => JSX.Element;

// @public
export interface VideoTileContextualMenuProps {
kind: 'contextual';
}

// @public
export interface VideoTileDrawerMenuProps {
hostId?: string;
kind: 'drawer';
}

// @public
export interface VideoTileProps {
children?: React_2.ReactNode;
contextualMenu?: IContextualMenuProps;
displayName?: string;
initialsName?: string;
isMirrored?: boolean;
isMuted?: boolean;
isPinned?: boolean;
isSpeaking?: boolean;
noVideoAvailableAriaLabel?: string;
onLongTouch?: () => void;
onRenderPlaceholder?: OnRenderAvatarCallback;
personaMaxSize?: number;
personaMinSize?: number;
Expand Down
Loading

0 comments on commit 8bb2ff8

Please sign in to comment.