@tellescope/chat 1.253.0 → 1.254.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/chat",
3
- "version": "1.253.0",
3
+ "version": "1.254.0",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -38,20 +38,20 @@
38
38
  "@fontsource/roboto": "4.5.8",
39
39
  "@mui/icons-material": "5.15.0",
40
40
  "@mui/material": "5.15.0",
41
- "@tellescope/constants": "1.253.0",
42
- "@tellescope/react-components": "1.253.0",
43
- "@tellescope/sdk": "1.253.0",
44
- "@tellescope/types-client": "1.253.0",
45
- "@tellescope/types-models": "1.253.0",
46
- "@tellescope/types-utilities": "1.253.0",
47
- "@tellescope/utilities": "1.253.0",
41
+ "@tellescope/constants": "1.254.0",
42
+ "@tellescope/react-components": "1.254.0",
43
+ "@tellescope/sdk": "1.254.0",
44
+ "@tellescope/types-client": "1.254.0",
45
+ "@tellescope/types-models": "1.254.0",
46
+ "@tellescope/types-utilities": "1.254.0",
47
+ "@tellescope/utilities": "1.254.0",
48
48
  "react-native-image-picker": "7.0.2"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
52
52
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
53
53
  },
54
- "gitHead": "b99e2fae181b67bab736660f9e4b8f47acc276da",
54
+ "gitHead": "c1b4f17fc6da0f03c0abeebf958a7b0c4fd4217c",
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  }
package/src/chat.tsx CHANGED
@@ -27,6 +27,7 @@ import {
27
27
  TextField,
28
28
  useFileForSecureName,
29
29
  LoadedFile,
30
+ Tooltip,
30
31
  } from "@tellescope/react-components"
31
32
 
32
33
  import {
@@ -251,13 +252,23 @@ export const Message = ({
251
252
  || (value_is_loaded(endusersLoading) ? endusersLoading.value.find(e => e.id === message.senderId) : undefined)
252
253
  )
253
254
 
254
- const displayPicture = (
255
- <DisplayPicture
256
- style={{ maxWidth: '10%' }}
257
- user={userOrEnduser}
258
- size={iconSize}
259
- />
260
- )
255
+ const senderName = userOrEnduser?.displayName || user_display_name(userOrEnduser)
256
+
257
+ const displayPicture = senderName
258
+ ? (
259
+ <Tooltip label={senderName} placement="top" enterDelay={300}
260
+ style={{ display: 'inline-flex', flexShrink: 0, maxWidth: '10%' }}
261
+ >
262
+ <DisplayPicture user={userOrEnduser} size={iconSize} />
263
+ </Tooltip>
264
+ )
265
+ : (
266
+ <DisplayPicture
267
+ style={{ maxWidth: '10%' }}
268
+ user={userOrEnduser}
269
+ size={iconSize}
270
+ />
271
+ )
261
272
 
262
273
  return (
263
274
  <Flex column>
@@ -284,7 +295,7 @@ export const Message = ({
284
295
  marginLeft: isSender ? 'auto' : `${iconSize + 12}px`,
285
296
  marginTop: 0, marginBottom: 0,
286
297
  }}>
287
- {userOrEnduser?.displayName || user_display_name(userOrEnduser)}
298
+ {senderName}
288
299
  </Typography>
289
300
  )}
290
301
  <Flex style={{ margin: 5, marginTop: showName ? 0 : 5, flexWrap: 'nowrap', ...style }}>