Browse Source

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

ref(toolbar): remove use-new-toolbox class
master
Zoltan Bettenbuk 7 years ago
parent
commit
e01acd9cf0
No account linked to committer's email address

+ 12
- 0
css/_atlaskit_overrides.scss View File

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 View File

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

+ 6
- 15
css/_filmstrip.scss View File

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

+ 18
- 28
css/_side_toolbar_container.scss View File

1
 /**
1
 /**
2
  * Toolbar side panel main container element.
2
  * Toolbar side panel main container element.
3
  */
3
  */
4
-.use-new-toolbox #sideToolbarContainer {
4
+#sideToolbarContainer {
5
     background-color: $newToolbarBackgroundColor;
5
     background-color: $newToolbarBackgroundColor;
6
-
7
     /**
6
     /**
8
      * Make the sidebar flush with the top of the toolbar. Take the size of
7
      * Make the sidebar flush with the top of the toolbar. Take the size of
9
      * the toolbar and subtract from 100%.
8
      * the toolbar and subtract from 100%.
10
      */
9
      */
11
     height: calc(100% - #{$newToolbarSizeWithPadding});
10
     height: calc(100% - #{$newToolbarSizeWithPadding});
12
     left: 0;
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
     max-width: $sidebarWidth;
12
     max-width: $sidebarWidth;
40
     overflow: hidden;
13
     overflow: hidden;
41
     position: absolute;
14
     position: absolute;
112
             margin-top: 0 !important;
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 View File

19
     vertical-align: middle;
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
  * TODO: when the old filmstrip has been removed, remove the "new-" prefix.
23
  * TODO: when the old filmstrip has been removed, remove the "new-" prefix.
35
  */
24
  */

+ 9
- 14
css/_vertical_filmstrip_overrides.scss View File

19
         text-align: left;
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
     .filmstrip {
22
     .filmstrip {
37
         align-items: flex-end;
23
         align-items: flex-end;
38
         box-sizing: border-box;
24
         box-sizing: border-box;
46
          * any parent is also fixed.
32
          * any parent is also fixed.
47
          */
33
          */
48
         position: fixed;
34
         position: fixed;
35
+        top: 0;
36
+        transition: height .3s ease-in;
49
         z-index: $filmstripVideosZ;
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
          * Hide videos by making them slight to the right.
47
          * Hide videos by making them slight to the right.
53
          */
48
          */

+ 1
- 0
css/main.scss View File

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

+ 1
- 4
css/modals/invite/_info.scss View File

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

+ 0
- 6
modules/UI/UI.js View File

319
 
319
 
320
         // Initialize side panels
320
         // Initialize side panels
321
         SidePanels.init(eventEmitter);
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
     interfaceConfig.VERTICAL_FILMSTRIP
324
     interfaceConfig.VERTICAL_FILMSTRIP

+ 44
- 58
react/features/filmstrip/components/web/Filmstrip.js View File

1
 /* @flow */
1
 /* @flow */
2
 
2
 
3
 import _ from 'lodash';
3
 import _ from 'lodash';
4
-import PropTypes from 'prop-types';
5
 import React, { Component } from 'react';
4
 import React, { Component } from 'react';
6
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
7
 
6
 
13
 
12
 
14
 declare var interfaceConfig: Object;
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
  * Implements a React {@link Component} which represents the filmstrip on
43
  * Implements a React {@link Component} which represents the filmstrip on
18
  * Web/React.
44
  * Web/React.
19
  *
45
  *
20
  * @extends Component
46
  * @extends Component
21
  */
47
  */
22
-class Filmstrip extends Component<*> {
48
+class Filmstrip extends Component <Props> {
23
     _isHovered: boolean;
49
     _isHovered: boolean;
24
 
50
 
25
     _notifyOfHoveredStateUpdate: Function;
51
     _notifyOfHoveredStateUpdate: Function;
28
 
54
 
29
     _onMouseOver: Function;
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
      * Initializes a new {@code Filmstrip} instance.
58
      * Initializes a new {@code Filmstrip} instance.
67
      *
59
      *
68
      * @param {Object} props - The read-only properties with which the new
60
      * @param {Object} props - The read-only properties with which the new
69
      * instance is to be initialized.
61
      * instance is to be initialized.
70
      */
62
      */
71
-    constructor(props) {
63
+    constructor(props: Props) {
72
         super(props);
64
         super(props);
73
 
65
 
74
         // Debounce the method for dispatching the new filmstrip handled state
66
         // Debounce the method for dispatching the new filmstrip handled state
95
      * @returns {ReactElement}
87
      * @returns {ReactElement}
96
      */
88
      */
97
     render() {
89
     render() {
98
-        const {
99
-            _filmstripOnly,
100
-            _remoteVideosVisible,
101
-            _toolboxVisible
102
-        } = this.props;
103
-
104
         // Note: Appending of {@code RemoteVideo} views is handled through
90
         // Note: Appending of {@code RemoteVideo} views is handled through
105
         // VideoLayout. The views do not get blown away on render() because
91
         // VideoLayout. The views do not get blown away on render() because
106
         // ReactDOMComponent is only aware of the given JSX and not new appended
92
         // ReactDOMComponent is only aware of the given JSX and not new appended
107
         // DOM. As such, when updateDOMProperties gets called, only attributes
93
         // DOM. As such, when updateDOMProperties gets called, only attributes
108
         // will get updated without replacing the DOM. If the known DOM gets
94
         // will get updated without replacing the DOM. If the known DOM gets
109
         // modified, then the views will get blown away.
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
         return (
97
         return (
118
-            <div className = { classNames }>
119
-                { _filmstripOnly && <Toolbar /> }
98
+            <div className = { `filmstrip ${this.props._className}` }>
99
+                { this.props._filmstripOnly && <Toolbar /> }
120
                 <div
100
                 <div
121
                     className = 'filmstrip__videos'
101
                     className = 'filmstrip__videos'
122
                     id = 'remoteVideos'>
102
                     id = 'remoteVideos'>
191
  * @param {Object} state - The Redux state.
171
  * @param {Object} state - The Redux state.
192
  * @private
172
  * @private
193
  * @returns {{
173
  * @returns {{
194
- *     _filmstripOnly: boolean,
174
+ *     _className: string,
195
  *     _hovered: boolean,
175
  *     _hovered: boolean,
196
- *     _remoteVideosVisible: boolean,
197
- *     _toolboxVisible: boolean
176
+ *     _filmstripOnly: boolean
198
  * }}
177
  * }}
199
  */
178
  */
200
 function _mapStateToProps(state) {
179
 function _mapStateToProps(state) {
201
     const { hovered } = state['features/filmstrip'];
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
     return {
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
 

Loading…
Cancel
Save