fix(chat) Fix name overflows chat bubble (#13303)

Revert color change of scroll corner
pull/12314/merge
Robert Pintilii 2 years ago committed by GitHub
parent e3e5f1fbfa
commit d267b2499d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      css/_chat.scss
  2. 13
      react/features/chat/components/web/ChatMessage.tsx
  3. 9
      react/features/chat/components/web/MessageRecipient.tsx

@ -74,10 +74,6 @@
a:active { a:active {
color: black; color: black;
} }
&::-webkit-scrollbar-corner {
background: #3a3a3a;
}
} }

@ -23,17 +23,21 @@ interface IProps extends AbstractProps {
const styles = (theme: Theme) => { const styles = (theme: Theme) => {
return { return {
chatMessageWrapper: { chatMessageWrapper: {
maxWidth: '100%' maxWidth: '100%',
'&.remote': {
maxWidth: 'calc(100% - 40px)' // 100% - avatar and margin
}
}, },
chatMessage: { chatMessage: {
display: 'inline-flex', display: 'inline-flex',
padding: '12px', padding: '12px',
marginRight: '12px',
backgroundColor: theme.palette.ui02, backgroundColor: theme.palette.ui02,
borderRadius: '4px 12px 12px 12px', borderRadius: '4px 12px 12px 12px',
maxWidth: '100%', maxWidth: '100%',
marginTop: '4px', marginTop: '4px',
boxSizing: 'border-box' as const,
'&.privatemessage': { '&.privatemessage': {
backgroundColor: theme.palette.support05 backgroundColor: theme.palette.support05
@ -62,7 +66,8 @@ const styles = (theme: Theme) => {
replyWrapper: { replyWrapper: {
display: 'flex', display: 'flex',
flexDirection: 'row' as const, flexDirection: 'row' as const,
alignItems: 'center' alignItems: 'center',
maxWidth: '100%'
}, },
messageContent: { messageContent: {
@ -126,7 +131,7 @@ class ChatMessage extends AbstractChatMessage<IProps> {
return ( return (
<div <div
className = { classes.chatMessageWrapper } className = { clsx(classes.chatMessageWrapper, type) }
id = { this.props.message.messageId } id = { this.props.message.messageId }
tabIndex = { -1 }> tabIndex = { -1 }>
<div <div

@ -28,6 +28,13 @@ const useStyles = makeStyles()(theme => {
color: theme.palette.text01 color: theme.palette.text01
}, },
text: {
maxWidth: 'calc(100% - 30px)',
overflow: 'hidden',
whiteSpace: 'break-spaces',
wordBreak: 'break-all'
},
iconButton: { iconButton: {
padding: '2px', padding: '2px',
@ -72,7 +79,7 @@ const MessageRecipient = ({
className = { classes.container } className = { classes.container }
id = 'chat-recipient' id = 'chat-recipient'
role = 'alert'> role = 'alert'>
<span> <span className = { classes.text }>
{t(_isLobbyChatActive ? 'chat.lobbyChatMessageTo' : 'chat.messageTo', { {t(_isLobbyChatActive ? 'chat.lobbyChatMessageTo' : 'chat.messageTo', {
recipient: _isLobbyChatActive ? _lobbyMessageRecipient : _privateMessageRecipient recipient: _isLobbyChatActive ? _lobbyMessageRecipient : _privateMessageRecipient
})} })}

Loading…
Cancel
Save