Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(filmstrip): thumnail indicators ui updates

Calin-Teodor7c17d80ae84a
diff --git a/react/features/connection-indicator/components/native/ConnectionIndicator.tsx b/react/features/connection-indicator/components/native/ConnectionIndicator.tsx
index 512b3bc430..913560f28f 100644
--- a/react/features/connection-indicator/components/native/ConnectionIndicator.tsx
+++ b/react/features/connection-indicator/components/native/ConnectionIndicator.tsx
@@ -1,7 +1,7 @@
/* eslint-disable lines-around-comment */
import React from 'react';
-import { View } from 'react-native';
+import { StyleProp, View, ViewStyle } from 'react-native';
import { IReduxState } from '../../../app/types';
import { IconConnection } from '../../../base/icons/svg';
@@ -164,10 +164,11 @@ class ConnectionIndicator extends AbstractConnectionIndicator<IProps, IState> {
return (
<View
- style = {{
- ...indicatorStyles.indicatorContainer,
- backgroundColor: indicatorColor
- }}>
+ style = { [
+ indicatorStyles.indicatorContainer as StyleProp<ViewStyle>,
+ { backgroundColor: indicatorColor }
+ ] }>
+ {/* @ts-ignore */}
<BaseIndicator
icon = { IconConnection }
// @ts-ignore
diff --git a/react/features/display-name/components/native/styles.js b/react/features/display-name/components/native/styles.js
index b5f5217f84..5533990130 100644
--- a/react/features/display-name/components/native/styles.js
+++ b/react/features/display-name/components/native/styles.js
@@ -6,7 +6,7 @@ export default {
displayNameBackdrop: {
alignSelf: 'center',
backgroundColor: BaseTheme.palette.ui16,
- borderRadius: 4,
+ borderRadius: BaseTheme.shape.borderRadius,
paddingHorizontal: BaseTheme.spacing[3],
paddingVertical: BaseTheme.spacing[1]
},
diff --git a/react/features/filmstrip/components/native/RaisedHandIndicator.js b/react/features/filmstrip/components/native/RaisedHandIndicator.js
index ab514eeb0d..07657d34c7 100644
--- a/react/features/filmstrip/components/native/RaisedHandIndicator.js
+++ b/react/features/filmstrip/components/native/RaisedHandIndicator.js
@@ -7,12 +7,21 @@ import { IconRaiseHand } from '../../../base/icons';
import { BaseIndicator } from '../../../base/react';
import { connect } from '../../../base/redux';
import AbstractRaisedHandIndicator, {
- type Props,
+ type Props as AbstractProps,
_mapStateToProps
} from '../AbstractRaisedHandIndicator';
import styles from './styles';
+
+type Props = AbstractProps & {
+
+ /**
+ * Whether or not tile view layout has been enabled as the user preference.
+ */
+ isTileViewEnabled: boolean
+};
+
/**
* Thumbnail badge showing that the participant would like to speak.
*
@@ -25,8 +34,13 @@ class RaisedHandIndicator extends AbstractRaisedHandIndicator<Props> {
* @returns {React$Element<*>}
*/
_renderIndicator() {
+ const { isTileViewEnabled } = this.props;
+ const raisedHandIndicatorStyles = isTileViewEnabled
+ ? styles.raisedHandIndicatorTileView
+ : styles.raisedHandIndicator;
+
return (
- <View style = { styles.raisedHandIndicator }>
+ <View style = { raisedHandIndicatorStyles }>
<BaseIndicator
icon = { IconRaiseHand }
iconStyle = { styles.raisedHandIcon } />
diff --git a/react/features/filmstrip/components/native/Thumbnail.js b/react/features/filmstrip/components/native/Thumbnail.js
index 9fb5326c31..d9a4e7d92f 100644
--- a/react/features/filmstrip/components/native/Thumbnail.js
+++ b/react/features/filmstrip/components/native/Thumbnail.js
@@ -31,6 +31,7 @@ import {
showSharedVideoMenu
} from '../../../participants-pane/actions.native';
import { toggleToolboxVisible } from '../../../toolbox/actions.native';
+import { shouldDisplayTileView } from '../../../video-layout';
import { SQUARE_TILE_ASPECT_RATIO } from '../../constants';
import AudioMutedIndicator from './AudioMutedIndicator';
@@ -65,6 +66,11 @@ type Props = {
*/
_isScreenShare: boolean,
+ /**
+ * Whether or not tile view layout has been enabled as the user preference.
+ */
+ _isTileViewEnabled: boolean,
+
/**
* Indicates whether the thumbnail is for a virtual screenshare participant.
*/
@@ -205,6 +211,7 @@ class Thumbnail extends PureComponent<Props> {
const {
_audioMuted: audioMuted,
_fakeParticipant,
+ _isTileViewEnabled,
_isScreenShare: isScreenShare,
_isVirtualScreenshare,
_renderModeratorIndicator: renderModeratorIndicator,
@@ -218,12 +225,13 @@ class Thumbnail extends PureComponent<Props> {
if (!_fakeParticipant || _isVirtualScreenshare) {
indicators.push(<View
key = 'top-left-indicators'
- style = { [
- styles.thumbnailTopIndicatorContainer,
- styles.thumbnailTopLeftIndicatorContainer
- ] }>
+ style = { styles.thumbnailTopLeftIndicatorContainer }>
{ !_isVirtualScreenshare && <ConnectionIndicator participantId = { participantId } /> }
- { !_isVirtualScreenshare && <RaisedHandIndicator participantId = { participantId } /> }
+ {
+ !_isVirtualScreenshare && <RaisedHandIndicator
+ isTileView = { _isTileViewEnabled }
+ participantId = { participantId } />
+ }
{ tileView && isScreenShare && (
<View style = { styles.indicatorContainer }>
<ScreenShareIndicator />
@@ -416,6 +424,7 @@ function _mapStateToProps(state, ownProps) {
_fakeParticipant: participant?.fakeParticipant,
_gifSrc: mode === 'chat' ? null : gifSrc,
_isScreenShare: isScreenShare,
+ _isTileViewEnabled: shouldDisplayTileView(state),
_isVirtualScreenshare: isScreenShareParticipant(participant),
_local: participant?.local,
_localVideoOwner: Boolean(ownerId === localParticipantId),
diff --git a/react/features/filmstrip/components/native/styles.js b/react/features/filmstrip/components/native/styles.js
index 9bed5de26e..51c3cb3167 100644
--- a/react/features/filmstrip/components/native/styles.js
+++ b/react/features/filmstrip/components/native/styles.js
@@ -14,10 +14,14 @@ const indicatorContainer = {
height: 24,
justifyContent: 'center',
margin: 2,
- minWidth: 16,
padding: 2
};
+const raisedHandIndicator = {
+ ...indicatorContainer,
+ backgroundColor: BaseTheme.palette.warning02
+};
+
/**
* The styles of the feature filmstrip.
*/
@@ -107,7 +111,7 @@ export default {
thumbnail: {
alignItems: 'stretch',
backgroundColor: BaseTheme.palette.ui02,
- borderColor: '#424242',
+ borderColor: BaseTheme.palette.border03,
borderRadius: BaseTheme.shape.borderRadius,
borderStyle: 'solid',
borderWidth: 1,
@@ -131,10 +135,10 @@ export default {
*/
thumbnailIndicatorContainer: {
...indicatorContainer,
- bottom: BaseTheme.spacing[1],
+ bottom: 3,
flex: 1,
flexDirection: 'row',
- left: BaseTheme.spacing[1],
+ left: 3,
position: 'absolute',
maxWidth: '95%',
overflow: 'hidden',
@@ -146,20 +150,22 @@ export default {
flexDirection: 'row'
},
- thumbnailTopIndicatorContainer: {
+ thumbnailTopLeftIndicatorContainer: {
+ ...indicatorContainer,
+ backgroundColor: 'unset',
flexDirection: 'row',
- padding: BaseTheme.spacing[1],
position: 'absolute',
- top: BaseTheme.spacing[0]
+ top: BaseTheme.spacing[1]
},
- thumbnailTopLeftIndicatorContainer: {
- left: BaseTheme.spacing[0]
+ raisedHandIndicator: {
+ ...raisedHandIndicator,
+ left: 14
},
- raisedHandIndicator: {
- ...indicatorContainer,
- backgroundColor: BaseTheme.palette.warning02
+ raisedHandIndicatorTileView: {
+ ...raisedHandIndicator,
+ left: 2
},
raisedHandIcon: {
@@ -172,7 +178,7 @@ export default {
},
thumbnailDominantSpeaker: {
- borderWidth: 4,
+ borderWidth: 2,
borderColor: BaseTheme.palette.action01Hover
},