소스 검색

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
     a:active {
74
     a:active {
75
         color: black;
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
 const styles = (theme: Theme) => {
23
 const styles = (theme: Theme) => {
24
     return {
24
     return {
25
         chatMessageWrapper: {
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
         chatMessage: {
33
         chatMessage: {
30
             display: 'inline-flex',
34
             display: 'inline-flex',
31
             padding: '12px',
35
             padding: '12px',
32
-            marginRight: '12px',
33
             backgroundColor: theme.palette.ui02,
36
             backgroundColor: theme.palette.ui02,
34
             borderRadius: '4px 12px 12px 12px',
37
             borderRadius: '4px 12px 12px 12px',
35
             maxWidth: '100%',
38
             maxWidth: '100%',
36
             marginTop: '4px',
39
             marginTop: '4px',
40
+            boxSizing: 'border-box' as const,
37
 
41
 
38
             '&.privatemessage': {
42
             '&.privatemessage': {
39
                 backgroundColor: theme.palette.support05
43
                 backgroundColor: theme.palette.support05
62
         replyWrapper: {
66
         replyWrapper: {
63
             display: 'flex',
67
             display: 'flex',
64
             flexDirection: 'row' as const,
68
             flexDirection: 'row' as const,
65
-            alignItems: 'center'
69
+            alignItems: 'center',
70
+            maxWidth: '100%'
66
         },
71
         },
67
 
72
 
68
         messageContent: {
73
         messageContent: {
126
 
131
 
127
         return (
132
         return (
128
             <div
133
             <div
129
-                className = { classes.chatMessageWrapper }
134
+                className = { clsx(classes.chatMessageWrapper, type) }
130
                 id = { this.props.message.messageId }
135
                 id = { this.props.message.messageId }
131
                 tabIndex = { -1 }>
136
                 tabIndex = { -1 }>
132
                 <div
137
                 <div

+ 8
- 1
react/features/chat/components/web/MessageRecipient.tsx 파일 보기

28
             color: theme.palette.text01
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
         iconButton: {
38
         iconButton: {
32
             padding: '2px',
39
             padding: '2px',
33
 
40
 
72
             className = { classes.container }
79
             className = { classes.container }
73
             id = 'chat-recipient'
80
             id = 'chat-recipient'
74
             role = 'alert'>
81
             role = 'alert'>
75
-            <span>
82
+            <span className = { classes.text }>
76
                 {t(_isLobbyChatActive ? 'chat.lobbyChatMessageTo' : 'chat.messageTo', {
83
                 {t(_isLobbyChatActive ? 'chat.lobbyChatMessageTo' : 'chat.messageTo', {
77
                     recipient: _isLobbyChatActive ? _lobbyMessageRecipient : _privateMessageRecipient
84
                     recipient: _isLobbyChatActive ? _lobbyMessageRecipient : _privateMessageRecipient
78
                 })}
85
                 })}

Loading…
취소
저장