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.
- package/lib/commonjs/components/Channel/ChannelShell.js +24 -12
- package/lib/commonjs/components/Channel/ChannelShell.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +4 -0
- package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/Headers/SentToChannelHeader.js +1 -0
- package/lib/commonjs/components/Message/MessageItemView/Headers/SentToChannelHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListClustered.js +14 -8
- package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListClustered.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js +3 -1
- package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +1 -0
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -0
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/UnreadMessagesNotification.js +5 -2
- package/lib/commonjs/components/MessageList/UnreadMessagesNotification.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/EmojiPickerList.js +3 -1
- package/lib/commonjs/components/MessageMenu/EmojiPickerList.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js +1 -0
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/ReactionButton.js +1 -0
- package/lib/commonjs/components/MessageMenu/ReactionButton.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollOption.js +1 -0
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +1 -0
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/UIComponents/SwipableWrapper.js +1 -0
- package/lib/commonjs/components/UIComponents/SwipableWrapper.js.map +1 -1
- package/lib/commonjs/i18n/runtimeDefaults.js +2 -0
- package/lib/commonjs/i18n/runtimeDefaults.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/ChannelShell.js +24 -12
- package/lib/module/components/Channel/ChannelShell.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +4 -0
- package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +1 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/Headers/SentToChannelHeader.js +1 -0
- package/lib/module/components/Message/MessageItemView/Headers/SentToChannelHeader.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListClustered.js +14 -8
- package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListClustered.js.map +1 -1
- package/lib/module/components/MessageInput/components/LinkPreviewList.js +3 -1
- package/lib/module/components/MessageInput/components/LinkPreviewList.js.map +1 -1
- package/lib/module/components/MessageList/InlineUnreadIndicator.js +1 -0
- package/lib/module/components/MessageList/InlineUnreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -0
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/UnreadMessagesNotification.js +5 -2
- package/lib/module/components/MessageList/UnreadMessagesNotification.js.map +1 -1
- package/lib/module/components/MessageMenu/EmojiPickerList.js +3 -1
- package/lib/module/components/MessageMenu/EmojiPickerList.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageActionListItem.js +1 -0
- package/lib/module/components/MessageMenu/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageMenu/ReactionButton.js +1 -0
- package/lib/module/components/MessageMenu/ReactionButton.js.map +1 -1
- package/lib/module/components/Poll/components/PollOption.js +1 -0
- package/lib/module/components/Poll/components/PollOption.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +1 -0
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/UIComponents/SwipableWrapper.js +1 -0
- package/lib/module/components/UIComponents/SwipableWrapper.js.map +1 -1
- package/lib/module/i18n/runtimeDefaults.js +2 -0
- package/lib/module/i18n/runtimeDefaults.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Channel/ChannelShell.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListClustered.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/LinkPreviewList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/InlineUnreadIndicator.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/ScrollToBottomButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/UnreadMessagesNotification.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/EmojiPickerList.d.ts +2 -1
- package/lib/typescript/components/MessageMenu/EmojiPickerList.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageActionListItem.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/SwipableWrapper.d.ts.map +1 -1
- package/lib/typescript/i18n/keys.d.ts +2 -0
- package/lib/typescript/i18n/keys.d.ts.map +1 -1
- package/lib/typescript/i18n/runtimeDefaults.d.ts +2 -0
- package/lib/typescript/i18n/runtimeDefaults.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Channel/ChannelShell.tsx +18 -6
- package/src/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.tsx +16 -2
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +5 -2
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +7 -1
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +5 -1
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +1 -0
- package/src/components/Message/MessageItemView/Headers/SentToChannelHeader.tsx +1 -1
- package/src/components/Message/MessageItemView/ReactionList/ReactionListClustered.tsx +11 -10
- package/src/components/Message/MessageItemView/__tests__/ReactionListClustered.test.tsx +113 -0
- package/src/components/MessageInput/components/LinkPreviewList.tsx +6 -2
- package/src/components/MessageList/InlineUnreadIndicator.tsx +5 -1
- package/src/components/MessageList/ScrollToBottomButton.tsx +1 -0
- package/src/components/MessageList/UnreadMessagesNotification.tsx +3 -1
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.tsx.snap +1 -0
- package/src/components/MessageMenu/EmojiPickerList.tsx +6 -2
- package/src/components/MessageMenu/MessageActionListItem.tsx +1 -0
- package/src/components/MessageMenu/ReactionButton.tsx +1 -0
- package/src/components/Poll/components/PollOption.tsx +1 -0
- package/src/components/Reply/Reply.tsx +4 -1
- package/src/components/UIComponents/SwipableWrapper.tsx +5 -1
- package/src/i18n/__tests__/catalog.fixture.json +2 -0
- package/src/i18n/keys.ts +2 -0
- package/src/i18n/runtimeDefaults.ts +4 -0
- package/src/utils/__tests__/Streami18n.test.ts +1 -0
- 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
|
|
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
|
|
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>
|
|
@@ -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
|
|
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>
|
|
@@ -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
|
|
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
|
|
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