浏览代码

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

factor2
Shahab 3 年前
父节点
当前提交
3eafaeeedd
没有帐户链接到提交者的电子邮件

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

43
   outline: none;
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
 .jitsi-icon {
46
 .jitsi-icon {
59
     &-default svg {
47
     &-default svg {
60
         fill: white;
48
         fill: white;

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

1
 #sideToolbarContainer {
1
 #sideToolbarContainer {
2
     background-color: $chatBackgroundColor;
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
     width: $sidebarWidth;
7
     width: $sidebarWidth;
9
     z-index: $sideToolbarContainerZ;
8
     z-index: $sideToolbarContainerZ;
10
 
9
 
11
     @media (max-width: 580px) {
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
 @mixin transparentBg($color, $alpha) {
193
 @mixin transparentBg($color, $alpha) {
194
     background-color: rgba(red($color), green($color), blue($color), $alpha);
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
     transition: width .16s ease-in-out;
6
     transition: width .16s ease-in-out;
7
     width: 315px;
7
     width: 315px;
8
     z-index: $zindex0;
8
     z-index: $zindex0;
9
-
10
-    &--closed {
11
-        width: 0;
12
-    }
13
 }
9
 }
14
 
10
 
15
 .participants_pane-content {
11
 .participants_pane-content {
34
         right: 0;
30
         right: 0;
35
         top: 0;
31
         top: 0;
36
         width: auto;
32
         width: auto;
37
-
38
-        &--closed {
39
-            display: none;
40
-            width: auto;
41
-        }
42
     }
33
     }
43
 
34
 
44
     .participants_pane-content {
35
     .participants_pane-content {

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

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

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

39
     &.no-buttons {
39
     &.no-buttons {
40
         display: none;
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
 .toolbox-content {
44
 .toolbox-content {
99
     max-width: 100%;
92
     max-width: 100%;
100
     pointer-events: all;
93
     pointer-events: all;
101
     border-radius: 6px;
94
     border-radius: 6px;
95
+
96
+    .toolbox-content-items {
97
+        @include ltr;
98
+    }
102
 }
99
 }
103
 
100
 
104
 .toolbox-content-wrapper::after {
101
 .toolbox-content-wrapper::after {
183
         }
180
         }
184
 
181
 
185
         .toolbox-content-items {
182
         .toolbox-content-items {
183
+            @include ltr;
186
             border-radius: 0;
184
             border-radius: 0;
187
             display: flex;
185
             display: flex;
188
             justify-content: space-evenly;
186
             justify-content: space-evenly;

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

6
 }
6
 }
7
 
7
 
8
 #layout_wrapper {
8
 #layout_wrapper {
9
+    @include ltr;
9
     display: flex;
10
     display: flex;
10
     height: 100%;
11
     height: 100%;
11
 }
12
 }
44
     position: relative;
45
     position: relative;
45
     text-align: center;
46
     text-align: center;
46
     overflow: 'hidden';
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
 #localVideoWrapper {
50
 #localVideoWrapper {

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

41
         top: 0;
41
         top: 0;
42
         width: 100%;
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
         &.collapse {
44
         &.collapse {
56
             #remoteVideos {
45
             #remoteVideos {
57
                 height: calc(100% - #{$newToolbarSizeMobile}) !important;
46
                 height: calc(100% - #{$newToolbarSizeMobile}) !important;

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

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

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

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

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

3
 import { FlagGroupContext } from '@atlaskit/flag/flag-group';
3
 import { FlagGroupContext } from '@atlaskit/flag/flag-group';
4
 import { AtlasKitThemeProvider } from '@atlaskit/theme';
4
 import { AtlasKitThemeProvider } from '@atlaskit/theme';
5
 import { withStyles } from '@material-ui/styles';
5
 import { withStyles } from '@material-ui/styles';
6
+import clsx from 'clsx';
6
 import React, { Component } from 'react';
7
 import React, { Component } from 'react';
7
 import { CSSTransition, TransitionGroup } from 'react-transition-group';
8
 import { CSSTransition, TransitionGroup } from 'react-transition-group';
8
 
9
 
67
             maxWidth: 'calc(100% - 32px)'
68
             maxWidth: 'calc(100% - 32px)'
68
         },
69
         },
69
 
70
 
70
-        containerChatOpen: {
71
-            left: '331px'
72
-        },
73
-
74
         transitionGroup: {
71
         transitionGroup: {
75
             '& > *': {
72
             '& > *': {
76
                 marginBottom: '20px',
73
                 marginBottom: '20px',
166
             <AtlasKitThemeProvider mode = 'light'>
163
             <AtlasKitThemeProvider mode = 'light'>
167
                 <FlagGroupContext.Provider value = { this._api }>
164
                 <FlagGroupContext.Provider value = { this._api }>
168
                     <div
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
                         id = 'notifications-container'>
169
                         id = 'notifications-container'>
176
                         <TransitionGroup className = { this.props.classes.transitionGroup }>
170
                         <TransitionGroup className = { this.props.classes.transitionGroup }>
177
                             {this._renderFlags()}
171
                             {this._renderFlags()}

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

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

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

22
 
22
 
23
 import { QUICK_ACTION_BUTTON, REDUCER_KEY, MEDIA_STATE } from './constants';
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
  * Find the first styled ancestor component of an element.
26
  * Find the first styled ancestor component of an element.
35
  *
27
  *

正在加载...
取消
保存