diff --git a/stylesheets/components/ToastManager.scss b/stylesheets/components/ToastManager.scss index 376de40452..5d9c320eaa 100644 --- a/stylesheets/components/ToastManager.scss +++ b/stylesheets/components/ToastManager.scss @@ -43,3 +43,7 @@ // Roughly size of composer + a bit of padding bottom: 40px; } + +.ToastManager--full-screen-call { + bottom: calc($CallControls__height + 32px); +} diff --git a/ts/components/CallingLobby.tsx b/ts/components/CallingLobby.tsx index b13d22de54..d49cc90ff9 100644 --- a/ts/components/CallingLobby.tsx +++ b/ts/components/CallingLobby.tsx @@ -265,7 +265,16 @@ export function CallingLobby({ useWasInitiallyMutedToast(hasLocalAudio, i18n); return ( - + { + if (!target || !(target instanceof HTMLElement)) { + return false; + } + return target.matches('.Toast, .Toast *'); + }, + }} + >
{shouldShowLocalVideo ? (
); @@ -213,6 +214,7 @@ export function DebugLogWindow({ openFileInFolder={shouldNeverBeCalled} toast={toast} containerWidthBreakpoint={null} + isInFullScreenCall={false} /> ); diff --git a/ts/components/LeftPane.stories.tsx b/ts/components/LeftPane.stories.tsx index 55f183853c..0b63dff770 100644 --- a/ts/components/LeftPane.stories.tsx +++ b/ts/components/LeftPane.stories.tsx @@ -264,6 +264,7 @@ const useProps = (overrideProps: OverridePropsType = {}): PropsType => { toast={undefined} megaphone={undefined} containerWidthBreakpoint={containerWidthBreakpoint} + isInFullScreenCall={false} /> ), selectedConversationId: undefined, diff --git a/ts/components/Preferences.tsx b/ts/components/Preferences.tsx index 0cc03bc096..6a6cd3cd62 100644 --- a/ts/components/Preferences.tsx +++ b/ts/components/Preferences.tsx @@ -1656,6 +1656,7 @@ export function Preferences({ openFileInFolder={shouldNeverBeCalled} toast={toast} containerWidthBreakpoint={WidthBreakpoint.Narrow} + isInFullScreenCall={false} /> ); diff --git a/ts/components/ToastManager.stories.tsx b/ts/components/ToastManager.stories.tsx index 817aeb32f0..87910da565 100644 --- a/ts/components/ToastManager.stories.tsx +++ b/ts/components/ToastManager.stories.tsx @@ -222,6 +222,7 @@ export default { toastType: ToastType.AddingUserToGroup, megaphoneType: MegaphoneType.UsernameOnboarding, OS: 'macOS', + isInFullScreenCall: false, }, } satisfies Meta; diff --git a/ts/components/ToastManager.tsx b/ts/components/ToastManager.tsx index 7957509dba..cc28558da7 100644 --- a/ts/components/ToastManager.tsx +++ b/ts/components/ToastManager.tsx @@ -29,6 +29,7 @@ export type PropsType = { centerToast?: boolean; containerWidthBreakpoint: WidthBreakpoint | null; isCompositionAreaVisible?: boolean; + isInFullScreenCall: boolean; }; const SHORT_TIMEOUT = 3 * SECOND; @@ -554,8 +555,12 @@ export function renderMegaphone({ } export function ToastManager(props: PropsType): JSX.Element { - const { centerToast, containerWidthBreakpoint, isCompositionAreaVisible } = - props; + const { + centerToast, + containerWidthBreakpoint, + isCompositionAreaVisible, + isInFullScreenCall, + } = props; const toast = renderToast(props); @@ -569,7 +574,13 @@ export function ToastManager(props: PropsType): JSX.Element { > {centerToast ? createPortal( -
{toast}
, +
+ {toast} +
, document.body ) : toast} diff --git a/ts/state/smart/ToastManager.tsx b/ts/state/smart/ToastManager.tsx index e5673302f3..0c402d9a6e 100644 --- a/ts/state/smart/ToastManager.tsx +++ b/ts/state/smart/ToastManager.tsx @@ -96,6 +96,7 @@ export const SmartToastManager = memo(function SmartToastManager({ centerToast={centerToast} containerWidthBreakpoint={containerWidthBreakpoint} isCompositionAreaVisible={isCompositionAreaVisible} + isInFullScreenCall={isInFullScreenCall} /> ); });