Skip to content

Commit e2a01e9

Browse files
feat: V7 (#2999)
* chore: modify gh workflows * feat: removal of StreamChatGenerics (#2993) * feat: remove StreamChatGenerics and introduce interface merging * fix: some of the outstanding todos * chore: add default interfaces * chore: remove SCG from sample app * fix: remove redundant types * fix: remove type module * fix: change the way interface declaration is consumed * fix: ignore ts complaints for interface declaration * chore: migrate TypescriptMessagingApp away from SCG * chore: migrate the Expo sample app away from SCG * fix: commit missing files * fix: revert mistaken change * fix: add resolutions for symlinked libs * chore: remove support for react-native-document-picker (#3000) * BREAKING CHANGE: V7 release candidate * chore: add rc channel * fix: typo in branch name * feat: trigger breaking change for v7 (#3005) BREAKING CHANGE: Release V7 * chore: remove dryRun * chore: bump stream-chat version to latest rc * chore: bump stream-chat to latest * feat: introduce expo-video support (#3010) * feat: introduce support for expo-video * fix: remove redundant test * fix: add check for audio component * fix: lint issues * fix: different types inference with latest stream-chat changes * chore(deps): update sample apps too * fix: remove generics from new hook * fix: remove remnants from SCG and fix missing types * fix: lint issues * fix: replace TouchableOpacity with Pressable * fix: move to RN TouchableOpacity instead * chore(deps): update peer deps * chore: remove unused hooks * chore: remove deps scope * fix: all instances of FormatMessageResponse in respect to the new llc changes * chore: ref branch specifically * fix: try clearing cache * fix: remove cache clean * fix: remove console.log * fix: use latest commit * fix: use latest rc of llc * chore: use specific commit again * fix: SCG remnants from merge * fix: lint issues * fix: lint issues * fix: unify file and image types (#3050) * fix: unify file and image types * fix: refine types * fix: remove props from auto complete input * chore: update deps * fix: failing tests and AutoCompleteInput type * chore: update custom data module interfaces * fix: change RNFile to FileReference as per latest client changes (#3061) * fix: merge conflicts * fix: remove MessageType type from the SDK * fix: resolve conflicts from V7 branch * fix: broken tests * fix: useMessageActions remove reserved fields logic * revert: useMessageActions change * fix: confine readBy data to Message Status component * fix: change date separator and group styles to ref * fix: add app changes * fix: bump stream-chat to latest rc * chore: bump stream-chat version to latest rc again * fix: thread messages state not updating properly * chore: change type to inferred one * fix: set correct core lib versions * chore: bump stream-chat to latest rc again * chore: update sample app yarn.locks as well * fix: keyboard taking full screen issue when the prefer cross-fade transition setting is enabled (#3073) * fix: respect the hasCommand channel prop as well * fix: keybaord taking full screen issue when the prefer cross-fade transition setting is enabled (#3072) * fix: keybaord taking full screen issue when the prefer cross-fade transition setting is enabled * chore: bump stream-chat-js rc again * chore: full reinstall after merge from develop * fix: add back mistakenly removed mime dep * fix: revert gh action changes * chore: bump stream-chat to latest stable major --------- Co-authored-by: Khushal Agarwal <[email protected]>
1 parent 07376e8 commit e2a01e9

File tree

322 files changed

+3575
-5898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+3575
-5898
lines changed

examples/ExpoMessaging/app.json

+7
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@
4848
{
4949
"microphonePermission": "$(PRODUCT_NAME) would like to use your microphone for voice recording."
5050
}
51+
],
52+
[
53+
"expo-video",
54+
{
55+
"supportsBackgroundPlayback": true,
56+
"supportsPictureInPicture": true
57+
}
5158
]
5259
]
5360
}

examples/ExpoMessaging/app/index.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ import { ChannelList } from 'stream-chat-expo';
33
import { useContext, useMemo } from 'react';
44
import { Stack, useRouter } from 'expo-router';
55
import { ChannelSort } from 'stream-chat';
6-
import { StreamChatGenerics } from '../types';
76
import { AppContext } from '../context/AppContext';
87
import { user } from '../constants';
98

