Browse Source

fix(Toolbox) Maintain overflow button visible at all times

* fix(Toolbox) Maintain overflow button visible at all times

* Make changes only on desktop browser
master
Mihai-Andrei Uscat 4 years ago
parent
commit
9379bb3c5b
No account linked to committer's email address
3 changed files with 126 additions and 126 deletions
  1. 71
    0
      css/_base.scss
  2. 49
    118
      css/_responsive.scss
  3. 6
    8
      react/features/toolbox/components/web/Toolbox.js

+ 71
- 0
css/_base.scss View File

@@ -201,3 +201,74 @@ form {
201 201
     background: rgba(0, 0, 0, .5);
202 202
     border-radius: 4px;
203 203
 }
204
+
205
+.desktop-browser {
206
+    @media only screen and (max-width: $smallScreen) {
207
+        .watermark {
208
+            width: 20%;
209
+            height: 20%;
210
+        }
211
+
212
+        .new-toolbox {
213
+            .toolbox-content {
214
+                .button-group-center, .button-group-left, .button-group-right {
215
+                    .toolbox-button {
216
+                        .toolbox-icon {
217
+                            width: 28px;
218
+                            height: 28px;
219
+                            svg {
220
+                                width: 18px;
221
+                                height: 18px;
222
+                            }
223
+                        }
224
+
225
+                        &:nth-child(2) {
226
+                            .toolbox-icon {
227
+                                width: 30px;
228
+                                height: 30px;
229
+                            }
230
+                        }
231
+                    }
232
+                }
233
+            }
234
+        }
235
+    }
236
+
237
+    @media only screen and (max-width: $verySmallScreen) {
238
+        #videoResolutionLabel {
239
+            display: none;
240
+        }
241
+        .vertical-filmstrip .filmstrip {
242
+            display: none;
243
+        }
244
+        .new-toolbox {
245
+            .toolbox-content {
246
+                .button-group-center, .button-group-left, .button-group-right {
247
+                    .settings-button-small-icon {
248
+                        display: none;
249
+                    }
250
+                    .toolbox-button {
251
+                        .toolbox-icon {
252
+                            width: 18px;
253
+                            height: 18px;
254
+                            svg {
255
+                                width: 12px;
256
+                                height: 12px;
257
+                            }
258
+                        }
259
+
260
+                        &:nth-child(2) {
261
+                            .toolbox-icon {
262
+                                width: 20px;
263
+                                height: 20px;
264
+                            }
265
+                        }
266
+                    }
267
+                }
268
+            }
269
+        }
270
+        .chrome-extension-banner {
271
+            display: none;
272
+        }
273
+    }
274
+}

+ 49
- 118
css/_responsive.scss View File

