Quellcode durchsuchen

Merge pull request #3187 from virtuacoplenny/lenny/cleanup-new-toolbox-css

ref(toolbar): remove use-new-toolbox class
master
Zoltan Bettenbuk vor 7 Jahren
Ursprung
Commit
e01acd9cf0
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 12
- 0
css/_atlaskit_overrides.scss Datei anzeigen

@@ -0,0 +1,12 @@
1
+/**
2
+ * Move Atlaskit Flag up a little bit so it does not cover the toolbar with the
3
+ * first notification.
4
+ */
5
+.cxGWJB{
6
+    bottom: calc(#{$newToolbarSizeWithPadding}) !important;
7
+}
8
+.gXSEsl:nth-child(n+2) {
9
+    transform: translateX(0) translateY(100%) translateY(16px) !important;
10
+    -ms-transform: translateX(0) translateY(100%) translateY(16px) !important;
11
+    -webkit-transform: translateX(0) translateY(100%) translateY(16px) !important;
12
+}

+ 12
- 40
css/_chat.scss Datei anzeigen

@@ -6,7 +6,7 @@
6 6
 #chatconversation {
7 7
     visibility: hidden;
8 8
     position: relative;
9
-    top: 5px;
9
+    top: 15px;
10 10
     padding: 5px;
11 11
     text-align: left;
12 12
     line-height: 20px;
@@ -60,37 +60,7 @@
60 60
 }
61 61
 
62 62
 .localuser {
63
-    color: #087dba;
64
-}
65
-.use-new-toolbox {
66
-    .chatmessage {
67
-        color: white;
68
-    }
69
-
70
-    .localuser {
71
-        color: #4C9AFF;
72
-    }
73
-
74
-    .remoteuser {
75
-        color: #B8C7E0;
76
-    }
77
-
78
-    #usermsg {
79
-        color: white;
80
-    }
81
-
82
-    .chatmessage,
83
-    #smileysarea,
84
-    #smileysContainer,
85
-    #usermsg {
86
-        background-color: $newToolbarBackgroundColor;
87
-    }
88
-
89
-    .smileyContainer:hover {
90
-        background-color: $newToolbarButtonToggleColor;
91
-        border-radius: 5px;
92
-        cursor: pointer;
93
-    }
63
+    color: #4C9AFF
94 64
 }
95 65
 
96 66
 .errorMessage {
@@ -98,10 +68,11 @@
98 68
 }
99 69
 
100 70
 .remoteuser {
101
-    color: white;
71
+    color: #B8C7E0;
102 72
 }
103 73
 
104 74
 #usermsg {
75
+    background-color: $newToolbarBackgroundColor;
105 76
     visibility:hidden;
106 77
     position: absolute;
107 78
     bottom: 0px;
@@ -112,8 +83,7 @@
112 83
     max-height:150px;
113 84
     min-height:35px;
114 85
     border: 0px none;
115
-    background: #3a3a3a;
116
-    color: #a7a7a7;
86
+    color: white;
117 87
     box-shadow: none;
118 88
     border-radius:0;
119 89
     font-size: 10pt;
@@ -183,7 +153,7 @@
183 153
 }
184 154
 
185 155
 .chatmessage {
186
-    background: #3a3a3a;
156
+    background-color: $newToolbarBackgroundColor;;
187 157
     width: 93%;
188 158
     margin-left: 9px;
189 159
     margin-right: auto;
@@ -191,7 +161,7 @@
191 161
     border-top-left-radius: 0px;
192 162
     margin-top: 3px;
193 163
     left: 5px;
194
-    color: #a7a7a7;
164
+    color: white;
195 165
     overflow: hidden;
196 166
     padding-bottom: 3px;
197 167
 }
@@ -227,7 +197,7 @@
227 197
     max-height:150px;
228 198
     min-height:35px;
229 199
     border: 0px none;
230
-    background: #3a3a3a;
200
+    background-color: $newToolbarBackgroundColor;
231 201
     overflow: hidden;
232 202
     visibility: hidden;
233 203
 }
@@ -239,7 +209,7 @@
239 209
 #smileysContainer {
240 210
     display: none;
241 211
     position: absolute;
242
-    background: #3a3a3a;
212
+    background-color: $newToolbarBackgroundColor;
243 213
     border-bottom: 1px solid;
244 214
     border-top: 1px solid;
245 215
     width: 100%;
@@ -257,7 +227,9 @@
257 227
 }
258 228
 
259 229
 .smileyContainer:hover {
260
-    background: #3e3e3e;
230
+    background-color: $newToolbarButtonToggleColor;
231
+    border-radius: 5px;
232
+    cursor: pointer;
261 233
 }
