Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "Overflow gallery",
"comment": "Fix overflow gallery to use all available space when there is no local video",
"packageName": "@azure/communication-react",
"email": "79475487+mgamis-msft@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "Overflow gallery",
"comment": "Fix overflow gallery to use all available space when there is no local video",
"packageName": "@azure/communication-react",
"email": "79475487+mgamis-msft@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export const FloatingLocalVideoLayout = (props: FloatingLocalVideoLayoutProps):
isShort={isShort}
onFetchTilesToRender={setIndexesToRender}
isNarrow={isNarrow}
shouldFloatLocalVideo={true}
shouldFloatLocalVideo={!!localVideoComponent}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is localVideoComponent valid when the video is turned off but the local video avatar shows in the floating form?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. It is valid when the local video stream is turned off.

overflowGalleryElements={overflowGalleryTiles}
horizontalGalleryStyles={styles?.horizontalGallery}
/* @conditional-compile-remove(vertical-gallery) */
Expand All @@ -230,7 +230,8 @@ export const FloatingLocalVideoLayout = (props: FloatingLocalVideoLayoutProps):
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition,
setIndexesToRender,
/* @conditional-compile-remove(vertical-gallery) */ styles?.verticalGallery,
parentWidth
parentWidth,
localVideoComponent
]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,13 @@ export const OverflowGallery = (props: {
const scrollableHorizontalGalleryContainerStyles = useMemo(() => {
if (isNarrow && parentWidth) {
return {
width:
props.layout === 'default'
? `${_convertPxToRem(parentWidth) - 1}rem`
: `${_convertPxToRem(parentWidth) - SMALL_FLOATING_MODAL_SIZE_REM.width - 1}rem`
width: shouldFloatLocalVideo
? `${_convertPxToRem(parentWidth) - SMALL_FLOATING_MODAL_SIZE_REM.width - 1}rem`
: `${_convertPxToRem(parentWidth) - 1}rem`
};
}
return undefined;
}, [isNarrow, parentWidth, props.layout]);
Comment thread
mgamis-msft marked this conversation as resolved.
}, [isNarrow, parentWidth, shouldFloatLocalVideo]);

/* @conditional-compile-remove(vertical-gallery) */
if (overflowGalleryPosition === 'verticalRight') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const SpeakerVideoLayout = (props: SpeakerVideoLayoutProps): JSX.Element
isShort={isShort}
onFetchTilesToRender={setIndexesToRender}
isNarrow={isNarrow}
shouldFloatLocalVideo={true}
shouldFloatLocalVideo={!!localVideoComponent}
overflowGalleryElements={overflowGalleryTiles}
horizontalGalleryStyles={styles?.horizontalGallery}
/* @conditional-compile-remove(vertical-gallery) */
Expand All @@ -205,7 +205,8 @@ export const SpeakerVideoLayout = (props: SpeakerVideoLayoutProps): JSX.Element
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition,
setIndexesToRender,
/* @conditional-compile-remove(vertical-gallery) */ styles?.verticalGallery,
parentWidth
parentWidth,
localVideoComponent
]);

return (
Expand Down