Преглед на файлове

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

Revert color change of scroll corner
factor2
Robert Pintilii преди 2 години
родител
ревизия
d267b2499d
No account linked to committer's email address
променени са 3 файла, в които са добавени 17 реда и са изтрити 9 реда
  1. 0
    4
      css/_chat.scss
  2. 9
    4
      react/features/chat/components/web/ChatMessage.tsx
  3. 8
    1
      react/features/chat/components/web/MessageRecipient.tsx

+ 0
- 4
css/_chat.scss Целия файл

@@ -74,10 +74,6 @@
74 74
     a:active {
75 75
         color: black;
76 76
     }
77
-
78
-    &::-webkit-scrollbar-corner {
79
-        background: #3a3a3a;
80
-    }
81 77
 }
82 78
 
83 79
 

+ 9
- 4
react/features/chat/components/web/ChatMessage.tsx Целия файл

@@ -23,17 +23,21 @@ interface IProps extends AbstractProps {
23 23
 const styles = (theme: Theme) => {
24 24
     return {
25 25
         chatMessageWrapper: {
26
-            maxWidth: '100%'
26
+            maxWidth: '100%',
27
+
28
+            '&.remote': {
29
+                maxWidth: 'calc(100% - 40px)' // 100% - avatar and margin
30
+            }
27 31
         },
28 32
 
29 33
         chatMessage: {
30 34
             display: 'inline-flex',
31 35
             padding: '12px',
32
-            marginRight: '12px',
33 36
             backgroundColor: theme.palette.ui02,
34 37
             borderRadius: '4px 12px 12px 12px',
35 38
             maxWidth: '100%',
36 39
             marginTop: '4px',
40
+            boxSizing: 'border-box' as const,
37 41
 
38 42
             '&.privatemessage': {
39 43
                 backgroundColor: theme.palette.support05
@@ -62,7 +66,8 @@ const styles = (theme: Theme) => {
62 66
         replyWrapper: {
63 67
             display: 'flex',
64 68
             flexDirection: 'row' as const,
65
-            alignItems: 'center'
69
+            alignItems: 'center',
70
+            maxWidth: '100%'
66 71
         },
67 72
 
68 73
         messageContent: {
@@ -126,7 +131,7 @@ class ChatMessage extends AbstractChatMessage<IProps> {
126 131
 
127 132
         return (
128 133
             <div
129
-                className = { classes.chatMessageWrapper }
134
+                className = { clsx(classes.chatMessageWrapper, type) }
130 135
                 id = { this.props.message.messageId }
131 136
                 tabIndex = { -1 }>
132 137
                 <div

+ 8
- 1
react/features/chat/components/web/MessageRecipient.tsx Целия файл

@@ -28,6 +28,13 @@ const useStyles = makeStyles()(theme => {
28 28
             color: theme.palette.text01
29 29
         },
30 30
 
31
+        text: {
32
+            maxWidth: 'calc(100% - 30px)',
33
+            overflow: 'hidden',
34
+            whiteSpace: 'break-spaces',
35
+            wordBreak: 'break-all'
36
+        },
37
+
31 38
         iconButton: {
32 39
             padding: '2px',
33 40
 
@@ -72,7 +79,7 @@ const MessageRecipient = ({
72 79
             className = { classes.container }
73 80
             id = 'chat-recipient'
74 81
             role = 'alert'>
75
-            <span>
82
+            <span className = { classes.text }>
76 83
                 {t(_isLobbyChatActive ? 'chat.lobbyChatMessageTo' : 'chat.messageTo', {
77 84
                     recipient: _isLobbyChatActive ? _lobbyMessageRecipient : _privateMessageRecipient
78 85
                 })}

Loading…
Отказ
Запис