262 234
 
263 235
 #usermsg::-webkit-input-placeholder {

+ 6
- 15
css/_filmstrip.scss Datei anzeigen

@@ -5,28 +5,19 @@
5 5
     justify-content: flex-start;
6 6
 }
7 7
 
8
-.use-new-toolbox {
9
-    .filmstrip.reduce-height {
10
-        bottom: $newToolbarSizeWithPadding;
11
-    }
12
-
13
-    .filmstrip {
14
-        transition: bottom .3s;
15
-    }
16
-
17
-    .filmstrip__videos.hidden {
18
-        bottom: calc(-196px - #{$newToolbarSizeWithPadding});
19
-    }
20
-}
21
-
22 8
 .filmstrip {
23 9
     position: absolute;
24 10
     bottom: 0;
25 11
     right: 0;
26 12
     padding: 10px 5px;
27 13
     @extend %align-right;
14
+    transition: bottom .3s;
28 15
     z-index: $filmstripVideosZ;
29 16
 
17
+    &.reduce-height {
18
+        bottom: $newToolbarSizeWithPadding;
19
+    }
20
+
30 21
     &__toolbar {
31 22
         @include flex();
32 23
         flex-direction: column-reverse;
@@ -83,7 +74,7 @@
83 74
         }
84 75
 
85 76
         &.hidden {
86
-            bottom: -196px;
77
+            bottom: calc(-196px - #{$newToolbarSizeWithPadding});
87 78
         }
88 79
 
89 80
         .remote-videos-container {

+ 18
- 28
css/_side_toolbar_container.scss Datei anzeigen

@@ -1,41 +1,14 @@
1 1
 /**
2 2
  * Toolbar side panel main container element.
3 3
  */
4
-.use-new-toolbox #sideToolbarContainer {
4
+#sideToolbarContainer {
5 5
     background-color: $newToolbarBackgroundColor;
6
-
7 6
     /**
8 7
      * Make the sidebar flush with the top of the toolbar. Take the size of
9 8
      * the toolbar and subtract from 100%.
10 9
      */
11 10
     height: calc(100% - #{$newToolbarSizeWithPadding});
12 11
     left: 0;
13
-
14
-    .side-toolbar-close {
15
-        background: gray;
16
-        border: 3px solid rgba(255, 255, 255, 0.1);
17
-        border-radius: 100%;
18
-        color: white;
19
-        cursor:pointer;
20
-        height: 10px;
21
-        line-height: 10px;
22
-        padding: 4px;
23
-        position: absolute;
24
-        right: 5px;
25
-        text-align: center;
26
-        top: 5px;
27
-        width: 10px;
28
-        z-index: 1;
29
-    }
30
-
31
-    #chatconversation {
32
-        top: 15px;
33
-    }
34
-}
35
-#sideToolbarContainer {
36
-    background-color: $sideToolbarContainerBg;
37
-    height: 100%;
38
-    left: $defaultToolbarSize;
39 12
     max-width: $sidebarWidth;
40 13
     overflow: hidden;
41 14
     position: absolute;
@@ -112,4 +85,21 @@
112 85
             margin-top: 0 !important;
113 86
         }
114 87
     }
88
+
89
+    .side-toolbar-close {
90
+        background: gray;
91
+        border: 3px solid rgba(255, 255, 255, 0.1);
92
+        border-radius: 100%;
93
+        color: white;
94
+        cursor:pointer;
95
+        height: 10px;
96
+        line-height: 10px;
97
+        padding: 4px;
98
+        position: absolute;
99
+        right: 5px;
100
+        text-align: center;
101
+        top: 5px;
102
+        width: 10px;
103
+        z-index: 1;
104
+    }
115 105
 }

+ 0
- 11
css/_toolbars.scss Datei anzeigen

@@ -19,17 +19,6 @@
19 19
     vertical-align: middle;
20 20
 }
21 21
 
22
-.use-new-toolbox {
23
-    .cxGWJB{
24
-        bottom: calc(#{$newToolbarSizeWithPadding});
25
-    }
26
-    .gXSEsl:nth-child(n+2) {
27
-        transform: translateX(0) translateY(100%) translateY(16px);
28
-        -ms-transform: translateX(0) translateY(100%) translateY(16px);
29
-        -webkit-transform: translateX(0) translateY(100%) translateY(16px);
30
-    }
31
-}
32
-
33 22
 /**
34 23
  * TODO: when the old filmstrip has been removed, remove the "new-" prefix.
35 24
  */

+ 9
- 14
css/_vertical_filmstrip_overrides.scss Datei anzeigen

@@ -19,20 +19,6 @@
19 19
         text-align: left;
20 20
     }
