Skip to content

Commit bb43a38

Browse files
[BugFix] Grey Tile fix (#3754) (#3757)
* render gallery when sidepane is closed * Change files * Duplicate change files for beta release * fix render for desktop as well * update re-render logic * fix defined check * fix cc
1 parent da09c95 commit bb43a38

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "Bug fix",
5+
"comment": "Render gallery content only when people pane screens on mobile aren't present",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "Bug fix",
5+
"comment": "Render gallery content only when people pane screens on mobile aren't present",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-composites/src/composites/CallComposite/components/CallArrangement.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
/* @conditional-compile-remove(gallery-layouts) */
1919
import { VideoGalleryLayout } from '@internal/react-components';
2020
import React, { useMemo, useRef, useState } from 'react';
21-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
2221
import { useEffect } from 'react';
2322
import { useCallback } from 'react';
2423
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(close-captions) */
@@ -181,6 +180,16 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {
181180

182181
const isSidePaneOpen = useIsSidePaneOpen();
183182

183+
const [renderGallery, setRenderGallery] = useState<boolean>(!isSidePaneOpen && props.mobileView);
184+
185+
useEffect(() => {
186+
if (isSidePaneOpen && props.mobileView) {
187+
setRenderGallery(false);
188+
} else {
189+
setRenderGallery(true);
190+
}
191+
}, [props.mobileView, isSidePaneOpen]);
192+
184193
const locale = useLocale();
185194
const modalStrings = { dismissModalAriaLabel: locale.strings.call.dismissModalAriaLabel };
186195

@@ -425,7 +434,7 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {
425434
<MutedNotification {...props.mutedNotificationProps} />
426435
)}
427436
</Stack.Item>
428-
{props.onRenderGalleryContent && props.onRenderGalleryContent()}
437+
{renderGallery && props.onRenderGalleryContent && props.onRenderGalleryContent()}
429438
{
430439
/* @conditional-compile-remove(close-captions) */
431440
true &&

0 commit comments

Comments
 (0)