stream-chat-react-native-core 10.0.1-beta.1 → 10.0.1-beta.2

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.
Files changed (126) hide show
  1. package/lib/commonjs/components/Channel/ChannelShell.js +24 -12
  2. package/lib/commonjs/components/Channel/ChannelShell.js.map +1 -1
  3. package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +4 -0
  4. package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
  5. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
  6. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  7. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -0
  8. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  9. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +1 -0
  10. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  11. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -0
  12. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  13. package/lib/commonjs/components/Message/MessageItemView/Headers/SentToChannelHeader.js +1 -0
  14. package/lib/commonjs/components/Message/MessageItemView/Headers/SentToChannelHeader.js.map +1 -1
  15. package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListClustered.js +14 -8
  16. package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListClustered.js.map +1 -1
  17. package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js +3 -1
  18. package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js.map +1 -1
  19. package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +1 -0
  20. package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js.map +1 -1
  21. package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -0
  22. package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
  23. package/lib/commonjs/components/MessageList/UnreadMessagesNotification.js +5 -2
  24. package/lib/commonjs/components/MessageList/UnreadMessagesNotification.js.map +1 -1
  25. package/lib/commonjs/components/MessageMenu/EmojiPickerList.js +3 -1
  26. package/lib/commonjs/components/MessageMenu/EmojiPickerList.js.map +1 -1
  27. package/lib/commonjs/components/MessageMenu/MessageActionListItem.js +1 -0
  28. package/lib/commonjs/components/MessageMenu/MessageActionListItem.js.map +1 -1
  29. package/lib/commonjs/components/MessageMenu/ReactionButton.js +1 -0
  30. package/lib/commonjs/components/MessageMenu/ReactionButton.js.map +1 -1
  31. package/lib/commonjs/components/Poll/components/PollOption.js +1 -0
  32. package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
  33. package/lib/commonjs/components/Reply/Reply.js +1 -0
  34. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  35. package/lib/commonjs/components/UIComponents/SwipableWrapper.js +1 -0
  36. package/lib/commonjs/components/UIComponents/SwipableWrapper.js.map +1 -1
  37. package/lib/commonjs/i18n/runtimeDefaults.js +2 -0
  38. package/lib/commonjs/i18n/runtimeDefaults.js.map +1 -1
  39. package/lib/commonjs/version.json +1 -1
  40. package/lib/module/components/Channel/ChannelShell.js +24 -12
  41. package/lib/module/components/Channel/ChannelShell.js.map +1 -1
  42. package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +4 -0
  43. package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
  44. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
  45. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  46. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -0
  47. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  48. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +1 -0
  49. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  50. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -0
  51. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  52. package/lib/module/components/Message/MessageItemView/Headers/SentToChannelHeader.js +1 -0
  53. package/lib/module/components/Message/MessageItemView/Headers/SentToChannelHeader.js.map +1 -1
  54. package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListClustered.js +14 -8
  55. package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListClustered.js.map +1 -1
  56. package/lib/module/components/MessageInput/components/LinkPreviewList.js +3 -1
  57. package/lib/module/components/MessageInput/components/LinkPreviewList.js.map +1 -1
  58. package/lib/module/components/MessageList/InlineUnreadIndicator.js +1 -0
  59. package/lib/module/components/MessageList/InlineUnreadIndicator.js.map +1 -1
  60. package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -0
  61. package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
  62. package/lib/module/components/MessageList/UnreadMessagesNotification.js +5 -2
  63. package/lib/module/components/MessageList/UnreadMessagesNotification.js.map +1 -1
  64. package/lib/module/components/MessageMenu/EmojiPickerList.js +3 -1
  65. package/lib/module/components/MessageMenu/EmojiPickerList.js.map +1 -1
  66. package/lib/module/components/MessageMenu/MessageActionListItem.js +1 -0
  67. package/lib/module/components/MessageMenu/MessageActionListItem.js.map +1 -1
  68. package/lib/module/components/MessageMenu/ReactionButton.js +1 -0
  69. package/lib/module/components/MessageMenu/ReactionButton.js.map +1 -1
  70. package/lib/module/components/Poll/components/PollOption.js +1 -0
  71. package/lib/module/components/Poll/components/PollOption.js.map +1 -1
  72. package/lib/module/components/Reply/Reply.js +1 -0
  73. package/lib/module/components/Reply/Reply.js.map +1 -1
  74. package/lib/module/components/UIComponents/SwipableWrapper.js +1 -0
  75. package/lib/module/components/UIComponents/SwipableWrapper.js.map +1 -1
  76. package/lib/module/i18n/runtimeDefaults.js +2 -0
  77. package/lib/module/i18n/runtimeDefaults.js.map +1 -1
  78. package/lib/module/version.json +1 -1
  79. package/lib/typescript/components/Channel/ChannelShell.d.ts.map +1 -1
  80. package/lib/typescript/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.d.ts.map +1 -1
  81. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts.map +1 -1
  82. package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts.map +1 -1
  83. package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts.map +1 -1
  84. package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts.map +1 -1
  85. package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListClustered.d.ts.map +1 -1
  86. package/lib/typescript/components/MessageInput/components/LinkPreviewList.d.ts.map +1 -1
  87. package/lib/typescript/components/MessageList/InlineUnreadIndicator.d.ts.map +1 -1
  88. package/lib/typescript/components/MessageList/ScrollToBottomButton.d.ts.map +1 -1
  89. package/lib/typescript/components/MessageList/UnreadMessagesNotification.d.ts.map +1 -1
  90. package/lib/typescript/components/MessageMenu/EmojiPickerList.d.ts +2 -1
  91. package/lib/typescript/components/MessageMenu/EmojiPickerList.d.ts.map +1 -1
  92. package/lib/typescript/components/MessageMenu/MessageActionListItem.d.ts.map +1 -1
  93. package/lib/typescript/components/MessageMenu/ReactionButton.d.ts.map +1 -1
  94. package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
  95. package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
  96. package/lib/typescript/components/UIComponents/SwipableWrapper.d.ts.map +1 -1
  97. package/lib/typescript/i18n/keys.d.ts +2 -0
  98. package/lib/typescript/i18n/keys.d.ts.map +1 -1
  99. package/lib/typescript/i18n/runtimeDefaults.d.ts +2 -0
  100. package/lib/typescript/i18n/runtimeDefaults.d.ts.map +1 -1
  101. package/package.json +1 -1
  102. package/src/components/Channel/ChannelShell.tsx +18 -6
  103. package/src/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.tsx +16 -2
  104. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +5 -2
  105. package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +7 -1
  106. package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +5 -1
  107. package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +1 -0
  108. package/src/components/Message/MessageItemView/Headers/SentToChannelHeader.tsx +1 -1
  109. package/src/components/Message/MessageItemView/ReactionList/ReactionListClustered.tsx +11 -10
  110. package/src/components/Message/MessageItemView/__tests__/ReactionListClustered.test.tsx +113 -0
  111. package/src/components/MessageInput/components/LinkPreviewList.tsx +6 -2
  112. package/src/components/MessageList/InlineUnreadIndicator.tsx +5 -1
  113. package/src/components/MessageList/ScrollToBottomButton.tsx +1 -0
  114. package/src/components/MessageList/UnreadMessagesNotification.tsx +3 -1
  115. package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.tsx.snap +1 -0
  116. package/src/components/MessageMenu/EmojiPickerList.tsx +6 -2
  117. package/src/components/MessageMenu/MessageActionListItem.tsx +1 -0
  118. package/src/components/MessageMenu/ReactionButton.tsx +1 -0
  119. package/src/components/Poll/components/PollOption.tsx +1 -0
  120. package/src/components/Reply/Reply.tsx +4 -1
  121. package/src/components/UIComponents/SwipableWrapper.tsx +5 -1
  122. package/src/i18n/__tests__/catalog.fixture.json +2 -0
  123. package/src/i18n/keys.ts +2 -0
  124. package/src/i18n/runtimeDefaults.ts +4 -0
  125. package/src/utils/__tests__/Streami18n.test.ts +1 -0
  126. package/src/version.json +1 -1
