Skip to content

Commit

Permalink
Next release (#2093)
Browse files Browse the repository at this point in the history
* chore: adding needed info to bug report template (#2087)

* chore: adding needed info to bug report template

* chore: adding needed info to bug report template

* adding yarn.lock

* Delete Podfile.lock

* Chore: fixing broken android ci (#2089)

* chore: adding needed info to bug report template

* chore: adding needed info to bug report template

* adding yarn.lock

* Delete Podfile.lock

* fix: android build by adding missing ReactNativeFlipper.java for release

* Update bug_report.md (#2090)

* docs: dont install a sepc. react-native-quick-sqlite version and contemp. comp. version table (#2091)

* Delete shared

* docs: adding sonar badge (#2096)

* fix: AutoCompleteInput setInputBoxRef typing (#2095)

* fix: AutoCompleteInput setInputBoxRef typing

* fix: AutoCompleteInput setInputBoxRef typing

* fix: make ws connection more robust when user is not set yet (#2098)

* fix: check whether client.userID (connecting user started at least) exists before opening a connection

* fix: check whether client.userID (connecting user started at least) exists before opening a connection

* podfile + yarn.lock
  • Loading branch information
vanGalilea authored May 12, 2023
1 parent 65406be commit 0f5730e
Show file tree
Hide file tree
Showing 11 changed files with 177 additions and 64 deletions.
141 changes: 124 additions & 17 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
name: "⚠️ Bug/Issue report - React Native"
about: "Please provide as much detail as possible. Issues may be closed if they do
not follow the template."
title: "[\U0001F41B] Bug Report Title - CHANGE ME "
labels: 'Needs Triaging'
assignees: ''

Expand All @@ -20,29 +21,135 @@ Also if you have some feedback regarding docs, please don't hesitate to comment
Your co-operation is really-really appreciated in this manner. Thanks and happy coding :)
-->

**Describe the bug**
A clear and concise description of what the bug is.
<!-- PLEASE DO NOT REMOVE ANY SECTIONS FROM THIS ISSUE TEMPLATE -->
<!-- Leave them as they are even if they're irrelevant to your issue -->

**Dev environment info (please complete/provide the following information):**

- Package version (stream-chat-react-native/stream-chat-expo)
- react-native or expo version
- Device/Emulator (android/ios) and OS version
- Offline support enabled (yes/no)
## Issue

**To Reproduce**
<!-- Please describe your issue here --^ and provide as much detail as you can. -->
<!-- Include code snippets that show your usages of the library in the context of your project. -->
<!-- Snippets that also show how and where the library is imported in JS are useful to debug issues relating to importing or methods not found issues -->

Describe your issue here

---

### Steps to reproduce
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
etc...

---


### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

---

## Project Related Information

### Customization

<details><summary>Click To Expand</summary>
<p>

<!-- If applicable to the issue, provide the contents of key UI components that were customized which will help to debug -->
<!-- For Example: -->
<!-- - Chat -->
<!-- - ChannelList -->
<!-- - Channel -->
<!-- - MessageList -->
<!-- - MessageInput -->
<!-- - etc... -->
<!-- ADD THE CONTENTS OF THE COMPONENTS IN THE PROVIDED CODE BLOCKS BELOW -->

```typescript jsx
# N/A
```
</p>
</details>

---

### Offline support

<!--- Mark any options that apply below -->

- [ ] I have enabled offline support.
- [ ] The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)

---

## Environment

<details><summary>Click To Expand</summary>
<p>

#### `package.json`:

```json
# N/A
```

**`react-native info` output:**

<!-- Please run `react-native info` on your terminal and paste the contents into the code block below -->

```
OUTPUT GOES HERE
```

<!-- change `[ ]` to `[x]` to select an option(s) -->

- **Platform that you're experiencing the issue on**:
- [ ] iOS
- [ ] Android
- [ ] **iOS** but have not tested behavior on Android
- [ ] **Android** but have not tested behavior on iOS
- [ ] Both
- **`stream-chat-react-native` version you're using that has this issue:**
- `e.g. 5.4.3`
- Device/Emulator info:
- [ ] I am using a physical device
- OS version: `e.g. Android 10`
- Device/Emulator: `e.g. iPhone 11`

</p>
</details>

<!-- Thanks for reading this far down ❤️ -->
<!-- High quality, detailed issues are much easier to triage for maintainers -->

<!-- For bonus points, if you put a 🔥 (:fire:) emojii at the start of the issue title we'll know -->
<!-- that you took the time to fill this out correctly, or, at least read this far -->

---


### Additional context

<!-- Add any other context about the problem here. -->

---

### Screenshots

<details><summary>Click To Expand</summary>
<p>

<!-- If applicable, add screenshots to help explain your problem. -->

</p>
</details>

---

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.

**Screenshots**
If applicable, add screenshots to help explain your problem.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

[![NPM](https://img.shields.io/npm/v/stream-chat-react-native.svg)](https://www.npmjs.com/package/stream-chat-react-native)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GetStream_stream-chat-react-native&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=GetStream_stream-chat-react-native)
[![Build Status](https://github.com/GetStream/stream-chat-react-native/workflows/build/badge.svg)](https://github.com/GetStream/stream-chat-react-native/actions)
[![Test Status](https://github.com/GetStream/stream-chat-react-native/workflows/test/badge.svg)](https://github.com/GetStream/stream-chat-react-native/actions)
[![Component Reference](https://img.shields.io/badge/docs-component%20reference-blue.svg)](https://getstream.io/chat/docs/sdk/reactnative)

<img align="right" src="https://getstream.imgix.net/images/ios-chat-tutorial/iphone_chat_art@3x.png?auto=format,enhance" width="50%" />
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/reactnative/basics/offline_support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ yarn remove stream-chat

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

> 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.
> Contemplate our dependency version compatibility [table](./getting_started.mdx#version-compatibilities) to make sure your `react-native-quick-sqlite` version is compatible with your `stream-chat-react-native` version.
```bash
yarn add react-native-quick-sqlite@5.1.0
yarn add react-native-quick-sqlite
npx pod-install
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The new `Global Config` feature allows you to enable and disable features of the
We will be gradually adding more features/options to the global config.
In the future this will be the main way to alter the default behavior of the SDK and it's components.

## When to use a Global Configt
## When to use global config

When you want to alter the default behavior of the SDK or it's components.
Please check the available options below to see if there is a config option that fits your needs.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.sampleapp;

import android.content.Context;
import com.facebook.react.ReactInstanceManager;

/**
* Class responsible of loading Flipper inside your React Native application. This is the release
* flavor of it so it's empty as we don't want to load Flipper.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
// Do nothing as we don't want to initialize Flipper on Release.
}
}
2 changes: 1 addition & 1 deletion examples/TypeScriptMessaging/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -781,4 +781,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: bdd8b333b6b53d6a2a80bcd28a1af34d2155ecca

COCOAPODS: 1.11.3
COCOAPODS: 1.12.1
25 changes: 5 additions & 20 deletions examples/TypeScriptMessaging/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6796,10 +6796,10 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.13.0:
version "5.13.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.13.0.tgz#9425b3aec314e2183bdff5ed0141ddae0fbfaff3"
integrity sha512-dqdq4nInUPIDOXyK55vk4mrOgZTox/aRr7rRxZnQBAivuGOLnrcrv2d2RqWdVG6fC1YX7iatXKDLTThCBH2dUQ==
stream-chat-react-native-core@5.14.0:
version "5.14.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.14.0.tgz#81f7890b083fc550d6d5f2e848d96847381df435"
integrity sha512-osgLHxqmLynXqOC5cuXRFDcFf45OtjMgHj00LQG0SiM86LTx/T3cIHhYl4VWLIvoRMuuaubwmhhmBXSnGPU+2w==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand All @@ -6813,7 +6813,7 @@ stream-chat-react-native-core@5.13.0:
path "0.12.7"
react-native-markdown-package "1.8.2"
react-native-url-polyfill "^1.3.0"
stream-chat "8.2.1"
stream-chat "8.6.0"

"stream-chat-react-native-core@link:../../package":
version "0.0.0"
Expand All @@ -6828,21 +6828,6 @@ stream-chat-react-native-devtools@^1.1.0:
version "0.0.0"
uid ""

stream-chat@8.2.1:
version "8.2.1"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.2.1.tgz#578015b7ba738b46e7a68e596a9c63b8625dc61d"
integrity sha512-8f+Zkcz2JmSOSw3Q+1ZyC7JLFnB7HezE8TGTY4oeLG54g5r4cCwV0MVGlPaWERZ5darG987xasbOx6eU1Jjesg==
dependencies:
"@babel/runtime" "^7.16.3"
"@types/jsonwebtoken" "~9.0.0"
"@types/ws" "^7.4.0"
axios "^0.22.0"
base64-js "^1.5.1"
form-data "^4.0.0"
isomorphic-ws "^4.0.1"
jsonwebtoken "~9.0.0"
ws "^7.4.4"

stream-chat@8.6.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.6.0.tgz#a686a11337d7d0176f6881874cad73dac86de803"
Expand Down
18 changes: 9 additions & 9 deletions package/expo-package/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2948,10 +2948,10 @@ stream-buffers@2.2.x:
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==

stream-chat-react-native-core@5.13.0:
version "5.13.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.13.0.tgz#9425b3aec314e2183bdff5ed0141ddae0fbfaff3"
integrity sha512-dqdq4nInUPIDOXyK55vk4mrOgZTox/aRr7rRxZnQBAivuGOLnrcrv2d2RqWdVG6fC1YX7iatXKDLTThCBH2dUQ==
stream-chat-react-native-core@5.14.0:
version "5.14.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.14.0.tgz#81f7890b083fc550d6d5f2e848d96847381df435"
integrity sha512-osgLHxqmLynXqOC5cuXRFDcFf45OtjMgHj00LQG0SiM86LTx/T3cIHhYl4VWLIvoRMuuaubwmhhmBXSnGPU+2w==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand All @@ -2965,12 +2965,12 @@ stream-chat-react-native-core@5.13.0:
path "0.12.7"
react-native-markdown-package "1.8.2"
react-native-url-polyfill "^1.3.0"
stream-chat "8.2.1"
stream-chat "8.6.0"

stream-chat@8.2.1:
version "8.2.1"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.2.1.tgz#578015b7ba738b46e7a68e596a9c63b8625dc61d"
integrity sha512-8f+Zkcz2JmSOSw3Q+1ZyC7JLFnB7HezE8TGTY4oeLG54g5r4cCwV0MVGlPaWERZ5darG987xasbOx6eU1Jjesg==
stream-chat@8.6.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.6.0.tgz#a686a11337d7d0176f6881874cad73dac86de803"
integrity sha512-DsVN1D1nr5rLYMc1+LDJt2f+wUrqR0Nv9o71zrSvSQIVWaBtmq/nMqZXie2SV4ndT9sbWExXay5FVGxjOTtucQ==
dependencies:
"@babel/runtime" "^7.16.3"
"@types/jsonwebtoken" "~9.0.0"
Expand Down
18 changes: 9 additions & 9 deletions package/native-package/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4387,10 +4387,10 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.13.0:
version "5.13.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.13.0.tgz#9425b3aec314e2183bdff5ed0141ddae0fbfaff3"
integrity sha512-dqdq4nInUPIDOXyK55vk4mrOgZTox/aRr7rRxZnQBAivuGOLnrcrv2d2RqWdVG6fC1YX7iatXKDLTThCBH2dUQ==
stream-chat-react-native-core@5.14.0:
version "5.14.0"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.14.0.tgz#81f7890b083fc550d6d5f2e848d96847381df435"
integrity sha512-osgLHxqmLynXqOC5cuXRFDcFf45OtjMgHj00LQG0SiM86LTx/T3cIHhYl4VWLIvoRMuuaubwmhhmBXSnGPU+2w==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand All @@ -4404,12 +4404,12 @@ stream-chat-react-native-core@5.13.0:
path "0.12.7"
react-native-markdown-package "1.8.2"
react-native-url-polyfill "^1.3.0"
stream-chat "8.2.1"
stream-chat "8.6.0"

stream-chat@8.2.1:
version "8.2.1"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.2.1.tgz#578015b7ba738b46e7a68e596a9c63b8625dc61d"
integrity sha512-8f+Zkcz2JmSOSw3Q+1ZyC7JLFnB7HezE8TGTY4oeLG54g5r4cCwV0MVGlPaWERZ5darG987xasbOx6eU1Jjesg==
stream-chat@8.6.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.6.0.tgz#a686a11337d7d0176f6881874cad73dac86de803"
integrity sha512-DsVN1D1nr5rLYMc1+LDJt2f+wUrqR0Nv9o71zrSvSQIVWaBtmq/nMqZXie2SV4ndT9sbWExXay5FVGxjOTtucQ==
dependencies:
"@babel/runtime" "^7.16.3"
"@types/jsonwebtoken" "~9.0.0"
Expand Down
3 changes: 2 additions & 1 deletion package/src/components/Chat/hooks/useIsOnline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const useIsOnline = <
}, [closeConnectionOnBackground, client, clientExists]);

const onForeground = useCallback(() => {
if (!clientExists) return;
// If the user id is not set, we should not open the connection, as it will raise an unneeded error
if (!clientExists || !client.userID) return;

client.openConnection();
}, [client, clientExists]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { PropsWithChildren, useContext, useEffect, useRef, useState } from 'react';

import { Alert, Keyboard, Platform } from 'react-native';

import type { LegacyRef } from 'react';
import type { TextInput, TextInputProps } from 'react-native';
import { Alert, Keyboard, Platform } from 'react-native';

import uniq from 'lodash/uniq';
import { lookup } from 'mime-types';
Expand Down Expand Up @@ -190,7 +190,7 @@ export type LocalMessageInputContext<
/**
* Ref callback to set reference on input box
*/
setInputBoxRef: (ref: TextInput | null) => void;
setInputBoxRef: LegacyRef<TextInput> | undefined;
setMentionedUsers: React.Dispatch<React.SetStateAction<string[]>>;
setNumberOfUploads: React.Dispatch<React.SetStateAction<number>>;
setSendThreadMessageInChannel: React.Dispatch<React.SetStateAction<boolean>>;
Expand Down

0 comments on commit 0f5730e

Please sign in to comment.