瀏覽代碼

refactor: move chat component outside of videoconference_page (#11138)

master
Shahab 3 年之前
父節點
當前提交
3eafaeeedd
No account linked to committer's email address

+ 0
- 12
css/_base.scss 查看文件

@@ -43,18 +43,6 @@ body {
43 43
   outline: none;
44 44
 }
45 45
 
46
-/**
47
- * AtlasKit sets a default margin on the rendered modals, so
48
- * when the shift-right class is set when the chat opens, we
49
- * pad the modal container in order for the modals to be centered
50
- * while also taking the chat size into consideration.
51
-*/
52
-@media (min-width: 581px) {
53
-    .shift-right .atlaskit-portal > div:not(.Tooltip) {
54
-        padding-left: $sidebarWidth;
55
-    }
56
-}
57
-
58 46
 .jitsi-icon {
59 47
     &-default svg {
60 48
         fill: white;

+ 11
- 6
css/_chat.scss 查看文件

@@ -1,15 +1,20 @@
1 1
 #sideToolbarContainer {
2 2
     background-color: $chatBackgroundColor;
3
-    box-sizing: border-box;
4
-    color: #FFF;
5
-    height: 100%;
6
-    position: absolute;
7
-    top: 0;
3
+    flex-shrink: 0;
4
+    overflow: hidden;
5
+    position: relative;
6
+    transition: width .16s ease-in-out;
8 7
     width: $sidebarWidth;
9 8
     z-index: $sideToolbarContainerZ;
10 9
 
11 10
     @media (max-width: 580px) {
12
-        width: 100%;
11
+        height: 100vh;
12
+        height: -webkit-fill-available;
13
+        left: 0;
14
+        position: fixed;
15
+        right: 0;
16
+        top: 0;
17
+        width: auto;
13 18
     }
14 19
 }
15 20
 

+ 14
- 0
css/_mixins.scss 查看文件

@@ -193,3 +193,17 @@
193 193
 @mixin transparentBg($color, $alpha) {
194 194
     background-color: rgba(red($color), green($color), blue($color), $alpha);
195 195
 }
196
+
197
+/**
198
+ * Change the direction of the current element to LTR, but do not change the direction
199
+ * of its children; Keep them RTL.
200
+ */
201
+@mixin ltr {
202
+    body[dir=rtl] & {
203
+        direction: ltr;
204
+
205
+        & > * {
206
+            direction: rtl;
207
+        }
208
+    }
209
+}

+ 0
- 9
css/_participants-pane.scss 查看文件

@@ -6,10 +6,6 @@
6 6
     transition: width .16s ease-in-out;
7 7
     width: 315px;
8 8
     z-index: $zindex0;
9
-
10
-    &--closed {
11
-        width: 0;
12
-    }
13 9
 }
14 10
 
15 11
 .participants_pane-content {
@@ -34,11 +30,6 @@
34 30
         right: 0;
35 31
         top: 0;
36 32
         width: auto;
37
-
38
-        &--closed {
39
-            display: none;
40
-            width: auto;
41
-        }
42 33
     }
43 34
 
44 35
     .participants_pane-content {

+ 0
- 4
css/_subject.scss 查看文件

@@ -88,10 +88,6 @@
88 88
     max-width: calc(100% - 24px);
89 89
 }
90 90
 
91
-.shift-right .details-container {
92
-    margin-left: calc(#{$sidebarWidth} / 2);
93
-}
94
-
95 91
 @keyframes hideSubject {
96 92
     0% {
97 93
         max-width: 100%;

+ 5
- 7
css/_toolbars.scss 查看文件

@@ -39,13 +39,6 @@
39 39
     &.no-buttons {
40 40
         display: none;
41 41
     }
42
-
43
-    @media (min-width: 581px) {
44
-        &.shift-right {
45
-            margin-left: $sidebarWidth;
46
-            width: calc(100% - #{$sidebarWidth});
47
-        }
48
-    }
49 42
 }
50 43
 
51 44
 .toolbox-content {
@@ -99,6 +92,10 @@
99 92
     max-width: 100%;
100 93
     pointer-events: all;
101 94
     border-radius: 6px;
95
+
96
+    .toolbox-content-items {
97
+        @include ltr;
98
+    }
102 99
 }
103 100
 
104 101
 .toolbox-content-wrapper::after {
@@ -183,6 +180,7 @@
183 180
         }
184 181
 
185 182
         .toolbox-content-items {
183
+            @include ltr;
186 184
             border-radius: 0;
187 185
             display: flex;
188 186
             justify-content: space-evenly;

+ 1
- 9
css/_videolayout_default.scss 查看文件

@@ -6,6 +6,7 @@
6 6
 }
7 7
 
8 8
 #layout_wrapper {
9
+    @include ltr;
9 10
     display: flex;
10 11
     height: 100%;
11 12
 }
@@ -44,15 +45,6 @@
44 45
     position: relative;
45 46
     text-align: center;
46 47
     overflow: 'hidden';
47
-
48
-    @media (min-width: 581px) {
49
-        &.shift-right {
50
-            &#largeVideoContainer {
51
-                margin-left: $sidebarWidth;
52
-                width: calc(100% - #{$sidebarWidth});
53
-            }
54
-        }
55
-    }
56 48
 }
57 49
 
58 50
 #localVideoWrapper {

+ 0
- 11
css/filmstrip/_tile_view.scss 查看文件

@@ -41,17 +41,6 @@
41 41
         top: 0;
42 42
         width: 100%;
43 43
 
44
-        @media (min-width: 581px) {
45
-            &.shift-right {
46
-                margin-left: $sidebarWidth;
47
-                width: calc(100% - #{$sidebarWidth});
48
-
49
-                .remote-videos {
50
-                    width: calc(100vw - #{$sidebarWidth});
51
-                }
52
-            }
53
-        }
54
-
55 44
         &.collapse {
56 45
             #remoteVideos {
57 46
                 height: calc(100% - #{$newToolbarSizeMobile}) !important;

+ 1
- 0
css/premeeting/_premeeting-screens.scss 查看文件

@@ -137,6 +137,7 @@
137 137
                 }
138 138
 
139 139
                 .toolbox-content-items {
140
+                    @include ltr;
140 141
                     background: transparent;
141 142
                     box-shadow: none;
142 143
                     display: flex;

+ 1
- 2
react/features/conference/components/web/Conference.js 查看文件

@@ -230,13 +230,13 @@ class Conference extends AbstractConference<Props, *> {
230 230
                 onMouseEnter = { this._onMouseEnter }
231 231
                 onMouseLeave = { this._onMouseLeave }
232 232
                 onMouseMove = { this._onMouseMove } >
233
+                <Chat />
233 234
                 <div
234 235
                     className = { clsx(_layoutClassName, _showStageFilmstrip && 'stage-filmstrip') }
235 236
                     id = 'videoconference_page'
236 237
                     onMouseMove = { isMobileBrowser() ? undefined : this._onShowToolbar }
237 238
                     ref = { this._setBackground }>
238 239
                     <ConferenceInfo />
239
-
240 240
                     <Notice />
241 241
                     <div
242 242
                         id = 'videospace'
@@ -247,7 +247,6 @@ class Conference extends AbstractConference<Props, *> {
247 247
                     </div>
248 248
 
249 249
                     { _showPrejoin || _showLobby || <Toolbox /> }
250
-                    <Chat />
251 250
 
252 251
                     {_notificationsVisible && (_overflowDrawer
253 252
                         ? <JitsiPortal className = 'notification-portal'>

+ 4
- 10
react/features/notifications/components/web/NotificationsContainer.js 查看文件

@@ -3,6 +3,7 @@
3 3
 import { FlagGroupContext } from '@atlaskit/flag/flag-group';
4 4
 import { AtlasKitThemeProvider } from '@atlaskit/theme';
5 5
 import { withStyles } from '@material-ui/styles';
6
+import clsx from 'clsx';
6 7
 import React, { Component } from 'react';
7 8
 import { CSSTransition, TransitionGroup } from 'react-transition-group';
8 9
 
@@ -67,10 +68,6 @@ const useStyles = theme => {
67 68
             maxWidth: 'calc(100% - 32px)'
68 69
         },
69 70
 
70
-        containerChatOpen: {
71
-            left: '331px'
72
-        },
73
-
74 71
         transitionGroup: {
75 72
             '& > *': {
76 73
                 marginBottom: '20px',
@@ -166,12 +163,9 @@ class NotificationsContainer extends Component<Props> {
166 163
             <AtlasKitThemeProvider mode = 'light'>
167 164
                 <FlagGroupContext.Provider value = { this._api }>
168 165
                     <div
169
-                        className = { `${this.props.classes.container} ${this.props.portal
170
-                            ? this.props.classes.containerPortal
171
-                            : this.props._isChatOpen
172
-                                ? this.props.classes.containerChatOpen
173
-                                : ''}`
174
-                        }
166
+                        className = { clsx(this.props.classes.container, {
167
+                            [this.props.classes.containerPortal]: this.props.portal
168
+                        }) }
175 169
                         id = 'notifications-container'>
176 170
                         <TransitionGroup className = { this.props.classes.transitionGroup }>
177 171
                             {this._renderFlags()}

+ 2
- 2
react/features/participants-pane/components/web/ParticipantsPane.js 查看文件

@@ -12,7 +12,7 @@ import { connect } from '../../../base/redux';
12 12
 import { getBreakoutRoomsConfig } from '../../../breakout-rooms/functions';
13 13
 import { MuteEveryoneDialog } from '../../../video-menu/components/';
14 14
 import { close } from '../../actions';
15
-import { classList, findAncestorByClass, getParticipantsPaneOpen } from '../../functions';
15
+import { findAncestorByClass, getParticipantsPaneOpen } from '../../functions';
16 16
 import { AddBreakoutRoomButton } from '../breakout-rooms/components/web/AddBreakoutRoomButton';
17 17
 import { RoomList } from '../breakout-rooms/components/web/RoomList';
18 18
 
@@ -214,7 +214,7 @@ class ParticipantsPane extends Component<Props, State> {
214 214
         }
215 215
 
216 216
         return (
217
-            <div className = { classList('participants_pane', !_paneOpen && 'participants_pane--closed') }>
217
+            <div className = 'participants_pane'>
218 218
                 <div className = 'participants_pane-content'>
219 219
                     <div className = { classes.header }>
220 220
                         <div

+ 0
- 8
react/features/participants-pane/functions.js 查看文件

@@ -22,14 +22,6 @@ import { isInBreakoutRoom } from '../breakout-rooms/functions';
22 22
 
23 23
 import { QUICK_ACTION_BUTTON, REDUCER_KEY, MEDIA_STATE } from './constants';
24 24
 
25
-/**
26
- * Generates a class attribute value.
27
- *
28
- * @param {Iterable<string>} args - String iterable.
29
- * @returns {string} Class attribute value.
30
- */
31
-export const classList = (...args: Array<string | boolean>) => args.filter(Boolean).join(' ');
32
-
33 25
 /**
34 26
  * Find the first styled ancestor component of an element.
35 27
  *

Loading…
取消
儲存