Skip to content

Commit 6cd9d7b

Browse files
dmceachernmsftprprabhu-msgithub-actions[bot]
authored
Fix PIPIP overlap in chat pane (#1674) (#1680)
* Fix PIPIP overlap in chat pane (#1674) * increase the z-index of the pipip * Move zIndex manipulation closer * Change files * removed unused import * add missing jsdoc comment * move getPipStyles to a better file. Co-authored-by: Prathmesh Prabhu <82062616+prprabhu-ms@users.noreply.github.com> * Update js bundle automation snapshots * Update js bundle automation snapshots * Update composite automation snapshots Co-authored-by: Prathmesh Prabhu <82062616+prprabhu-ms@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 23c490b commit 6cd9d7b

5 files changed

Lines changed: 31 additions & 15 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix styles so that the PIPIP shows over the content in the people and chat panes on mobile.",
4+
"packageName": "@internal/react-composites",
5+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
3-
import { IStackStyles, IStackTokens, Stack } from '@fluentui/react';
3+
import { IStackStyles, IStackTokens, ITheme, Stack } from '@fluentui/react';
44
import { ParticipantMenuItemsCallback, useTheme, _DrawerMenu, _DrawerMenuItemProps } from '@internal/react-components';
55
import React, { useMemo, useState } from 'react';
66
import { CallAdapter } from '../CallComposite';
@@ -87,18 +87,7 @@ export const CallWithChatPane = (props: {
8787
</CallAdapterProvider>
8888
);
8989

90-
const pipStyles: ModalLocalAndRemotePIPStyles = useMemo(
91-
() => ({
92-
modal: {
93-
main: {
94-
borderRadius: theme.effects.roundedCorner4,
95-
boxShadow: theme.effects.elevation8,
96-
...(theme.rtl ? { left: '1rem' } : { right: '1rem' })
97-
}
98-
}
99-
}),
100-
[theme.effects.roundedCorner4, theme.effects.elevation8, theme.rtl]
101-
);
90+
const pipStyles = useMemo(() => getPipStyles(theme), [theme]);
10291

10392
const dataUiId =
10493
props.activePane === 'chat'
@@ -160,3 +149,18 @@ const availableSpaceStyles: IStackStyles = { root: { width: '100%', height: '100
160149
const sidePaneTokens: IStackTokens = {
161150
childrenGap: '0.5rem'
162151
};
152+
153+
/**
154+
* @private
155+
*/
156+
const getPipStyles = (theme: ITheme): ModalLocalAndRemotePIPStyles => ({
157+
modal: {
158+
main: {
159+
borderRadius: theme.effects.roundedCorner4,
160+
boxShadow: theme.effects.elevation8,
161+
// Above the message thread / people pane.
162+
zIndex: 2,
163+
...(theme.rtl ? { left: '1rem' } : { right: '1rem' })
164+
}
165+
}
166+
});

packages/react-composites/src/composites/CallWithChatComposite/ModalLocalAndRemotePIP.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ const modalStyle: IStyleFunctionOrObject<IModalStyleProps, IModalStyles> = {
9898
minWidth: 'min-content',
9999
minHeight: 'min-content',
100100
position: 'absolute',
101-
zIndex: 1,
102101
overflow: 'hidden',
103102
// pointer events for root Modal div set to auto to make LocalAndRemotePIP interactive
104103
pointerEvents: 'auto',

packages/react-composites/src/composites/common/styles/ParticipantContainer.styles.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ export const scrollableContainer: IStackStyles = { root: { flexBasis: '0', flexG
5656
* @private
5757
*/
5858
export const scrollableContainerContents: IStackItemStyles = {
59-
root: { flexGrow: '1', flexBasis: '0', maxWidth: '100%' }
59+
root: {
60+
flexGrow: '1',
61+
flexBasis: '0',
62+
maxWidth: '100%',
63+
// Create a new stacking context so that `pipStyles` can set zIndex above the container.
64+
position: 'relative'
65+
}
6066
};
6167

6268
/**
Loading

0 commit comments

Comments
 (0)