Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
92685e6
fix(MessageComposer): lift the composer above bottomInset while the a…
isekovanic Nov 26, 2026
ebfab9f
feat: scheduled messages foundation
isekovanic Nov 26, 2026
3bcb60b
feat(MessageComposer): schedule a message
isekovanic Nov 26, 2026
79f2a0a
feat(MessageList): scheduled messages banner
isekovanic Nov 27, 2026
645056d
feat(MessageComposer): edit a scheduled message
isekovanic Nov 27, 2026
ad603d3
fix(ScheduledMessages): slide the reschedule sheet closed after resch…
isekovanic Nov 27, 2026
c008a57
feat(ScheduledMessages): scheduled messages list
isekovanic Nov 27, 2026
79ca93f
refactor(ScheduledMessages): plain StyleSheet.create for styles that …
isekovanic Nov 27, 2026
f3caead
fix(ScheduledMessages): follow the Figma tokens and bindings
isekovanic Nov 27, 2026
6039bf4
feat(ChannelDetails): scheduled messages row
isekovanic Nov 27, 2026
638c76e
chore(SampleApp): scheduled messages screens
isekovanic Nov 27, 2026
2a6f35d
fix(ScheduledMessages): open the keyboard when a scheduled edit start…
isekovanic Nov 27, 2026
5c8b169
fix(MessageComposer): give the floating attach button a surface and s…
isekovanic Nov 27, 2026
ba0553f
feat(ScheduledMessages): loading skeleton shaped like the list rows
isekovanic Nov 27, 2026
17a9a49
feat(ScheduledMessages): pick the custom time with the native date an…
isekovanic Nov 27, 2026
3dad238
chore(ExpoMessaging): use react-native 0.88.1
isekovanic Nov 27, 2026
4581b80
feat(ScheduledMessages): format scheduled times through timestamp tra…
isekovanic Nov 27, 2026
b7e0ec1
fix(MessageComposer): keep the floating composer height positive whil…
isekovanic Nov 27, 2026
80331ee
feat(ScheduledMessages): show messages still being scheduled as uploa…
isekovanic Nov 30, 2026
18d05bd
test(ScheduledMessages): cover a row the server is sending and find t…
isekovanic Nov 30, 2026
13f7cd0
feat(OfflineDB): store scheduled messages
isekovanic Nov 30, 2026
95f9ac6
feat(ScheduledMessages): act on a scheduled message whose request is …
isekovanic Nov 30, 2026
12161ad
feat(OfflineDB): return the stored scheduled messages with their chan…
isekovanic Dec 1, 2026
1fae4de
refactor(ScheduledMessages): read the client's own fields from localM…
isekovanic Dec 1, 2026
49b7dcd
chore(deps): bump stream-chat to 10.4.0
isekovanic Dec 1, 2026
f4a0d59
fix(SampleApp): edit a scheduled message from the tab while offline
isekovanic Dec 1, 2026
7780643
fix(ScheduledMessages): show sending only while the server sends the …
isekovanic Dec 1, 2026
3d51e9e
fix(ScheduledMessages): treat a request queued offline as done, not f…
isekovanic Dec 1, 2026
6990cd1
fix(ScheduledMessages): draw a channel that isn't loaded from its sch…
isekovanic Dec 1, 2026
5741794
refactor(ScheduledMessages): type the channel summary as ScheduledMes…
isekovanic Dec 1, 2026
f1c7fdd
feat(ScheduledMessages): theme keys for every scheduled messages style
isekovanic Dec 1, 2026
2ded576
feat(ScheduledMessages): override slots for the skeleton, time picker…
isekovanic Dec 1, 2026
3c682df
Merge remote-tracking branch 'origin/develop' into feat/scheduled-mes…
isekovanic Dec 2, 2026
b85a2d2
chore(deps): bump stream-chat to 10.5.0
isekovanic Dec 2, 2026
fd014cb
fix(OfflineDB): store scheduled messages whose channel is not stored
isekovanic Dec 2, 2026
33562bb
fix(SampleApp): edit from the Scheduled tab offline with the composer…
isekovanic Dec 2, 2026
23a2f2c
test(ScheduledMessages): fix the type errors in the scheduled message…
isekovanic Dec 2, 2026
19c06fc
fix(ScheduledMessages): offer no edit where the user can't schedule
isekovanic Dec 2, 2026
0d28005
fix(ScheduledMessages): animate the edit composer with the keyboard
isekovanic Dec 2, 2026
50cfcbc
fix(SampleApp): slide the tab bar out with the keyboard when editing
isekovanic Dec 2, 2026
4d5bb44
chore(SampleApp): update Podfile.lock
isekovanic Dec 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/E2ETestApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"react-native-teleport": "^1.2.2",
"react-native-video": "^6.19.3",
"react-native-worklets": "^0.13.0",
"stream-chat": "^10.3.1",
"stream-chat": "^10.5.0",
"stream-chat-react-native": "workspace:^"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/ExpoMessaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"expo-video": "~58.0.10",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-native": "0.88.0",
"react-native": "0.88.1",
"react-native-gesture-handler": "~3.4.0",
"react-native-keyboard-controller": "1.22.7",
"react-native-maps": "1.29.11",
Expand All @@ -51,7 +51,7 @@
"react-native-teleport": "^1.2.5",
"react-native-web": "~0.21.4",
"react-native-worklets": "0.13.0",
"stream-chat": "^10.3.1",
"stream-chat": "^10.5.0",
"stream-chat-expo": "workspace:^",
"stream-chat-react-native-core": "workspace:^"
},
Expand Down
6 changes: 6 additions & 0 deletions examples/SampleApp/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import { MapScreen } from './src/screens/MapScreen';
import { NewDirectMessagingScreen } from './src/screens/NewDirectMessagingScreen';
import { NewGroupChannelAddMemberScreen } from './src/screens/NewGroupChannelAddMemberScreen';
import { NewGroupChannelAssignNameScreen } from './src/screens/NewGroupChannelAssignNameScreen';
import { ScheduledMessagesScreen } from './src/screens/ScheduledMessagesScreen';
import { ThreadScreen } from './src/screens/ThreadScreen';
import { UserSelectorScreen } from './src/screens/UserSelectorScreen';