@@ -55,7 +55,11 @@ export const LinkPreviewCard = ({ linkPreview }: LinkPreviewProps) => {
55
55
  }
56
56
 
57
57
  return (
58
- <Animated.View layout={LinearTransition.duration(200)} style={styles.wrapper}>
58
+ <Animated.View
59
+ layout={LinearTransition.duration(200)}
60
+ style={styles.wrapper}
61
+ testID='composer-link-preview'
62
+ >
59
63
  <View style={styles.container}>
60
64
  <View style={styles.imageWrapper}>
61
65
  <ImageComponent source={{ uri: image_url ?? thumb_url }} style={styles.thumbnail} />
@@ -87,7 +91,7 @@ export const LinkPreviewCard = ({ linkPreview }: LinkPreviewProps) => {
87
91
  </View>
88
92
  </View>
89
93
  <View style={styles.dismissWrapper}>
90
- <AttachmentRemoveControl onPress={dismissPreview} />
94
+ <AttachmentRemoveControl onPress={dismissPreview} testID='composer-link-preview-dismiss' />
91
95
  </View>
92
96
  </Animated.View>
93
97
  );
@@ -15,7 +15,11 @@ export const InlineUnreadIndicator = (props: InlineUnreadIndicatorProps) => {
15
15
  const { t } = useTranslationContext();
16
16
 
17
17
  return (
18
- <View accessibilityLabel='Inline unread indicator' style={styles.container}>
18
+ <View
19
+ accessibilityLabel='Inline unread indicator'
20
+ style={styles.container}
21
+ testID='inline-unread-indicator'
22
+ >
19
23
  <Text style={styles.text}>
20
24
  {unreadCount
21
25
  ? t('messageList.newMessages.text', {
@@ -78,6 +78,7 @@ export const ScrollToBottomButton = (props: ScrollToBottomButtonProps) => {
78
78
  accessibilityElementsHidden
79
79
  importantForAccessibility='no-hide-descendants'
80
80
  style={styles.unreadCountNotificationContainer}
81
+ testID='scroll-to-bottom-button-unread-count'
81
82
  >
82
83
  {unreadCount ? (
83
84
  <BadgeNotification count={unreadCount} size='xs' type='primary' testID='unread-count' />
@@ -82,7 +82,7 @@ export const UnreadMessagesNotification = (props: UnreadMessagesNotificationProp
82
82
  const styles = useStyles();
83
83
 
84
84
  return (
85
- <View style={styles.container}>
85
+ <View style={styles.container} testID='unread-messages-notification'>
86
86
  <View style={styles.leftButtonContainer}>
87
87
  <Button
88
88
  variant='secondary'
@@ -95,6 +95,7 @@ export const UnreadMessagesNotification = (props: UnreadMessagesNotificationProp
95
95
  }
96
96
  onPress={handleOnPress}
97
97
  size='md'
98
+ testID='unread-messages-notification-button'
98
99
  />
99
100
  </View>
100
101
  <View style={styles.rightButtonContainer}>
@@ -106,6 +107,7 @@ export const UnreadMessagesNotification = (props: UnreadMessagesNotificationProp
106
107
  LeadingIcon={icons.NewClose}
107
108
  onPress={handleClose}
108
109
  size='md'
110
+ testID='unread-messages-notification-dismiss-button'
109
111
  />
110
112
  </View>
111
113
  </View>
@@ -218,6 +218,7 @@ exports[`ScrollToBottomButton should render the message notification and match s
218
218
  "top": 0,
219
219
  }
220
220
  }
221
+ testID="scroll-to-bottom-button-unread-count"
221
222
  />
222
223
  </View>
223
224
  `;
@@ -17,10 +17,14 @@ const EMOJI_CELL_SIZE = 54;
17
17
 
18
18
  const emojiKeyExtractor = (item: string) => `unicode-${item}`;
19
19
 
20
- export const Emoji = ({ item, size }: { item: string; size: number }) => {
20
+ export const Emoji = ({ item, size, testID }: { item: string; size: number; testID?: string }) => {
21
21
  const styles = useStyles();
22
22
  return (
23
- <Text style={[styles.emojiText, { fontSize: size, lineHeight: size + 4 }]} numberOfLines={1}>
23
+ <Text
24
+ style={[styles.emojiText, { fontSize: size, lineHeight: size + 4 }]}
25
+ numberOfLines={1}
26
+ testID={testID}
27
+ >
24
28
  {item}
25
29
  </Text>
26
30
  );
@@ -79,6 +79,7 @@ export const MessageActionListItem = (props: MessageActionListItemProps) => {
79
79
  styles.buttonContainer,
80
80
  { backgroundColor: pressed ? semantics.backgroundUtilityPressed : 'transparent' },
81
81
  ]}
82
+ testID={`message-action-${actionType}`}
82
83
  >
83
84
  <View style={[styles.container, container]}>
84
85
  <View style={iconTheme}>{icon}</View>
@@ -47,6 +47,7 @@ export const ReactionButton = (props: ReactionButtonProps) => {
47
47
  return (
48
48
  <View style={styles.reactionButton}>
49
49
  <Button
50
+ testID={`reaction-button-${type}`}
50
51
  variant={'secondary'}
51
52
  type={'outline'}
52
53
  iconOnly={!count}
@@ -221,6 +221,7 @@ export const VoteButton = ({ forceIncoming, onPress, option }: PollVoteButtonPro
221
221
  accessibilityRole={poll.data?.enforce_unique_vote ? 'radio' : 'checkbox'}
222
222
  accessibilityState={accessibilityState}
223
223
  onPress={onPressHandler}
224
+ testID={hasVote ? 'poll-vote-button-checked' : 'poll-vote-button'}
224
225
  style={({ pressed }) => [
225
226
  { opacity: pressed ? 0.5 : 1 },
226
227
  styles.voteContainer,
@@ -162,7 +162,10 @@ export const ReplyWithContext = (props: ReplyPropsWithContext) => {
162
162
  accessibilityRole='text'
163
163
  style={[!messageFromContext?.quoted_message ? styles.wrapper : null, wrapper]}
164
164
  >
165
- <View style={[styles.container, container, stylesProp?.container]}>
165
+ <View
166
+ style={[styles.container, container, stylesProp?.container]}
167
+ testID={messageFromContext?.quoted_message ? 'quoted-message' : 'reply-composer-preview'}
168
+ >
166
169
  <View style={[styles.leftContainer, leftContainer, stylesProp?.leftContainer]}>
167
170
  <Text numberOfLines={1} style={[styles.title, titleStyle, stylesProp?.title]}>
168
171
  {title}
@@ -107,7 +107,11 @@ export const RightActions = ({
107
107
  const Content = item.Content;
108
108
  return (
109
109
  <Animated.View key={item.id} style={[styles.action, animatedActionWidthStyle]}>
110
- <Pressable onPress={item.action} style={StyleSheet.absoluteFill}>
110
+ <Pressable
111
+ onPress={item.action}
112
+ style={StyleSheet.absoluteFill}
113
+ testID={`swipe-action-${item.id}`}
114
+ >
111
115
  <View style={item.contentContainerStyle}>
112
116
  <Animated.View style={animatedIconScaleStyle}>
113
117
  <Content />
@@ -248,6 +248,8 @@
248
248
  "message.pinnedBy.text": "Pinned by",
249
249
  "message.reactionList.more.accessibilityLabel_one": "and {{count}} more reaction",
250
250
  "message.reactionList.more.accessibilityLabel_other": "and {{count}} more reactions",
251
+ "message.reactionList.total.accessibilityLabel_one": "{{count}} reaction",
252
+ "message.reactionList.total.accessibilityLabel_other": "{{count}} reactions",
251
253
  "message.reactionList.viewHint.accessibilityLabel": "Double tap to view reactions",
252
254
  "message.reactionList.youReacted.accessibilityLabel": "you reacted",
253
255
  "message.reminderOverdue.text": "Reminder overdue",
package/src/i18n/keys.ts CHANGED
@@ -259,6 +259,8 @@ export type TranslationCatalog = {
259
259
  'message.pinnedBy.text': 'Pinned by';
260
260
  'message.reactionList.more.accessibilityLabel_one': 'and {{count}} more reaction';
261
261
  'message.reactionList.more.accessibilityLabel_other': 'and {{count}} more reactions';
262
+ 'message.reactionList.total.accessibilityLabel_one': '{{count}} reaction';
263
+ 'message.reactionList.total.accessibilityLabel_other': '{{count}} reactions';
262
264
  'message.reactionList.viewHint.accessibilityLabel': 'Double tap to view reactions';
263
265
  'message.reactionList.youReacted.accessibilityLabel': 'you reacted';
264
266
  'message.reminderOverdue.text': 'Reminder overdue';
@@ -100,8 +100,12 @@ export const runtimeDefaults = {
100
100
  'Double tap and hold to activate contextual menu',
101
101
  'message.content.fromSender.accessibilityLabel': 'Message from {{sender}}',
102
102
  'message.content.fromYou.accessibilityLabel': 'Message from you',
103
+ // No longer rendered: the clustered list labels its count with `total` instead. Kept so existing
104
+ // overrides still type-check; remove in the next major.
103
105
  'message.reactionList.more.accessibilityLabel_one': 'and {{count}} more reaction',
104
106
  'message.reactionList.more.accessibilityLabel_other': 'and {{count}} more reactions',
107
+ 'message.reactionList.total.accessibilityLabel_one': '{{count}} reaction',
108
+ 'message.reactionList.total.accessibilityLabel_other': '{{count}} reactions',
105
109
  'message.reactionList.viewHint.accessibilityLabel': 'Double tap to view reactions',
106
110
  'message.reactionList.youReacted.accessibilityLabel': 'you reacted',
107
111
  'message.status.delivered.accessibilityLabel': 'Delivered',
@@ -63,6 +63,7 @@ describe('runtimeDefaults', () => {
63
63
  ['avatar.channel.group.accessibilityLabel', 'Channel with 1 member'],
64
64
  ['channelPreview.unreadCount.accessibilityLabel', '1 unread message'],
65
65
  ['message.reactionList.more.accessibilityLabel', 'and 1 more reaction'],
66
+ ['message.reactionList.total.accessibilityLabel', '1 reaction'],
66
67
  ['messageList.scrollToBottom.withCount.accessibilityLabel', 'Scroll to bottom, 1 new message'],
67
68
  ])('uses the singular of %s for a count of 1', async (key, singular) => {
68
69
  const { t } = await new Streami18n().init();
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "10.0.1-beta.1"
2
+ "version": "10.0.1-beta.2"
3
3
  }