From a49f62238b8ad7138d6fa1182e78f8537fef2051 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Fri, 3 May 2019 14:26:28 -0700 Subject: [PATCH] ref(chat): clean up extra dom --- css/_chat.scss | 52 ++++++++++------------ react/features/chat/components/web/Chat.js | 13 +++--- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/css/_chat.scss b/css/_chat.scss index e6ff124da..e7cc5da43 100644 --- a/css/_chat.scss +++ b/css/_chat.scss @@ -1,6 +1,9 @@ #sideToolbarContainer { background-color: $newToolbarBackgroundColor; - + box-sizing: border-box; + color: #FFF; + display: flex; + flex-direction: column; /** * Make the sidebar flush with the top of the toolbar. Take the size of * the toolbar and subtract from 100%. @@ -21,20 +24,6 @@ &.slideInExt { left: 0; } - - .sideToolbarContainer__inner { - box-sizing: border-box; - color: #FFF; - display: flex; - flex-direction: column; - height: 100%; - width: $sidebarWidth; - } -} - -#chat_container * { - -webkit-user-select: text; - user-select: text; } #chatconversation { @@ -166,20 +155,27 @@ right: 5px; } -#chat_container .display-name { - float: left; - padding-left: 5px; - font-weight: bold; - white-space: nowrap; - text-overflow: ellipsis; - width: 95%; - overflow: hidden; -} +.sideToolbarContainer { + * { + -webkit-user-select: text; + user-select: text; + } -#chat_container .timestamp { - float: right; - padding-right: 5px; - font-size: 11px; + .display-name { + float: left; + padding-left: 5px; + font-weight: bold; + white-space: nowrap; + text-overflow: ellipsis; + width: 95%; + overflow: hidden; + } + + .timestamp { + float: right; + padding-right: 5px; + font-size: 11px; + } } .usermessage { diff --git a/react/features/chat/components/web/Chat.js b/react/features/chat/components/web/Chat.js index 1bbf29b98..294d59dc5 100644 --- a/react/features/chat/components/web/Chat.js +++ b/react/features/chat/components/web/Chat.js @@ -103,15 +103,12 @@ class Chat extends AbstractChat { ref = { this._setMessageListEndRef } />); return ( -
- { this._renderChatHeader() } + <>
{ messages }
-
+ ); } @@ -167,11 +164,11 @@ class Chat extends AbstractChat { const ComponentToRender = !_isOpen && state === 'exited' ? null : ( -
+ <> { this._renderChatHeader() } { _showNamePrompt ? : this._renderChat() } -
+ ); let className = ''; @@ -183,7 +180,7 @@ class Chat extends AbstractChat { return (
{ ComponentToRender }