Expand Down Expand Up @@ -462,6 +463,11 @@ const HomeScreen = () => {
name='ChannelPinnedMessagesScreen'
options={{ headerShown: false }}
/>
<Stack.Screen
component={ScheduledMessagesScreen}
name='ScheduledMessagesScreen'
options={{ headerShown: false }}
/>
<Stack.Screen
component={ThreadScreen}
name='ThreadScreen'
Expand Down
6 changes: 3 additions & 3 deletions examples/SampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2815,7 +2815,7 @@ PODS:
- SDWebImage/Core (~> 5.17)
- SocketRocket (0.7.1):
- ReactNativeDependencies
- stream-chat-react-native (10.1.2):
- stream-chat-react-native (10.3.0):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -3405,10 +3405,10 @@ SPEC CHECKSUMS:
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
SDWebImageWebPCoder: 0e06e365080397465cc73a7a9b472d8a3bd0f377
SocketRocket: 37aec555668fb852ec12e3c0de59a86ca58f0871
stream-chat-react-native: 8914ec585430162b07442a8f85880589eee6c0c3
stream-chat-react-native: bfe9f737d0480dd1e30ae985a3be427a89b79e7c
Teleport: ce4df4997e1412af59d86df5090e76cf404c99ff
Yoga: d1c536142c5ff8ec8cd856ab2a7c227a1d875c8e

PODFILE CHECKSUM: ac9682db83e42d63d399a8de4586161e86b3e751

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
2 changes: 1 addition & 1 deletion examples/SampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"react-native-teleport": "^1.2.5",
"react-native-video": "^6.19.3",
"react-native-worklets": "^0.13.0",
"stream-chat": "^10.3.1",
"stream-chat": "^10.5.0",
"stream-chat-react-native": "workspace:^",
"stream-chat-react-native-core": "workspace:^"
},
Expand Down
72 changes: 55 additions & 17 deletions examples/SampleApp/src/components/BottomTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import React from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import Animated, {
type ExitAnimationsValues,
LayoutAnimationConfig,
SlideInDown,
withTiming,
} from 'react-native-reanimated';
import { useSafeAreaInsets } from 'react-native-safe-area-context';

import type { BottomTabBarProps } from '@react-navigation/bottom-tabs';
Expand All @@ -13,9 +19,24 @@ import { DraftsTab } from '../icons/DraftsTab';
import { MentionsTab } from '../icons/MentionsTab';

import { RemindersTab } from '../icons/ReminderTab';
import { ScheduledTab } from '../icons/ScheduledTab';
import { ThreadsTab } from '../icons/ThreadsTab';
import { useLegacyColors } from '../theme/useLegacyColors';