109
const filters = {
1110
members: { $in: [user.id] },
1211
type: 'messaging',
1312
};
14-
const sort: ChannelSort<StreamChatGenerics> = { last_updated: -1 };
13+
const sort: ChannelSort = { last_updated: -1 };
1514
const options = {
1615
state: true,
1716
watch: true,

examples/ExpoMessaging/components/ChatWrapper.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { PropsWithChildren } from 'react';
1+
import React, { PropsWithChildren, useRef } from 'react';
22
import {
33
Chat,
44
OverlayProvider,
@@ -7,7 +7,6 @@ import {
77
useCreateChatClient,
88
} from 'stream-chat-expo';
99
import { AuthProgressLoader } from './AuthProgressLoader';
10-
import { StreamChatGenerics } from '../types';
1110
import { STREAM_API_KEY, user, userToken } from '../constants';
1211
import { useSafeAreaInsets } from 'react-native-safe-area-context';
1312
import { useStreamChatTheme } from '../useStreamChatTheme';
@@ -34,7 +33,7 @@ export const ChatWrapper = ({ children }: PropsWithChildren<{}>) => {
3433
}
3534

3635
return (
37-
<OverlayProvider<StreamChatGenerics>
36+
<OverlayProvider
3837
bottomInset={bottom}
3938
i18nInstance={streami18n}
4039
value={{ style: theme }}

examples/ExpoMessaging/context/AppContext.tsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
import { PropsWithChildren, createContext, useContext, useState } from 'react';
2-
import { StreamChatGenerics } from '../types';
1+
import { PropsWithChildren, createContext, useState } from 'react';
32
import { Channel as ChannelType } from 'stream-chat';
43
import { ThreadContextValue } from 'stream-chat-expo';
54

65
export type AppContextType = {
7-
channel: ChannelType<StreamChatGenerics> | undefined;
8-
setChannel: React.Dispatch<React.SetStateAction<ChannelType<StreamChatGenerics> | undefined>>;
6+
channel: ChannelType | undefined;
7+
setChannel: React.Dispatch<React.SetStateAction<ChannelType | undefined>>;
98
setThread: React.Dispatch<
10-
React.SetStateAction<ThreadContextValue<StreamChatGenerics>['thread'] | undefined>
9+
React.SetStateAction<ThreadContextValue['thread'] | undefined>
1110
>;
12-
thread: ThreadContextValue<StreamChatGenerics>['thread'] | undefined;
11+
thread: ThreadContextValue['thread'] | undefined;
1312
};
1413

1514
export const AppContext = createContext<AppContextType>({
@@ -20,9 +19,9 @@ export const AppContext = createContext<AppContextType>({
2019
});
2120

2221
export const AppProvider = ({ children }: PropsWithChildren) => {
23-
const [channel, setChannel] = useState<ChannelType<StreamChatGenerics> | undefined>(undefined);
22+
const [channel, setChannel] = useState<ChannelType | undefined>(undefined);
2423
const [thread, setThread] = useState<
25-
ThreadContextValue<StreamChatGenerics>['thread'] | undefined
24+
ThreadContextValue['thread'] | undefined
2625
>(undefined);
2726

2827
return (
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import {
2+
DefaultAttachmentData,
3+
DefaultChannelData,
4+
DefaultCommandData,
5+
DefaultEventData,
6+
DefaultMemberData,
7+
DefaultMessageData,
8+
DefaultPollData,
9+
DefaultPollOptionData,
10+
DefaultReactionData,
11+
DefaultThreadData,
12+
DefaultUserData,
13+
} from 'stream-chat-expo';
14+
15+
declare module 'stream-chat' {
16+
/* eslint-disable @typescript-eslint/no-empty-object-type */
17+
18+
interface CustomAttachmentData extends DefaultAttachmentData {}
19+
20+
interface CustomChannelData extends DefaultChannelData {}
21+
22+
interface CustomCommandData extends DefaultCommandData {}
23+
24+
interface CustomEventData extends DefaultEventData {}
25+
26+
interface CustomMemberData extends DefaultMemberData {}
27+
28+
interface CustomUserData extends DefaultUserData {}
29+
30+
interface CustomMessageData extends DefaultMessageData {}
31+
32+
interface CustomPollOptionData extends DefaultPollOptionData {}
33+
34+
interface CustomPollData extends DefaultPollData {}
35+
36+
interface CustomReactionData extends DefaultReactionData {}
37+
38+
interface CustomThreadData extends DefaultThreadData {}
39+
40+
/* eslint-enable @typescript-eslint/no-empty-object-type */
41+
}

examples/ExpoMessaging/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"expo-image-manipulator": "~13.0.6",
2424
"expo-image-picker": "~16.0.6",
2525
"expo-linking": "~7.0.5",
26-
"expo-media-library": "~17.0.6",
2726
"expo-router": "~4.0.17",
2827
"expo-sharing": "~13.0.1",
2928
"expo-splash-screen": "~0.29.22",
3029
"expo-status-bar": "~2.0.1",
30+
"expo-video": "^2.0.5",
3131
"react": "18.3.1",
3232
"react-dom": "18.3.1",
3333
"react-native": "0.77.1",
@@ -46,5 +46,8 @@
4646
"@rnx-kit/metro-config": "^2.0.1",
4747
"@rnx-kit/metro-resolver-symlinks": "^0.2.1"
4848
},
49+
"resolutions": {
50+
"@types/react": "^19.0.0"
51+
},
4952
"private": true
5053
}

examples/ExpoMessaging/types.ts

-23
This file was deleted.

0 commit comments

Comments
 (0)