Group calling: fix participant hover state

This commit is contained in:
Josh Perez 2020-11-20 15:24:55 -05:00 committed by Josh Perez
parent daef1feae8
commit 34574583b6
5 changed files with 25 additions and 19 deletions

View file

@ -6266,7 +6266,7 @@ button.module-image__border-overlay:focus {
&__remote-video-enabled { &__remote-video-enabled {
background-color: $color-gray-95; background-color: $color-gray-95;
height: 100vh; height: 100%;
width: 100%; width: 100%;
} }
@ -6327,15 +6327,21 @@ button.module-image__border-overlay:focus {
&--title { &--title {
@include font-caption; @include font-caption;
background: linear-gradient($color-black-alpha-40, transparent); background: linear-gradient(
180deg,
$color-black 0%,
$color-black-alpha-60 100%
);
bottom: 0; bottom: 0;
display: flex; display: flex;
padding: 6px; padding: 6px;
position: absolute; position: absolute;
width: 100%; width: 100%;
z-index: 2;
} }
&--contact-name { &--contact-name {
color: $color-white;
margin-right: 20px; margin-right: 20px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -6522,6 +6528,7 @@ button.module-image__border-overlay:focus {
display: flex; display: flex;
height: 120px; height: 120px;
justify-content: center; justify-content: center;
overflow: hidden;
position: relative; position: relative;
width: 100%; width: 100%;

View file

@ -224,7 +224,7 @@ export const CallScreen: React.FC<PropsType> = ({
{call.callMode === CallMode.Group && {call.callMode === CallMode.Group &&
!call.remoteParticipants.length !call.remoteParticipants.length
? i18n('calling__in-this-call--zero') ? i18n('calling__in-this-call--zero')
: conversation.title} : ''}
{call.callMode === CallMode.Direct && {call.callMode === CallMode.Direct &&
renderHeaderMessage( renderHeaderMessage(
i18n, i18n,

View file

@ -2,7 +2,6 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import React from 'react'; import React from 'react';
import { Tooltip, TooltipTheme } from './Tooltip';
import { CallingPipRemoteVideo } from './CallingPipRemoteVideo'; import { CallingPipRemoteVideo } from './CallingPipRemoteVideo';
import { LocalizerType } from '../types/Util'; import { LocalizerType } from '../types/Util';
import { VideoFrameSource } from '../types/Calling'; import { VideoFrameSource } from '../types/Calling';
@ -184,7 +183,6 @@ export const CallingPip = ({
}} }}
type="button" type="button"
/> />
<Tooltip content={i18n('calling__pip--off')} theme={TooltipTheme.Dark}>
<button <button
aria-label={i18n('calling__pip--off')} aria-label={i18n('calling__pip--off')}
className="module-calling-pip__button--pip" className="module-calling-pip__button--pip"
@ -193,7 +191,6 @@ export const CallingPip = ({
> >
<div /> <div />
</button> </button>
</Tooltip>
</div> </div>
</div> </div>
); );

View file

@ -172,6 +172,8 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
}; };
} }
const showHover = hasHover && !props.isInPip;
return ( return (
<div <div
className="module-ongoing-call__group-call-remote-participant" className="module-ongoing-call__group-call-remote-participant"
@ -179,7 +181,7 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
onMouseLeave={() => setHover(false)} onMouseLeave={() => setHover(false)}
style={containerStyles} style={containerStyles}
> >
{hasHover && ( {showHover && (
<div <div
className={classNames( className={classNames(
'module-ongoing-call__group-call-remote-participant--title', 'module-ongoing-call__group-call-remote-participant--title',

View file

@ -14409,7 +14409,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallingPip.js", "path": "ts/components/CallingPip.js",
"line": " const videoContainerRef = react_1.default.useRef(null);", "line": " const videoContainerRef = react_1.default.useRef(null);",
"lineNumber": 16, "lineNumber": 15,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Element is measured. Its HTML is not used." "reasonDetail": "Element is measured. Its HTML is not used."
@ -14418,7 +14418,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallingPip.js", "path": "ts/components/CallingPip.js",
"line": " const localVideoRef = react_1.default.useRef(null);", "line": " const localVideoRef = react_1.default.useRef(null);",
"lineNumber": 17, "lineNumber": 16,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Used to get the local video element for rendering." "reasonDetail": "Used to get the local video element for rendering."
@ -14427,7 +14427,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallingPip.tsx", "path": "ts/components/CallingPip.tsx",
"line": " const videoContainerRef = React.useRef(null);", "line": " const videoContainerRef = React.useRef(null);",
"lineNumber": 42, "lineNumber": 41,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Element is measured. Its HTML is not used." "reasonDetail": "Element is measured. Its HTML is not used."
@ -14436,7 +14436,7 @@
"rule": "React-useRef", "rule": "React-useRef",
"path": "ts/components/CallingPip.tsx", "path": "ts/components/CallingPip.tsx",
"line": " const localVideoRef = React.useRef(null);", "line": " const localVideoRef = React.useRef(null);",
"lineNumber": 43, "lineNumber": 42,
"reasonCategory": "usageTrusted", "reasonCategory": "usageTrusted",
"updated": "2020-10-26T19:12:24.410Z", "updated": "2020-10-26T19:12:24.410Z",
"reasonDetail": "Used to get the local video element for rendering." "reasonDetail": "Used to get the local video element for rendering."