21 21
 
22
-    &.use-new-toolbox {
23
-        /**
24
-         * Adjust the height of the filmstrip as the toolbar is displayed.
25
-         */
26
-        .filmstrip {
27
-            top: 0;
28
-            transition: height .3s ease-in;
29
-
30
-            &.reduce-height {
31
-                height: calc(100% - #{$newToolbarSizeWithPadding});
32
-            }
33
-        }
34
-    }
35
-
36 22
     .filmstrip {
37 23
         align-items: flex-end;
38 24
         box-sizing: border-box;
@@ -46,8 +32,17 @@
46 32
          * any parent is also fixed.
47 33
          */
48 34
         position: fixed;
35
+        top: 0;
36
+        transition: height .3s ease-in;
49 37
         z-index: $filmstripVideosZ;
50 38
 
39
+        /**
40
+         * Adjust the height of the filmstrip as the toolbar is displayed.
41
+         */
42
+        &.reduce-height {
43
+            height: calc(100% - #{$newToolbarSizeWithPadding});
44
+        }
45
+
51 46
         /**
52 47
          * Hide videos by making them slight to the right.
53 48
          */

+ 1
- 0
css/main.scss Datei anzeigen

@@ -31,6 +31,7 @@
31 31
 /* Modules BEGIN */
32 32
 
33 33
 @import 'aui_reset';
34
+@import 'atlaskit_overrides';
34 35
 @import 'base';
35 36
 @import 'utils';
36 37
 @import 'overlay/overlay';

+ 1
- 4
css/modals/invite/_info.scss Datei anzeigen

@@ -1,10 +1,7 @@
1
-.use-new-toolbox {
2
-    font-size: 14px;
3
-}
4
-
5 1
 .info-dialog {
6 2
     cursor: default;
7 3
     display: flex;
4
+    font-size: 14px;
8 5
 
9 6
     .info-dialog-action-link {
10 7
         display: inline-block;

+ 0
- 6
modules/UI/UI.js Datei anzeigen

@@ -319,12 +319,6 @@ UI.start = function() {
319 319
 
320 320
         // Initialize side panels
321 321
         SidePanels.init(eventEmitter);
322
-
323
-        // TODO: remove this class once the old toolbar has been removed. This
324
-        // class is set so that any CSS changes needed to adjust elements
325
-        // outside of the new toolbar can be scoped to just the app with the new
326
-        // toolbar enabled.
327
-        $('body').addClass('use-new-toolbox');
328 322
     }
329 323
 
330 324
     interfaceConfig.VERTICAL_FILMSTRIP

+ 44
- 58
react/features/filmstrip/components/web/Filmstrip.js Datei anzeigen

@@ -1,7 +1,6 @@
1 1
 /* @flow */
2 2
 
3 3
 import _ from 'lodash';
4
-import PropTypes from 'prop-types';
5 4
 import React, { Component } from 'react';
6 5
 import { connect } from 'react-redux';
7 6
 
@@ -13,13 +12,40 @@ import Toolbar from './Toolbar';
13 12
 
14 13
 declare var interfaceConfig: Object;
15 14
 
15
+/**
16
+ * The type of the React {@code Component} props of {@link Filmstrip}.
17
+ */
18
+type Props = {
19
+
20
+    /**
21
+     * Additional CSS class names top add to the root.
22
+     */
23
+    _className: string,
24
+
25
+    /**
26
+     * Whether the UI/UX is filmstrip-only.
27
+     */
28
+    _filmstripOnly: boolean,
29
+
30
+    /**
31
+     * Whether or not remote videos are currently being hovered over. Hover
32
+     * handling is currently being handled detected outside of react.
33
+     */
34
+    _hovered: boolean,
35
+
36
+    /**
37
+     * The redux {@code dispatch} function.
38
+     */
39
+    dispatch: Dispatch<*>
40
+};
41
+
16 42
 /**
17 43
  * Implements a React {@link Component} which represents the filmstrip on
18 44
  * Web/React.
19 45
  *
20 46
  * @extends Component
21 47
  */
22
-class Filmstrip extends Component<*> {
48
+class Filmstrip extends Component <Props> {
23 49
     _isHovered: boolean;
24 50
 
25 51
     _notifyOfHoveredStateUpdate: Function;
@@ -28,47 +54,13 @@ class Filmstrip extends Component<*> {
28 54
 
29 55
     _onMouseOver: Function;
30 56
 
31
-    /**
32
-     * {@code Filmstrip} component's property types.
33
-     *
34
-     * @static
35
-     */
36
-    static propTypes = {
37
-        /**
38
-         * Whether the UI/UX is filmstrip-only.
39
-         */
40
-        _filmstripOnly: PropTypes.bool,
41
-
42
-        /**
43
-         * Whether or not remote videos are currently being hovered over.
44
-         */
45
-        _hovered: PropTypes.bool,
46
-
47
-        /**
48
-         * Whether or not the remote videos should be visible. Will toggle
49
-         * a class for hiding the videos.
50
-         */
51
-        _remoteVideosVisible: PropTypes.bool,
52
-
53
-        /**
54
-         * Whether or not the toolbox is visible. The height of the vertical
55
-         * filmstrip needs to adjust to accommodate the horizontal toolbox.
56
-         */
57
-        _toolboxVisible: PropTypes.bool,
58
-
59
-        /**
60
-         * The redux {@code dispatch} function.
61
-         */
62
-        dispatch: PropTypes.func
63
-    };
64
-
65 57
     /**
66 58
      * Initializes a new {@code Filmstrip} instance.
67 59
      *
68 60
      * @param {Object} props - The read-only properties with which the new
69 61
      * instance is to be initialized.
70 62
      */
71
-    constructor(props) {
63
+    constructor(props: Props) {
72 64
         super(props);
73 65
 
74 66
         // Debounce the method for dispatching the new filmstrip handled state
@@ -95,28 +87,16 @@ class Filmstrip extends Component<*> {
95 87
      * @returns {ReactElement}
96 88
      */
97 89
     render() {
98
-        const {
99
-            _filmstripOnly,
100
-            _remoteVideosVisible,
101
-            _toolboxVisible
102
-        } = this.props;
103
-
104 90
         // Note: Appending of {@code RemoteVideo} views is handled through
105 91
         // VideoLayout. The views do not get blown away on render() because
106 92
         // ReactDOMComponent is only aware of the given JSX and not new appended
107 93
         // DOM. As such, when updateDOMProperties gets called, only attributes
108 94
         // will get updated without replacing the DOM. If the known DOM gets
109 95
         // modified, then the views will get blown away.
110
-        const reduceHeight
111
-            = _toolboxVisible && interfaceConfig.TOOLBAR_BUTTONS.length;
112
-        const classNames
113
-            = `filmstrip ${
114
-                _remoteVideosVisible ? '' : 'hide-videos'} ${
115
-                reduceHeight ? 'reduce-height' : ''}`;
116 96
 
117 97
         return (
118
-            <div className = { classNames }>
119
-                { _filmstripOnly && <Toolbar /> }
98
+            <div className = { `filmstrip ${this.props._className}` }>
99
+                { this.props._filmstripOnly && <Toolbar /> }
120 100
                 <div
121 101
                     className = 'filmstrip__videos'
122 102
                     id = 'remoteVideos'>
@@ -191,20 +171,26 @@ class Filmstrip extends Component<*> {
191 171
  * @param {Object} state - The Redux state.
192 172
  * @private
193 173
  * @returns {{
194
- *     _filmstripOnly: boolean,
174
+ *     _className: string,
195 175
  *     _hovered: boolean,
196
- *     _remoteVideosVisible: boolean,
197
- *     _toolboxVisible: boolean
176
+ *     _filmstripOnly: boolean
198 177
  * }}
199 178
  */
200 179
 function _mapStateToProps(state) {
201 180
     const { hovered } = state['features/filmstrip'];
181
+    const isFilmstripOnly = Boolean(interfaceConfig.filmStripOnly);
182
+    const reduceHeight = !isFilmstripOnly
183
+        && state['features/toolbox'].visible
184
+        && interfaceConfig.TOOLBAR_BUTTONS.length;
185
+    const remoteVideosVisible = shouldRemoteVideosBeVisible(state);
186
+
187
+    const className = `${remoteVideosVisible ? '' : 'hide-videos'} ${
188
+        reduceHeight ? 'reduce-height' : ''}`;
202 189
 
203 190
     return {
204
-        _filmstripOnly: Boolean(interfaceConfig.filmStripOnly),
205
-        _hovered: hovered,
206
-        _remoteVideosVisible: shouldRemoteVideosBeVisible(state),
207
-        _toolboxVisible: state['features/toolbox'].visible
191
+        _className: className,
192
+        _filmstripOnly: isFilmstripOnly,
193
+        _hovered: hovered
208 194
     };
209 195
 }
210 196
 

Laden…
Abbrechen
Speichern