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 {
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,7 +155,13 @@
right: 5px;
}
#chat_container .display-name {
.sideToolbarContainer {
* {
-webkit-user-select: text;
user-select: text;
}
.display-name {
float: left;
padding-left: 5px;
font-weight: bold;
@ -174,12 +169,13 @@
text-overflow: ellipsis;
width: 95%;
overflow: hidden;
}
}
#chat_container .timestamp {
.timestamp {
float: right;
padding-right: 5px;
font-size: 11px;
}
}
.usermessage {

View File

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