From 62cdc613b95423622e460f52c68bc675071ae83d Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:28:03 -0700 Subject: [PATCH] Call Controls: Enhance width for viewport sizes --- stylesheets/_modules.scss | 12 +--- stylesheets/components/CallControls.scss | 14 +++- stylesheets/components/CallingLobby.scss | 6 +- ts/components/CallScreen.tsx | 4 +- ts/components/CallingLobby.tsx | 90 +++++++++++++----------- 5 files changed, 65 insertions(+), 61 deletions(-) diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index a960c21ee22c..ff4296048889 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -3708,7 +3708,7 @@ button.module-image__border-overlay:focus { } .module-ongoing-call { - $local-preview-width: 107px; + $local-preview-width: 108px; $local-preview-height: 80px; &__remote-video-enabled { @@ -4013,18 +4013,10 @@ button.module-image__border-overlay:focus { justify-content: center; } - // This layout-only element is not ideal, but lets us keep the actions centered until - // until they'd overlap with the video, at which point they start to move. - &__local-preview-offset { - flex: 1 0; - max-width: $local-preview-width; - margin-inline-start: 16px; - visibility: hidden; - } - &__local-preview { border-radius: 10px; display: flex; + flex-shrink: 0; height: $local-preview-height; margin-block-end: 16px; margin-inline: 0 16px; diff --git a/stylesheets/components/CallControls.scss b/stylesheets/components/CallControls.scss index 32d24fe35f99..3b8a86e5fd9f 100644 --- a/stylesheets/components/CallControls.scss +++ b/stylesheets/components/CallControls.scss @@ -5,17 +5,18 @@ position: relative; bottom: 0; display: flex; - flex-grow: 0; + flex-grow: 1; flex-shrink: 0; + flex-basis: 440px; align-items: center; justify-content: space-between; - width: 480px; - min-width: 480px; + max-width: 600px; height: 80px; background-color: $color-gray-78; box-shadow: 0px 4px 14px 0px $color-black-alpha-40; border-radius: 18px; margin-block-end: 16px; + margin-inline: 16px; padding-block: 22px; padding-inline: 24px; text-align: center; @@ -31,6 +32,7 @@ .CallControls__CallTitle { display: flex; max-height: 40px; + margin-block-end: 2px; color: $color-gray-15; font-size: 14px; font-weight: bold; @@ -107,3 +109,9 @@ .CallControls__JoinLeaveButton .module-spinner__container { margin-block: -5px; } + +.CallControls__OuterSpacer { + // Defined in _modules but duplicated here for ease of refactor + $local-preview-width: 108px; + flex-basis: calc($local-preview-width + 16px); +} diff --git a/stylesheets/components/CallingLobby.scss b/stylesheets/components/CallingLobby.scss index 24bbb2c7a380..689bed0189a4 100644 --- a/stylesheets/components/CallingLobby.scss +++ b/stylesheets/components/CallingLobby.scss @@ -35,6 +35,8 @@ } } -.module-CallingLobby__CallControls-spacer { - flex-basis: 70px; +.CallingLobby__Footer { + display: flex; + width: 100%; + justify-content: center; } diff --git a/ts/components/CallScreen.tsx b/ts/components/CallScreen.tsx index f1de9efd4072..a20f6744b798 100644 --- a/ts/components/CallScreen.tsx +++ b/ts/components/CallScreen.tsx @@ -518,9 +518,7 @@ export function CallScreen({ {remoteParticipantsElement} {lonelyInCallNode}