Bladeren bron

fix(filmstrip-only): vertically align center the toolbar (#1700)

* fix(filmstrip-only): vertically align center the toolbar

Use top 50% to position the toolbar's top at the vertical center
of the iframe. Then use transform 50% to move the toolbar itself
up 50% so its middle matches the middle of the iframe.

* squash: toolbox should center with filmstrip
efficient_tiling
virtuacoplenny 7 jaren geleden
bovenliggende
commit
84ae7df8f1

+ 0
- 1
css/_filmstrip.scss Bestand weergeven

@@ -135,7 +135,6 @@
135 135
     &__videos-filmstripOnly {
136 136
         margin-top: auto;
137 137
         margin-bottom: auto;
138
-        padding-right: $defaultFilmStripOnlyToolbarSize;
139 138
     }
140 139
 
141 140
     .remote-videos-container {

+ 8
- 3
css/_toolbars.scss Bestand weergeven

@@ -195,11 +195,8 @@
195 195
      */
196 196
     &_filmstrip-only {
197 197
         border-radius: 3px;
198
-        bottom: 0;
199 198
         display: inline-block;
200 199
         height: auto;
201
-        position: absolute;
202
-        right: 0;
203 200
         width: $defaultFilmStripOnlyToolbarSize;
204 201
 
205 202
         .button {
@@ -228,6 +225,14 @@
228 225
     }
229 226
 }
230 227
 
228
+.filmstrip-only {
229
+    .toolbox,
230
+    .toolbox-toolbars {
231
+        align-items: center;
232
+        display: flex;
233
+    }
234
+}
235
+
231 236
 .subject {
232 237
     background: linear-gradient(to bottom, rgba(255,255,255,.85) , rgba(255,255,255,.35));
233 238
     border-bottom-left-radius: 12px;

+ 23
- 0
css/_vertical_filmstrip_overrides.scss Bestand weergeven

@@ -93,6 +93,29 @@
93 93
         }
94 94
     }
95 95
 
96
+    &.filmstrip-only {
97
+        .filmstrip {
98
+            flex-direction: row-reverse;
99
+        }
100
+        .filmstrip__videos-filmstripOnly {
101
+            height: 100%;
102
+        }
103
+
104
+        /**
105
+         * In filmstrip only mode, the toolbar is normally displayed in the
106
+         * vertical center of the filmstrip strip. In vertical filmstrip mode,
107
+         * that alignment makes the toolbar appear floating and detached from
108
+         * the filmstrip. So, instead anchor the toolbar next to the local
109
+         * video.
110
+         */
111
+        .toolbar_filmstrip-only {
112
+            bottom: 0;
113
+            top: auto;
114
+            transform: none;
115
+        }
116
+
117
+    }
118
+
96 119
     /**
97 120
      * These styles are for the video labels that display on the top right. The
98 121
      * styles adjust the labels' positioning as the filmstrip itself or

+ 5
- 2
react/features/conference/components/Conference.web.js Bestand weergeven

@@ -13,6 +13,7 @@ import { HideNotificationBarStyle } from '../../unsupported-browser';
13 13
 
14 14
 declare var $: Function;
15 15
 declare var APP: Object;
16
+declare var interfaceConfig: Object;
16 17
 
17 18
 /**
18 19
  * The conference page of the Web application.
@@ -65,14 +66,16 @@ class Conference extends Component {
65 66
      * @returns {ReactElement}
66 67
      */
67 68
     render() {
69
+        const { filmStripOnly } = interfaceConfig;
70
+
68 71
         return (
69 72
             <div id = 'videoconference_page'>
70 73
                 <div id = 'videospace'>
71 74
                     <LargeVideo />
72
-                    <Filmstrip />
75
+                    <Filmstrip displayToolbox = { filmStripOnly } />
73 76
                 </div>
74 77
 
75
-                <Toolbox />
78
+                { filmStripOnly ? null : <Toolbox /> }
76 79
 
77 80
                 <DialogContainer />
78 81
                 <OverlayContainer />

+ 10
- 0
react/features/filmstrip/components/Filmstrip.web.js Bestand weergeven

@@ -2,6 +2,8 @@
2 2
 
3 3
 import React, { Component } from 'react';
4 4
 
5
+import { Toolbox } from '../../toolbox';
6
+
5 7
 /**
6 8
  * Implements a React {@link Component} which represents the filmstrip on
7 9
  * Web/React.
@@ -9,6 +11,13 @@ import React, { Component } from 'react';
9 11
  * @extends Component
10 12
  */
11 13
 export default class Filmstrip extends Component {
14
+    static propTypes = {
15
+        /**
16
+         * Whether or not the toolbox should be displayed within the filmstrip.
17
+         */
18
+        displayToolbox: React.PropTypes.bool
19
+    };
20
+
12 21
     /**
13 22
      * Implements React's {@link Component#render()}.
14 23
      *
@@ -18,6 +27,7 @@ export default class Filmstrip extends Component {
18 27
     render() {
19 28
         return (
20 29
             <div className = 'filmstrip'>
30
+                { this.props.displayToolbox ? <Toolbox /> : null }
21 31
                 <div
22 32
                     className = 'filmstrip__videos'
23 33
                     id = 'remoteVideos'>

+ 2
- 2
react/features/toolbox/components/Toolbox.web.js Bestand weergeven

@@ -108,7 +108,7 @@ class Toolbox extends Component {
108 108
      */
109 109
     render(): ReactElement<*> {
110 110
         return (
111
-            <div>
111
+            <div className = 'toolbox'>
112 112
                 {
113 113
                     this._renderSubject()
114 114
                 }
@@ -171,7 +171,7 @@ class Toolbox extends Component {
171 171
         }
172 172
 
173 173
         return (
174
-            <div>
174
+            <div className = 'toolbox-toolbars'>
175 175
                 <Notice />
176 176
                 <PrimaryToolbar />
177 177
                 <SecondaryToolbar />

Laden…
Annuleren
Opslaan