const TAB_BAR_SLIDE_DURATION_MS = 200;

const slideOutByOwnHeight = (values: ExitAnimationsValues) => {
'worklet';
return {
animations: {
transform: [
{ translateY: withTiming(values.currentHeight, { duration: TAB_BAR_SLIDE_DURATION_MS }) },
],
},
initialValues: { transform: [{ translateY: 0 }] },
};
};

const styles = StyleSheet.create({
notification: {
left: 25, // size of icon
Expand Down Expand Up @@ -72,6 +93,12 @@ const getTab = (key: string) => {
iconActive: <RemindersTab active />,
title: 'Reminders',
};
case 'ScheduledScreen':
return {
icon: <ScheduledTab />,
iconActive: <ScheduledTab active />,
title: 'Scheduled',
};
// Add more cases for other tabs as needed
default:
return null;
Expand Down Expand Up @@ -127,28 +154,39 @@ const Tab = (props: TabProps) => {
};

export const BottomTabs: React.FC<BottomTabBarProps> = (props) => {
const { navigation, state } = props;
const { descriptors, navigation, state } = props;
const {
theme: { semantics },
} = useTheme();
const { bottom, left, right } = useSafeAreaInsets();
const { tabBarStyle } = descriptors[state.routes[state.index].key].options;

// A screen hides the tab bar with `tabBarStyle: { display: 'none' }`, e.g. while editing. It
// slides down out of view, and back up when shown again, but not when the app opens.
const hidden = StyleSheet.flatten(tabBarStyle)?.display === 'none';

return (
<View
style={[
styles.tabListContainer,
{
backgroundColor: semantics.backgroundCoreElevation1,
borderTopColor: semantics.borderCoreSubtle,
paddingBottom: bottom,
paddingLeft: left,
paddingRight: right,
},
]}
>
{state.routes.map((route, index) => (
<Tab key={index} route={route} index={index} navigation={navigation} state={state} />
))}
</View>
<LayoutAnimationConfig skipEntering>
{hidden ? null : (
<Animated.View
entering={SlideInDown.duration(TAB_BAR_SLIDE_DURATION_MS)}
exiting={slideOutByOwnHeight}
style={[
styles.tabListContainer,
{
backgroundColor: semantics.backgroundCoreElevation1,
borderTopColor: semantics.borderCoreSubtle,
paddingBottom: bottom,
paddingLeft: left,
paddingRight: right,
},
]}
>
{state.routes.map((route, index) => (
<Tab key={index} route={route} index={index} navigation={navigation} state={state} />
))}
</Animated.View>
)}
</LayoutAnimationConfig>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useEffect, useMemo } from 'react';

import { ScheduledMessagePaginator, ScheduledMessagesView } from 'stream-chat';
import { useChatContext } from 'stream-chat-react-native';

/**
* Every scheduled message of the user, across channels. Its paginator is registered with the
* client while mounted, so the list follows the scheduled message events.
*/
export const useAllScheduledMessagesView = () => {
const { client } = useChatContext();
const view = useMemo(
() => new ScheduledMessagesView({ paginator: new ScheduledMessagePaginator({ client }) }),
[client],
);

useEffect(() => {
const manager = client.scheduledMessagePaginators;
manager.insertPaginator({ paginator: view.paginator });
return () => {
manager.removePaginator(view.paginator);
};
}, [client, view]);

return view;
};
35 changes: 35 additions & 0 deletions examples/SampleApp/src/icons/ScheduledTab.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import Svg, { Path } from 'react-native-svg';

import { useLegacyColors } from '../theme/useLegacyColors';
import { IconProps } from '../utils/base';

/** A filled clock while the tab is active, and the SDK's outlined clock otherwise, as in Figma. */
export const ScheduledTab: React.FC<IconProps> = ({ active, height = 24, width = 24 }) => {
const { black, grey } = useLegacyColors();

if (!active) {
return (
<Svg fill='none' height={height} viewBox='0 0 20 20' width={width}>
<Path
d='M10 5.625V10H14.375M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z'
stroke={grey}
strokeLinecap='round'
strokeLinejoin='round'
strokeWidth={1.5}
/>
</Svg>
);
}

return (
<Svg fill='none' height={height} viewBox='0 0 24 24' width={width}>
<Path
clipRule='evenodd'
d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zm1-15a1 1 0 10-2 0v5a1 1 0 00.293.707l3 3a1 1 0 001.414-1.414L13 11.586V7z'
fill={black}
fillRule='evenodd'
/>
</Svg>
);
};
4 changes: 3 additions & 1 deletion examples/SampleApp/src/screens/ChannelDetailsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ const navigationItems: {
[key in ChannelDetailsNavigationSectionType]:
| 'ChannelPinnedMessagesScreen'
| 'ChannelImagesScreen'
| 'ChannelFilesScreen';
| 'ChannelFilesScreen'
| 'ScheduledMessagesScreen';
} = {
'pinned-messages': 'ChannelPinnedMessagesScreen',
'scheduled-messages': 'ScheduledMessagesScreen',
'photos-and-videos': 'ChannelImagesScreen',
files: 'ChannelFilesScreen',
};
Expand Down
7 changes: 7 additions & 0 deletions examples/SampleApp/src/screens/ChannelScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ export const ChannelScreen: React.FC<ChannelScreenProps> = ({ navigation, route
[channel, messageId, navigation, setThread],
);

const onScheduledMessagesBannerPress = useCallback(
({ channel: bannerChannel }: { channel: StreamChatChannel }) =>
navigation.navigate('ScheduledMessagesScreen', { channel: bannerChannel }),
[navigation],
);

const handleMessageInfo = useCallback((message: LocalMessage) => {
setSelectedMessage(message);
setModalVisible(true);
Expand Down Expand Up @@ -387,6 +393,7 @@ export const ChannelScreen: React.FC<ChannelScreenProps> = ({ navigation, route
keyboardVerticalOffset={0}
messageActions={messageActions}
onAlsoSentToChannelHeaderPress={onAlsoSentToChannelHeaderPress}
onScheduledMessagesBannerPress={onScheduledMessagesBannerPress}
>
<PortalWhileClosingView portalHostName='overlay-header' portalName='channel-header'>
<ChannelHeader channel={channel} />
Expand Down
6 changes: 6 additions & 0 deletions examples/SampleApp/src/screens/ChatScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ChannelListScreen } from './ChannelListScreen';
import { DraftsScreen } from './DraftScreen';
import { MentionsScreen } from './MentionsScreen';
import { RemindersScreen } from './RemindersScreen';
import { ScheduledScreen } from './ScheduledScreen';
import { ThreadListScreen } from './ThreadListScreen';

import { BottomTabs } from '../components/BottomTabs';
Expand Down Expand Up @@ -39,6 +40,11 @@ export const ChatScreen: React.FC<Props> = () => (
name='ThreadsScreen'
options={{ headerShown: false }}
/>
<Tab.Screen
component={ScheduledScreen}
name='ScheduledScreen'
options={{ headerShown: false }}
/>
<Tab.Screen component={DraftsScreen} name='DraftsScreen' options={{ headerShown: false }} />
<Tab.Screen
component={RemindersScreen}
Expand Down
49 changes: 49 additions & 0 deletions examples/SampleApp/src/screens/ScheduledMessagesScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from 'react';
import { StyleSheet } from 'react-native';

import { SafeAreaView } from 'react-native-safe-area-context';

import type { RouteProp } from '@react-navigation/native';
import { Channel, ChannelScheduledMessages } from 'stream-chat-react-native';

import { ScreenHeader } from '../components/ScreenHeader';
import { useAppContext } from '../context/AppContext';
import type { StackNavigatorParamList } from '../types';

export type ScheduledMessagesScreenProps = {
route: RouteProp<StackNavigatorParamList, 'ScheduledMessagesScreen'>;
};

/**
* A channel's or a thread's scheduled messages. The `Channel` is set up like the channel screen's,
* so editing uses the same composer, but it neither loads messages nor marks the channel read.
*/
export const ScheduledMessagesScreen: React.FC<ScheduledMessagesScreenProps> = ({
route: {
params: { channel, thread },
},
}) => {
const { messageInputFloating } = useAppContext();

return (
<SafeAreaView edges={['left', 'right']} style={styles.flex}>
<Channel
audioRecordingEnabled={true}
channel={channel}
initializeOnMount={false}
keyboardVerticalOffset={0}
markReadOnMount={false}
messageInputFloating={messageInputFloating}
>
<ScreenHeader titleText='Scheduled messages' />
<ChannelScheduledMessages view={thread?.scheduledMessages} />
</Channel>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
flex: {
flex: 1,
},
});
Loading
Loading