Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Robert Pintiliid267b2499df9
diff --git a/css/_chat.scss b/css/_chat.scss
index 77f44a4259..3bddd35fb8 100644
--- a/css/_chat.scss
+++ b/css/_chat.scss
@@ -74,10 +74,6 @@
a:active {
color: black;
}
-
- &::-webkit-scrollbar-corner {
- background: #3a3a3a;
- }
}
diff --git a/react/features/chat/components/web/ChatMessage.tsx b/react/features/chat/components/web/ChatMessage.tsx
index 10ca787109..fcf73199c2 100644
--- a/react/features/chat/components/web/ChatMessage.tsx
+++ b/react/features/chat/components/web/ChatMessage.tsx
@@ -23,17 +23,21 @@ interface IProps extends AbstractProps {
const styles = (theme: Theme) => {
return {
chatMessageWrapper: {
- maxWidth: '100%'
+ maxWidth: '100%',
+
+ '&.remote': {
+ maxWidth: 'calc(100% - 40px)' // 100% - avatar and margin
+ }
},
chatMessage: {
display: 'inline-flex',
padding: '12px',
- marginRight: '12px',
backgroundColor: theme.palette.ui02,
borderRadius: '4px 12px 12px 12px',
maxWidth: '100%',
marginTop: '4px',
+ boxSizing: 'border-box' as const,
'&.privatemessage': {
backgroundColor: theme.palette.support05
@@ -62,7 +66,8 @@ const styles = (theme: Theme) => {
replyWrapper: {
display: 'flex',
flexDirection: 'row' as const,
- alignItems: 'center'
+ alignItems: 'center',
+ maxWidth: '100%'
},
messageContent: {
@@ -126,7 +131,7 @@ class ChatMessage extends AbstractChatMessage<IProps> {
return (
<div
- className = { classes.chatMessageWrapper }
+ className = { clsx(classes.chatMessageWrapper, type) }
id = { this.props.message.messageId }
tabIndex = { -1 }>
<div
diff --git a/react/features/chat/components/web/MessageRecipient.tsx b/react/features/chat/components/web/MessageRecipient.tsx
index 094af88950..21d6ed046c 100644
--- a/react/features/chat/components/web/MessageRecipient.tsx
+++ b/react/features/chat/components/web/MessageRecipient.tsx
@@ -28,6 +28,13 @@ const useStyles = makeStyles()(theme => {
color: theme.palette.text01
},
+ text: {
+ maxWidth: 'calc(100% - 30px)',
+ overflow: 'hidden',
+ whiteSpace: 'break-spaces',
+ wordBreak: 'break-all'
+ },
+
iconButton: {
padding: '2px',
@@ -72,7 +79,7 @@ const MessageRecipient = ({
className = { classes.container }
id = 'chat-recipient'
role = 'alert'>
- <span>
+ <span className = { classes.text }>
{t(_isLobbyChatActive ? 'chat.lobbyChatMessageTo' : 'chat.messageTo', {
recipient: _isLobbyChatActive ? _lobbyMessageRecipient : _privateMessageRecipient
})}