Skip to content

Commit c1e7cb7

Browse files
authored
Merge pull request #1908 from GetStream/develop
Next Release
2 parents 12d38bf + 788902d commit c1e7cb7

File tree

59 files changed

+6620
-8581
lines changed

Some content is hidden

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

59 files changed

+6620
-8581
lines changed

.github/workflows/changelog-preview.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ jobs:
2323
node-version: ${{ matrix.node-version }}
2424
registry-url: 'https://registry.npmjs.org'
2525
- name: Installation
26-
run: yarn --frozen-lockfile && yarn bootstrap-ci
26+
run: |
27+
yarn --frozen-lockfile
28+
cd package/
29+
yarn --frozen-lockfile
30+
cd native-package/
31+
yarn --frozen-lockfile
32+
cd ../../examples/SampleApp/
33+
yarn --frozen-lockfile
34+
2735
- name: Generate Changelog
2836
id: generate_changelog
2937
run: |

.github/workflows/check-pr.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,30 @@ on:
1111
jobs:
1212
check_pr:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [ 16.x ]
1417
steps:
15-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1619
with:
1720
# Disabling shallow clone is recommended for improving relevancy of reporting
1821
fetch-depth: 0
1922
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v2
23+
uses: actions/setup-node@v3
2124
with:
2225
node-version: ${{ matrix.node-version }}
2326
- name: Installation & Build Package
2427
# installation already takes care of calling prepare which calls build
2528
# for the sdk package
26-
run: yarn --frozen-lockfile && yarn bootstrap-ci
29+
run: |
30+
yarn --frozen-lockfile
31+
cd package/
32+
yarn --frozen-lockfile
33+
cd native-package/
34+
yarn --frozen-lockfile
35+
cd ../../examples/SampleApp/
36+
yarn --frozen-lockfile
37+
2738
- name: Lint
2839
run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx'
2940
- name: Test

.github/workflows/next-release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ jobs:
2525
registry-url: 'https://registry.npmjs.org'
2626
- name: Prepare git
2727
run: |
28-
git config --global user.name "Vishal Narkhede"
29-
git config --global user.email "vishal@getstream.io"
28+
git config --global user.name "Steve Galili"
29+
git config --global user.email "steve.galili@getstream.io"
3030
- name: Installation && Build SDK
31-
run: yarn --frozen-lockfile && yarn bootstrap-ci
31+
run: |
32+
yarn --frozen-lockfile
33+
cd package/
34+
yarn --frozen-lockfile
35+
cd native-package/
36+
yarn --frozen-lockfile
37+
cd ../../examples/SampleApp/
38+
yarn --frozen-lockfile
39+
3240
- name: Lint
3341
run: yarn lerna-workspaces run lint && (cd docusaurus; npx prettier --check '**/*.mdx')
3442
- name: Test

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ jobs:
2929
git config --global user.name "Steve Galili"
3030
git config --global user.email "[email protected]"
3131
- name: Installation && Build SDK
32-
run: yarn --frozen-lockfile && yarn bootstrap-ci
32+
run: |
33+
yarn --frozen-lockfile
34+
cd package/
35+
yarn --frozen-lockfile
36+
cd native-package/
37+
yarn --frozen-lockfile
38+
cd ../../examples/SampleApp/
39+
yarn --frozen-lockfile
40+
3341
- name: Lint
3442
run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx'
3543
- name: Publish Release

.github/workflows/sample-distribution.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ jobs:
2727
timeout_minutes: 10
2828
max_attempts: 3
2929
command: |
30-
yarn && yarn bootstrap-ci;
31-
cd package/native-package
32-
yarn;
30+
yarn --frozen-lockfile
31+
cd package/
32+
yarn --frozen-lockfile
33+
cd native-package/
34+
yarn --frozen-lockfile
35+
cd ../../examples/SampleApp/
36+
yarn --frozen-lockfile
37+
3338
- name: Cache iOS pods
3439
uses: actions/cache@v2
3540
with:
@@ -73,9 +78,14 @@ jobs:
7378
max_attempts: 3
7479
command: |
7580
yarn add global react-native-cli;
76-
yarn && yarn bootstrap-ci;
77-
cd package/native-package
78-
yarn;
81+
yarn --frozen-lockfile
82+
cd package/
83+
yarn --frozen-lockfile
84+
cd native-package/
85+
yarn --frozen-lockfile
86+
cd ../../examples/SampleApp/
87+
yarn --frozen-lockfile
88+
7989
- name: Build
8090
run: |
8191
cd examples/SampleApp

