Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a4ad6b0
set min width of composite content to 30rem
mgamis-msft Mar 31, 2023
0085bac
Change files
mgamis-msft Mar 31, 2023
9ffe3f7
Duplicate change files for beta release
mgamis-msft Mar 31, 2023
6f5d789
fix incorrect file header
mgamis-msft Mar 31, 2023
caf7684
Add comment to variable and simplified variable name
mgamis-msft Mar 31, 2023
6dea8c9
Merge branch 'main' into mgamis/fix-side-pane-when-composite-is-narrow
mgamis-msft Mar 31, 2023
7fd5df8
include minWidth styling for stable
mgamis-msft Mar 31, 2023
89db3f4
Update packages/react-composites CallWithChatComposite browser test s…
github-actions[bot] Mar 31, 2023
ebf30bf
Update packages/react-composites CallWithChatComposite browser test s…
github-actions[bot] Mar 31, 2023
ec03e75
Merge branch 'mgamis/fix-side-pane-when-composite-is-narrow' of https…
github-actions[bot] Mar 31, 2023
4aedcf0
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] Mar 31, 2023
8770a1d
Merge branch 'mgamis/fix-side-pane-when-composite-is-narrow' of https…
github-actions[bot] Mar 31, 2023
a8770f4
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] Mar 31, 2023
379c26b
Merge branch 'mgamis/fix-side-pane-when-composite-is-narrow' of https…
github-actions[bot] Mar 31, 2023
b6d0c15
apply minwidth only when not mobile
mgamis-msft Mar 31, 2023
a75c0d8
Merge branch 'main' into mgamis/fix-side-pane-when-composite-is-narrow
mgamis-msft Mar 31, 2023
b019aca
cond-comp import
mgamis-msft Mar 31, 2023
f531529
cond-comp fix
mgamis-msft Mar 31, 2023
7d66356
Merge branch 'main' into mgamis/fix-side-pane-when-composite-is-narrow
dmceachernmsft Mar 31, 2023
e52061f
Update packages/react-composites CallWithChatComposite browser test s…
github-actions[bot] Mar 31, 2023
15a2770
Update packages/react-composites CallWithChatComposite browser test s…
github-actions[bot] Mar 31, 2023
3f8e662
Merge branch 'mgamis/fix-side-pane-when-composite-is-narrow' of https…
github-actions[bot] Mar 31, 2023
c6f72de
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] Mar 31, 2023
9fd3a74
Merge branch 'mgamis/fix-side-pane-when-composite-is-narrow' of https…
github-actions[bot] Mar 31, 2023
8a0679c
Update packages/react-composites CallComposite browser test snapshots
github-actions[bot] Mar 31, 2023
c1c850c
Merge branch 'mgamis/fix-side-pane-when-composite-is-narrow' of https…
github-actions[bot] Mar 31, 2023
9360e00
revert all snapshot updates
mgamis-msft Mar 31, 2023
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,7 @@
{
"type": "patch",
"comment": "Fix side pane overlapping with composite when window is narrow",
"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,7 @@
{
"type": "patch",
"comment": "Fix side pane overlapping with composite when window is narrow",
"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 @@ -19,6 +19,8 @@ import { useCallback } from 'react';
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
import { AvatarPersonaDataCallback } from '../../common/AvatarPersona';
import { containerDivStyles } from '../../common/ContainerRectProps';
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
import { compositeMinWidthRem } from '../../common/styles/Composite.styles';
import { useAdapter } from '../adapter/CallAdapterProvider';
import { CallControls, CallControlsProps } from '../components/CallControls';
import { CommonCallControlBar } from '../../common/ControlBar/CommonCallControlBar';
Expand Down Expand Up @@ -107,8 +109,13 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => {

/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
const callCompositeContainerCSS = useMemo(() => {
return { display: isMobileWithActivePane ? 'none' : 'flex', minWidth: 0, width: '100%', height: '100%' };
}, [isMobileWithActivePane]);
return {
display: isMobileWithActivePane ? 'none' : 'flex',
minWidth: props.mobileView ? 'unset' : `${compositeMinWidthRem}rem`,
width: '100%',
height: '100%'
};
}, [isMobileWithActivePane, props.mobileView]);

/* @conditional-compile-remove(PSTN-calls) */
const callWithChatStrings = useCallWithChatCompositeStrings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const CallWithChatScreen = (props: CallWithChatScreenProps): JSX.Element => {
<Stack horizontal grow>
<Stack.Item
grow
styles={callCompositeContainerStyles}
styles={callCompositeContainerStyles(mobileView)}
// Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.
style={callCompositeContainerCSS}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license.

import { IStackStyles } from '@fluentui/react';
import { compositeMinWidthRem } from '../../common/styles/Composite.styles';

/**
* @private
Expand All @@ -16,15 +17,15 @@ export const compositeOuterContainerStyles: IStackStyles = {
};

/** @private */
export const callCompositeContainerStyles: IStackStyles = {
export const callCompositeContainerStyles = (isMobile: boolean): IStackStyles => ({
root: {
// Start a new stacking context so that any `position:absolute` elements
// inside the call composite do not compete with its siblings.
position: 'relative',
width: '100%',
minWidth: 0
minWidth: isMobile ? 'unset' : `${compositeMinWidthRem}rem`
}
};
});

/** @private */
export const controlBarContainerStyles: IStackStyles = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* This minimum width is to make sure the side pane does not overlap with the composite when the screen is narrow.
*
* @private
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.

nit: Maybe add a small comment here as to what the number is for.

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.

Added 👍

*/
export const compositeMinWidthRem = 30;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.