ソースを参照

ref(chat): clean up extra dom

master
Leonard Kim 6年前
コミット
a49f62238b
2個のファイルの変更29行の追加36行の削除
  1. 24
    28
      css/_chat.scss
  2. 5
    8
      react/features/chat/components/web/Chat.js

+ 24
- 28
css/_chat.scss ファイルの表示

@@ -1,6 +1,9 @@
1 1
 #sideToolbarContainer {
2 2
     background-color: $newToolbarBackgroundColor;
3
-
3
+    box-sizing: border-box;
4
+    color: #FFF;
5
+    display: flex;
6
+    flex-direction: column;
4 7
     /**
5 8
      * Make the sidebar flush with the top of the toolbar. Take the size of
6 9
      * the toolbar and subtract from 100%.
@@ -21,20 +24,6 @@
21 24
     &.slideInExt {
22 25
         left: 0;
23 26
     }
24
-
25
-    .sideToolbarContainer__inner {
26
-        box-sizing: border-box;
27
-        color: #FFF;
28
-        display: flex;
29
-        flex-direction: column;
30
-        height: 100%;
31
-        width: $sidebarWidth;
32
-    }
33
-}
34
-
35
-#chat_container * {
36
-    -webkit-user-select: text;
37
-    user-select: text;
38 27
 }
39 28
 
40 29
 #chatconversation {
@@ -166,20 +155,27 @@
166 155
     right: 5px;
167 156
 }
168 157
 
169
-#chat_container .display-name {
170
-    float: left;
171
-    padding-left: 5px;
172
-    font-weight: bold;
173
-    white-space: nowrap;
174
-    text-overflow: ellipsis;
175
-    width: 95%;
176
-    overflow: hidden;
177
-}
158
+.sideToolbarContainer {
159
+    * {
160
+        -webkit-user-select: text;
161
+        user-select: text;
162
+    }
163
+
164
+    .display-name {
165
+        float: left;
166
+        padding-left: 5px;
167
+        font-weight: bold;
168
+        white-space: nowrap;
169
+        text-overflow: ellipsis;
170
+        width: 95%;
171
+        overflow: hidden;
172
+    }
178 173
 
179
-#chat_container .timestamp {
180
-    float: right;
181
-    padding-right: 5px;
182
-    font-size: 11px;
174
+    .timestamp {
175
+        float: right;
176
+        padding-right: 5px;
177
+        font-size: 11px;
178
+    }
183 179
 }
184 180
 
185 181
 .usermessage {

+ 5
- 8
react/features/chat/components/web/Chat.js ファイルの表示

@@ -103,15 +103,12 @@ class Chat extends AbstractChat<Props> {
103 103
             ref = { this._setMessageListEndRef } />);
104 104
 
105 105
         return (
106
-            <div
107
-                className = 'sideToolbarContainer__inner'
108
-                id = 'chat_container'>
109
-                { this._renderChatHeader() }
106
+            <>
110 107
                 <div id = 'chatconversation'>
111 108
                     { messages }
112 109
                 </div>
113 110
                 <ChatInput />
114
-            </div>
111
+            </>
115 112
         );
116 113
     }
117 114
 
@@ -167,11 +164,11 @@ class Chat extends AbstractChat<Props> {
167 164
         const ComponentToRender = !_isOpen && state === 'exited'
168 165
             ? null
169 166
             : (
170
-                <div>
167
+                <>
171 168
                     { this._renderChatHeader() }
172 169
                     { _showNamePrompt
173 170
                         ? <DisplayNameForm /> : this._renderChat() }
174
-                </div>
171
+                </>
175 172
             );
176 173
         let className = '';
177 174
 
@@ -183,7 +180,7 @@ class Chat extends AbstractChat<Props> {
183 180
 
184 181
         return (
185 182
             <div
186
-                className = { className }
183
+                className = { `sideToolbarContainer ${className}` }
187 184
                 id = 'sideToolbarContainer'>
188 185
                 { ComponentToRender }
189 186
             </div>

読み込み中…
キャンセル
保存