docusaurus/docs/reactnative/basics/getting_started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ Stream Chat for React Native is set up for parity on Expo, expo requires a diffe
307307
### Add Required Dependencies
308308

309309
```bash
310-
expo install stream-chat-expo
311-
expo install @react-native-community/netinfo expo-document-picker expo-file-system expo-haptics expo-image-manipulator expo-image-picker expo-media-library expo-sharing react-native-gesture-handler react-native-reanimated react-native-svg
310+
npx expo install stream-chat-expo
311+
npx expo install @react-native-community/netinfo expo-document-picker expo-file-system expo-haptics expo-image-manipulator expo-image-picker expo-media-library expo-sharing react-native-gesture-handler react-native-reanimated react-native-svg
312312
```
313313

314314
### Additional Steps

docusaurus/docs/reactnative/basics/offline_support.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ The offline storage implementation currently offers the following features:
1717
- Access to chat when Internet connection is disabled or low.
1818
- Faster startup times and loading, since initial data is loaded from offline storage before performing any network requests.
1919
- Syncing of the offline database using WebSocket events and Sync API.
20+
- Optimistically update offline database during chat interactions, such as send message, add reaction, etc.
2021

2122
The following features are currently **NOT** implemented. They will be implemented gradually as part of minor releases in v5.
2223

23-
- Optimistically update offline database during chat interactions, such as send message, add reaction, etc.
2424
- Access to threads in offline mode.
2525

2626
## How To Enable Offline Support
@@ -30,19 +30,18 @@ To enable offline support, please follow the given steps:
3030

3131
1. **Upgrade stream-chat dependency (optional)**
3232

33-
If you have installed `stream-chat` dependency explicitly on your application, then upgrade it to v7:
33+
If you have installed `stream-chat` dependency explicitly on your application, then please make sure to upgrade it to v7 or higher.
3434

3535
```bash
36-
yarn add stream-chat@7.0.0
36+
yarn add stream-chat
3737
```
3838

3939
2. **Add `react-native-quick-sqlite` dependency**
4040

41-
> At the moment, support for only v4 of `react-native-quick-sqlite` is available.
42-
> Support for v5 of `react-native-quick-sqlite` will be introduced in one of the upcoming minor release.
41+
> If you are using v5.5.1 or lower version of `stream-chat-react-native`, then please install v4 of `react-native-quick-sqlite` instead.
4342
4443
```bash
45-
yarn add react-native-quick-sqlite@4.0.8
44+
yarn add react-native-quick-sqlite@5.1.0
4645
npx pod-install
4746
```
4847