@@ -1,136 +1,67 @@
1
-@media only screen and (max-width: $smallScreen) {
2
-    .watermark {
3
-        width: 20%;
4
-        height: 20%;
5
-    }
6
-
7
-    .new-toolbox {
8
-        .toolbox-content {
9
-            .button-group-center, .button-group-left, .button-group-right {
10
-                .toolbox-button {
11
-                    .toolbox-icon {
12
-                        width: 28px;
13
-                        height: 28px;
14
-                        svg {
15
-                            width: 18px;
16
-                            height: 18px;
17
-                        }
18
-                    }
19
-
20
-                    &:nth-child(2) {
21
-                        .toolbox-icon {
22
-                            width: 30px;
23
-                            height: 30px;
24
-                        }
25
-                    }
26
-                }
1
+@media only screen and (max-width: $verySmallScreen) {
2
+    .welcome {
3
+        display: block;
4
+
5
+        #enter_room {
6
+            position: relative;
7
+            height: 42px;
8
+
9
+            .welcome-page-button {
10
+            font-size: 16px;
11
+            left: 0;
12
+            position: absolute;
13
+            top: 68px;
14
+            text-align: center;
15
+            width: 100%;
27 16
             }
28 17
         }
29
-    }
30
-}
31 18
 
32
-@media only screen and (max-width: $verySmallScreen) {
33
-  .welcome {
34
-      display: block;
19
+        .header {
20
+            background-color: #002637;
35 21
 
36
-      #enter_room {
37
-        position: relative;
38
-        height: 42px;
22
+            #enter_room {
23
+                .enter-room-input-container {
24
+                    padding-right: 0;
25
+                }
39 26
 
40
-        .welcome-page-button {
41
-          font-size: 16px;
42
-          left: 0;
43
-          position: absolute;
44
-          top: 68px;
45
-          text-align: center;
46
-          width: 100%;
27
+                .warning-without-link,
28
+                .warning-with-link {
29
+                    top: 120px;
30
+                }
31
+            }
47 32
         }
48
-      }
49
-
50
-      .header {
51
-          background-color: #002637;
52
-
53
-          #enter_room {
54
-              .enter-room-input-container {
55
-                  padding-right: 0;
56
-              }
57
-
58
-              .warning-without-link,
59
-              .warning-with-link {
60
-                  top: 120px;
61
-              }
62
-          }
63
-      }
64
-
65
-      .welcome-tabs {
66
-          display: none;
67
-      }
68
-
69
-      .header-text-title {
70
-        text-align: center;
71
-      }
72 33
 
73
-      .welcome-cards-container {
74
-        padding: 0;
75
-      }
76
-
77
-      &.without-content {
78
-        .header {
79
-          height: 100%;
34
+        .welcome-tabs {
35
+            display: none;
80 36
         }
81
-      }
82 37
 
83
-      #moderated-meetings {
84
-          display: none;
85
-      }
38
+        .header-text-title {
39
+            text-align: center;
40
+        }
86 41
 
87
-      .welcome-footer-row-block {
88
-          display: block;
89
-      }
90
-      .welcome-badge {
91
-          margin-right: 16px;
92
-      }
42
+        .welcome-cards-container {
43
+            padding: 0;
44
+        }
93 45
 
94
-      .welcome-footer {
95
-          display: none;
96
-      }
97
-  }
46
+        &.without-content {
47
+            .header {
48
+            height: 100%;
49
+            }
50
+        }
98 51
 
99
-    #videoResolutionLabel {
100
-        display: none;
101
-    }
102
-    .desktop-browser {
103
-        .vertical-filmstrip .filmstrip {
52
+        #moderated-meetings {
104 53
             display: none;
105 54
         }
106
-    }
107
-    .new-toolbox {
108
-        .toolbox-content {
109
-            .button-group-center, .button-group-left, .button-group-right {
110
-                .settings-button-small-icon {
111
-                    display: none;
112
-                }
113
-                .toolbox-button {
114
-                    .toolbox-icon {
115
-                        width: 18px;
116
-                        height: 18px;
117
-                        svg {
118
-                            width: 12px;
119
-                            height: 12px;
120
-                        }
121
-                    }
122 55
 
123
-                    &:nth-child(2) {
124
-                        .toolbox-icon {
125
-                            width: 20px;
126
-                            height: 20px;
127
-                        }
128
-                    }
129
-                }
130
-            }
56
+        .welcome-footer-row-block {
57
+            display: block;
58
+        }
59
+        .welcome-badge {
60
+            margin-right: 16px;
61
+        }
62
+
63
+        .welcome-footer {
64
+            display: none;
131 65
         }
132
-    }
133
-    .chrome-extension-banner {
134
-        display: none;
135 66
     }
136 67
 }

+ 6
- 8
react/features/toolbox/components/web/Toolbox.js View File

@@ -1221,7 +1221,7 @@ class Toolbox extends Component<Props, State> {
1221 1221
             t
1222 1222
         } = this.props;
1223 1223
         const overflowMenuContent = this._renderOverflowMenuContent();
1224
-        const overflowHasItems = Boolean(overflowMenuContent.filter(child => child).length);
1224
+        const overflowHasItems = Boolean(overflowMenuContent.length);
1225 1225
         const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
1226 1226
         const buttonsLeft = [];
1227 1227
         const buttonsRight = [];
@@ -1232,10 +1232,10 @@ class Toolbox extends Component<Props, State> {
1232 1232
         let minSpaceBetweenButtons = 48;
1233 1233
         let widthPlusPaddingOfButton = 56;
1234 1234
 
1235
-        if (this.state.windowWidth <= verySmallThreshold) {
1235
+        if (this.state.windowWidth <= verySmallThreshold && !isMobileBrowser()) {
1236 1236
             minSpaceBetweenButtons = 26;
1237 1237
             widthPlusPaddingOfButton = 28;
1238
-        } else if (this.state.windowWidth <= smallThreshold) {
1238
+        } else if (this.state.windowWidth <= smallThreshold && !isMobileBrowser()) {
1239 1239
             minSpaceBetweenButtons = 36;
1240 1240
             widthPlusPaddingOfButton = 40;
1241 1241
         }
@@ -1250,8 +1250,6 @@ class Toolbox extends Component<Props, State> {
1250 1250
             / 2 // divide by the number of groups(left and right group)
1251 1251
         );
1252 1252
 
1253
-        const showOverflowMenu = this.state.windowWidth >= verySmallThreshold || isMobileBrowser();
1254
-
1255 1253
         if (this._shouldShowButton('chat')) {
1256 1254
             buttonsLeft.push('chat');
1257 1255
         }
@@ -1265,7 +1263,7 @@ class Toolbox extends Component<Props, State> {
1265 1263
         if (this._shouldShowButton('closedcaptions')) {
1266 1264
             buttonsLeft.push('closedcaptions');
1267 1265
         }
1268
-        if (overflowHasItems && showOverflowMenu) {
1266
+        if (overflowHasItems) {
1269 1267
             buttonsRight.push('overflowmenu');
1270 1268
         }
1271 1269
         if (this._shouldShowButton('invite')) {
@@ -1288,13 +1286,13 @@ class Toolbox extends Component<Props, State> {
1288 1286
             movedButtons.push(...buttonsLeft.splice(
1289 1287
                 maxNumberOfButtonsPerGroup,
1290 1288
                 buttonsLeft.length - maxNumberOfButtonsPerGroup));
1291
-            if (buttonsRight.indexOf('overflowmenu') === -1 && showOverflowMenu) {
1289
+            if (buttonsRight.indexOf('overflowmenu') === -1) {
1292 1290
                 buttonsRight.unshift('overflowmenu');
1293 1291
             }
1294 1292
         }
1295 1293
 
1296 1294
         if (buttonsRight.length > maxNumberOfButtonsPerGroup) {
1297
-            if (buttonsRight.indexOf('overflowmenu') === -1 && showOverflowMenu) {
1295
+            if (buttonsRight.indexOf('overflowmenu') === -1) {
1298 1296
                 buttonsRight.unshift('overflowmenu');
1299 1297
             }
1300 1298
 

Loading…
Cancel
Save