ref(chat): clean up extra dom

This commit is contained in:
Leonard Kim 2019-05-03 14:26:28 -07:00 committed by virtuacoplenny
parent a8233bdb84
commit a49f62238b
2 changed files with 29 additions and 36 deletions

View File

@ -1,6 +1,9 @@
#sideToolbarContainer { #sideToolbarContainer {
background-color: $newToolbarBackgroundColor; 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 * Make the sidebar flush with the top of the toolbar. Take the size of
* the toolbar and subtract from 100%. * the toolbar and subtract from 100%.
@ -21,20 +24,6 @@
&.slideInExt { &.slideInExt {
left: 0; 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 { #chatconversation {
@ -166,7 +155,13 @@
right: 5px; right: 5px;
} }
#chat_container .display-name { .sideToolbarContainer {
* {
-webkit-user-select: text;
user-select: text;
}
.display-name {
float: left; float: left;
padding-left: 5px; padding-left: 5px;
font-weight: bold; font-weight: bold;
@ -176,11 +171,12 @@
overflow: hidden; overflow: hidden;
} }
#chat_container .timestamp { .timestamp {
float: right; float: right;
padding-right: 5px; padding-right: 5px;
font-size: 11px; font-size: 11px;
} }
}
.usermessage { .usermessage {
padding-top: 20px; padding-top: 20px;

View File

@ -103,15 +103,12 @@ class Chat extends AbstractChat<Props> {
ref = { this._setMessageListEndRef } />); ref = { this._setMessageListEndRef } />);
return ( return (
<div <>
className = 'sideToolbarContainer__inner'
id = 'chat_container'>
{ this._renderChatHeader() }
<div id = 'chatconversation'> <div id = 'chatconversation'>
{ messages } { messages }
</div> </div>
<ChatInput /> <ChatInput />
</div> </>
); );
} }
@ -167,11 +164,11 @@ class Chat extends AbstractChat<Props> {
const ComponentToRender = !_isOpen && state === 'exited' const ComponentToRender = !_isOpen && state === 'exited'
? null ? null
: ( : (
<div> <>
{ this._renderChatHeader() } { this._renderChatHeader() }
{ _showNamePrompt { _showNamePrompt
? <DisplayNameForm /> : this._renderChat() } ? <DisplayNameForm /> : this._renderChat() }
</div> </>
); );
let className = ''; let className = '';
@ -183,7 +180,7 @@ class Chat extends AbstractChat<Props> {
return ( return (
<div <div
className = { className } className = { `sideToolbarContainer ${className}` }
id = 'sideToolbarContainer'> id = 'sideToolbarContainer'>
{ ComponentToRender } { ComponentToRender }
</div> </div>