Browse Source

fix(filmstrip/toolbox) mobile ui adjustments

master
Calin Chitu 3 years ago
parent
commit
be152b12d7

+ 25
- 3
react/features/filmstrip/components/native/Filmstrip.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React, { PureComponent } from 'react';
3
 import React, { PureComponent } from 'react';
4
-import { FlatList, SafeAreaView } from 'react-native';
4
+import { FlatList } from 'react-native';
5
+import { SafeAreaView } from 'react-native-safe-area-context';
5
 
6
 
6
 import { getLocalParticipant } from '../../../base/participants';
7
 import { getLocalParticipant } from '../../../base/participants';
7
 import { Platform } from '../../../base/react';
8
 import { Platform } from '../../../base/react';
8
 import { connect } from '../../../base/redux';
9
 import { connect } from '../../../base/redux';
9
 import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
10
 import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
10
 import { shouldHideSelfView } from '../../../base/settings/functions.any';
11
 import { shouldHideSelfView } from '../../../base/settings/functions.any';
12
+import { isToolboxVisible } from '../../../toolbox/functions';
11
 import { setVisibleRemoteParticipants } from '../../actions';
13
 import { setVisibleRemoteParticipants } from '../../actions';
12
 import { isFilmstripVisible, shouldRemoteVideosBeVisible } from '../../functions';
14
 import { isFilmstripVisible, shouldRemoteVideosBeVisible } from '../../functions';
13
 
15
 
37
      */
39
      */
38
     _disableSelfView: boolean,
40
     _disableSelfView: boolean,
39
 
41
 
42
+    /**
43
+     * Whether or not the toolbox is displayed.
44
+     */
45
+    _isToolboxVisible: Boolean,
46
+
40
     _localParticipantId: string,
47
     _localParticipantId: string,
41
 
48
 
42
     /**
49
     /**
223
      * @returns {ReactElement}
230
      * @returns {ReactElement}
224
      */
231
      */
225
     render() {
232
     render() {
226
-        const { _aspectRatio, _localParticipantId, _participants, _visible, _disableSelfView } = this.props;
233
+        const {
234
+            _aspectRatio,
235
+            _disableSelfView,
236
+            _isToolboxVisible,
237
+            _localParticipantId,
238
+            _participants,
239
+            _visible
240
+        } = this.props;
227
 
241
 
228
         if (!_visible) {
242
         if (!_visible) {
229
             return null;
243
             return null;
248
         }
262
         }
249
 
263
 
250
         return (
264
         return (
251
-            <SafeAreaView style = { filmstripStyle }>
265
+            <SafeAreaView
266
+                edges = { [
267
+                    !_isToolboxVisible && 'bottom',
268
+                    'top',
269
+                    'left',
270
+                    'right'
271
+                ].filter(Boolean) }
272
+                style = { filmstripStyle }>
252
                 {
273
                 {
253
                     this._separateLocalThumbnail
274
                     this._separateLocalThumbnail
254
                         && !isNarrowAspectRatio
275
                         && !isNarrowAspectRatio
299
         _clientHeight: responsiveUI.clientHeight,
320
         _clientHeight: responsiveUI.clientHeight,
300
         _clientWidth: responsiveUI.clientWidth,
321
         _clientWidth: responsiveUI.clientWidth,
301
         _disableSelfView: disableSelfView,
322
         _disableSelfView: disableSelfView,
323
+        _isToolboxVisible: isToolboxVisible(state),
302
         _localParticipantId: getLocalParticipant(state)?.id,
324
         _localParticipantId: getLocalParticipant(state)?.id,
303
         _participants: showRemoteVideos ? remoteParticipants : NO_REMOTE_VIDEOS,
325
         _participants: showRemoteVideos ? remoteParticipants : NO_REMOTE_VIDEOS,
304
         _visible: enabled && isFilmstripVisible(state)
326
         _visible: enabled && isFilmstripVisible(state)

+ 1
- 1
react/features/filmstrip/components/native/styles.js View File

45
         flexDirection: 'row',
45
         flexDirection: 'row',
46
         flexGrow: 0,
46
         flexGrow: 0,
47
         justifyContent: 'flex-end',
47
         justifyContent: 'flex-end',
48
-        marginBottom: 5
48
+        marginBottom: BaseTheme.spacing[1]
49
     },
49
     },
50
 
50
 
51
     /**
51
     /**

+ 4
- 1
react/features/toolbox/components/native/styles.js View File

100
         flexGrow: 0,
100
         flexGrow: 0,
101
         height: '100%',
101
         height: '100%',
102
         width: '100%',
102
         width: '100%',
103
-        maxHeight: 80,
103
+
104
+        // TODO revisit this
105
+
106
+        maxHeight: 76,
104
         maxWidth: 580,
107
         maxWidth: 580,
105
         marginLeft: 'auto',
108
         marginLeft: 'auto',
106
         marginRight: 'auto'
109
         marginRight: 'auto'

Loading…
Cancel
Save