docusaurus/docs/reactnative/customization/native_handlers.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,19 @@ A function to trigger haptic feedback given the type of haptic force desired.
128128
**React Native:** [`react-native-haptic-feedback`](https://github.com/junina-de/react-native-haptic-feedback)
129129

130130
**Expo:** [`expo-haptics`](https://docs.expo.io/versions/latest/sdk/haptics/)
131+
132+
### Sound
133+
134+
A component that renders the Sound/Audio on the message attachment.
135+
136+
**React Native:** [`react-native-video`](https://github.com/react-native-video/react-native-video)
137+
138+
**Expo:** [`expo-av`](https://docs.expo.dev/versions/latest/sdk/av/)
139+
140+
### Video
141+
142+
A component that renders the Video on the ImageGallery when an video attachment is opened.
143+
144+
**React Native:** [`react-native-video`](https://github.com/react-native-video/react-native-video)
145+
146+
**Expo:** [`expo-av`](https://docs.expo.dev/versions/latest/sdk/av/)

examples/ExpoMessaging/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import 'react-native-gesture-handler';
33
import React, { useContext, useEffect, useMemo, useState } from 'react';
44
import { LogBox, SafeAreaView, StatusBar, useColorScheme, View } from 'react-native';
55
import { DarkTheme, DefaultTheme, NavigationContainer } from '@react-navigation/native';
6-
import { createStackNavigator, useHeaderHeight } from '@react-navigation/stack';
6+
import { createStackNavigator } from '@react-navigation/stack';
7+
import { useHeaderHeight } from '@react-navigation/elements';
78
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
89
import { StreamChat } from 'stream-chat';
910
import {

examples/ExpoMessaging/android/app/build.gradle

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: "com.android.application"
22

33
import com.android.build.OutputFile
4-
import org.apache.tools.ant.taskdefs.condition.Os
54

65
/**
76
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
@@ -151,27 +150,14 @@ android {
151150
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
152151

153152
if (isNewArchitectureEnabled()) {
154-
// We configure the NDK build only if you decide to opt-in for the New Architecture.
153+
// We configure the CMake build only if you decide to opt-in for the New Architecture.
155154
externalNativeBuild {
156-
ndkBuild {
157-
arguments "APP_PLATFORM=android-21",
158-
"APP_STL=c++_shared",
159-
"NDK_TOOLCHAIN_VERSION=clang",
160-
"GENERATED_SRC_DIR=$buildDir/generated/source",
161-
"PROJECT_BUILD_DIR=$buildDir",
162-
"REACT_ANDROID_DIR=${reactNativeRoot}/ReactAndroid",
163-
"REACT_ANDROID_BUILD_DIR=${reactNativeRoot}/ReactAndroid/build",
164-
"NODE_MODULES_DIR=$rootDir/../node_modules"
165-
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
166-
cppFlags "-std=c++17"
167-
// Make sure this target name is the same you specify inside the
168-
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
169-
targets "expomessaging_appmodules"
170-
171-
// Fix for windows limit on number of character in file paths and in command lines
172-
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
173-
arguments "NDK_APP_SHORT_COMMANDS=true"
174-
}
155+
cmake {
156+
arguments "-DPROJECT_BUILD_DIR=$buildDir",
157+
"-DREACT_ANDROID_DIR=${reactNativeRoot}/ReactAndroid",
158+
"-DREACT_ANDROID_BUILD_DIR=${reactNativeRoot}/ReactAndroid/build",
159+
"-DNODE_MODULES_DIR=$rootDir/../node_modules",
160+
"-DANDROID_STL=c++_shared"
175161
}
176162
}
177163
if (!enableSeparateBuildPerCPUArchitecture) {
@@ -183,10 +169,10 @@ android {
183169
}
184170

185171
if (isNewArchitectureEnabled()) {
186-
// We configure the NDK build only if you decide to opt-in for the New Architecture.
172+
// We configure the CMake build only if you decide to opt-in for the New Architecture.
187173
externalNativeBuild {
188-
ndkBuild {
189-
path "$projectDir/src/main/jni/Android.mk"
174+
cmake {
175+
path "$projectDir/src/main/jni/CMakeLists.txt"
190176
}
191177
}
192178
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
@@ -208,15 +194,15 @@ android {
208194
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
209195

210196
// Due to a bug inside AGP, we have to explicitly set a dependency
211-
// between configureNdkBuild* tasks and the preBuild tasks.
197+
// between configureCMakeDebug* tasks and the preBuild tasks.
212198
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
213-
configureNdkBuildRelease.dependsOn(preReleaseBuild)
214-
configureNdkBuildDebug.dependsOn(preDebugBuild)
199+
configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
200+
configureCMakeDebug.dependsOn(preDebugBuild)
215201
reactNativeArchitectures().each { architecture ->
216-
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
202+
tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
217203
dependsOn("preDebugBuild")
218204
}
219-
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
205+
tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
220206
dependsOn("preReleaseBuild")
221207
}
222208
}

0 commit comments

Comments
 (0)