Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit f0048b6

Browse files
authored
Merge pull request #90 from pubnub/react-native-0.70
fix(lib): inverted MessageList in RN ~0.70 on Android
2 parents 2d7a07c + f2781de commit f0048b6

File tree

14 files changed

+563
-586
lines changed

14 files changed

+563
-586
lines changed

.pubnub.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
---
22
name: pubnub-react-chat-components
3-
version: v0.17.0
3+
version: v0.18.0
44
scm: github.com/pubnub/react-chat-components
55
schema: 1
66
files:
77
- lib/dist/index.js
88
- lib/dist/index.es.js
99
changelog:
10+
- date: 2022-12-05
11+
version: v0.18.0
12+
changes:
13+
- type: bug
14+
text: "MessageList - problem with inverted list in React Native ~0.70 on Android."
1015
- date: 2022-11-21
1116
version: v0.17.0
1217
changes:

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858
"turbo": "1.5.6"
5959
},
6060
"resolutions": {
61-
"@types/react": "18.0.20",
62-
"react": "18.0.0",
63-
"react-dom": "18.0.0"
61+
"@types/react": "18.0.24",
62+
"react": "18.1.0",
63+
"react-dom": "18.1.0"
6464
},
6565
"overrides": {
66-
"@types/react": "18.0.20",
67-
"react": "18.0.0",
68-
"react-dom": "18.0.0"
66+
"@types/react": "18.0.24",
67+
"react": "18.1.0",
68+
"react-dom": "18.1.0"
6969
}
7070
}

packages/common/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pubnub/common-chat-components",
3-
"version": "0.17.0",
3+
"version": "0.18.0",
44
"main": "src/index.ts",
55
"license": "MIT",
66
"scripts": {
@@ -17,14 +17,14 @@
1717
"@types/jest": "29.0.3",
1818
"@types/lodash": "4.14.186",
1919
"@types/pubnub": "7.2.0",
20-
"@types/react": "18.0.20",
20+
"@types/react": "18.0.24",
2121
"@types/react-dom": "18.0.6",
2222
"jest": "29.0.3",
2323
"jest-environment-jsdom": "29.0.3",
2424
"pubnub": "7.2.0",
2525
"pubnub-react": "3.0.1",
26-
"react": "18.0.0",
27-
"react-dom": "18.0.0",
26+
"react": "18.1.0",
27+
"react-dom": "18.1.0",
2828
"typescript": "4.8.3"
2929
}
3030
}

packages/react-native/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pubnub/react-native-chat-components",
3-
"version": "0.17.0",
3+
"version": "0.18.0",
44
"description": "PubNub Chat Components is a development kit of React Native components that aims to help you to easily build Chat applications using PubNub infrastructure. It removes the complexicity of picking an adequate Chat engine, learning its APIs and dealing with its low-level internals. As the same time it allows you to create apps of various use cases, with different functionalities and customizable looks.",
55
"author": "PubNub <[email protected]>",
66
"main": "dist/index.js",
@@ -45,15 +45,15 @@
4545
"@testing-library/react-native": "11.1.0",
4646
"@types/jest": "29.0.3",
4747
"@types/pubnub": "7.2.0",
48-
"@types/react": "18.0.20",
48+
"@types/react": "18.0.24",
4949
"@types/react-dom": "18.0.6",
5050
"babel-jest": "29.2.0",
5151
"jest": "29.0.3",
5252
"pubnub": "7.2.0",
5353
"pubnub-react": "3.0.1",
54-
"react": "18.0.0",
55-
"react-dom": "18.0.0",
56-
"react-native": "0.69.5",
54+
"react": "18.1.0",
55+
"react-dom": "18.1.0",
56+
"react-native": "0.70.5",
5757
"react-test-renderer": "18.2.0",
5858
"rollup": "2.79.0",
5959
"rollup-plugin-peer-deps-external": "2.2.4",

packages/react-native/src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const useStyle = <T>(props: UseStyleProps<T>): T => {
2020
return style;
2121
};
2222

23-
export const useRotation = (shouldRun = true): Animated.AnimatedInterpolation => {
23+
export const useRotation = (shouldRun = true): Animated.AnimatedInterpolation<number> => {
2424
const [rotationValue] = useState(new Animated.Value(0));
2525
const animation = useMemo(
2626
() =>

packages/react-native/src/message-list/message-list.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ import {
2222
import createDefaultStyle, { MessageListStyle } from "./message-list.style";
2323
import { useStyle, useRotation } from "../helpers";
2424
import SpinnerIcon from "../icons/spinner.png";
25+
import ViewReactNativeStyleAttributes from "react-native/Libraries/Components/View/ReactNativeStyleAttributes";
26+
27+
// Workaround for workaround for: https://github.com/facebook/react-native/issues/30034
28+
ViewReactNativeStyleAttributes.scaleY = true;
2529

2630
export type MessageListProps = CommonMessageListProps & {
2731
/** Callback run on a list scroll. */

packages/react/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pubnub/react-chat-components",
3-
"version": "0.17.0",
3+
"version": "0.18.0",
44
"description": "PubNub Chat Components is a development kit of React components that aims to help you to easily build Chat applications using PubNub infrastructure. It removes the complexicity of picking an adequate Chat engine, learning its APIs and dealing with its low-level internals. As the same time it allows you to create apps of various use cases, with different functionalities and customizable looks.",
55
"author": "PubNub <[email protected]>",
66
"main": "dist/index.js",
@@ -44,16 +44,16 @@
4444
"@testing-library/user-event": "14.4.3",
4545
"@types/jest": "29.0.3",
4646
"@types/pubnub": "7.2.0",
47-
"@types/react": "18.0.20",
47+
"@types/react": "18.0.24",
4848
"@types/react-dom": "18.0.6",
4949
"jest": "29.0.3",
5050
"jest-environment-jsdom": "29.0.3",
5151
"jest-scss-transform": "1.0.3",
5252
"postcss": "8.4.16",
5353
"pubnub": "7.2.0",
5454
"pubnub-react": "3.0.1",
55-
"react": "18.0.0",
56-
"react-dom": "18.0.0",
55+
"react": "18.1.0",
56+
"react-dom": "18.1.0",
5757
"rollup": "2.79.0",
5858
"rollup-plugin-peer-deps-external": "2.2.4",
5959
"rollup-plugin-postcss": "4.0.2",

samples/react-native/getting-started/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
"web": "expo start --web"
1010
},
1111
"dependencies": {
12-
"@expo/webpack-config": "0.17.0",
12+
"@expo/webpack-config": "^0.17.2",
1313
"@pubnub/react-native-chat-components": "*",
14-
"expo": "46.0.10",
15-
"expo-status-bar": "1.4.0",
14+
"expo": "^47.0.0",
15+
"expo-status-bar": "~1.4.2",
1616
"pubnub": "7.2.0",
1717
"pubnub-react": "3.0.1",
18-
"react": "18.0.0",
19-
"react-native": "0.69.5",
20-
"react-native-safe-area-context": "4.3.1"
18+
"react": "18.1.0",
19+
"react-native": "0.70.5",
20+
"react-native-safe-area-context": "4.4.1"
2121
},
2222
"devDependencies": {
2323
"@babel/core": "7.19.1",
24-
"@types/react": "18.0.20",
25-
"@types/react-native": "0.69.3",
24+
"@types/react": "18.0.24",
25+
"@types/react-native": "~0.70.6",
2626
"typescript": "4.8.3"
2727
},
2828
"private": true

samples/react-native/mobile-chat/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@
1313
"tsc": "tsc"
1414
},
1515
"dependencies": {
16-
"@expo/webpack-config": "^0.17.0",
16+
"@expo/webpack-config": "^0.17.2",
1717
"@pubnub/react-native-chat-components": "*",
1818
"@react-navigation/native": "6.0.12",
1919
"@react-navigation/native-stack": "6.8.0",
2020
"dotenv": "16.0.2",
21-
"expo": "46.0.10",
22-
"expo-constants": "13.2.4",
23-
"expo-status-bar": "1.4.0",
21+
"expo": "^47.0.0",
22+
"expo-constants": "~14.0.2",
23+
"expo-status-bar": "~1.4.2",
2424
"jotai": "1.8.3",
2525
"pubnub": "7.2.0",
2626
"pubnub-react": "3.0.1",
27-
"react": "18.0.0",
28-
"react-dom": "18.0.0",
29-
"react-native": "0.69.5",
30-
"react-native-safe-area-context": "4.3.1",
31-
"react-native-screens": "3.15.0",
27+
"react": "18.1.0",
28+
"react-dom": "18.1.0",
29+
"react-native": "0.70.5",
30+
"react-native-safe-area-context": "4.4.1",
31+
"react-native-screens": "~3.18.0",
3232
"react-native-web": "~0.18.7"
3333
},
3434
"devDependencies": {
3535
"@babel/core": "7.19.1",
36-
"@types/react": "18.0.20",
37-
"@types/react-native": "0.69.3",
36+
"@types/react": "18.0.24",
37+
"@types/react-native": "~0.70.6",
3838
"typescript": "4.8.3"
3939
}
4040
}

samples/react/getting-started/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"@pubnub/react-chat-components": "*",
1414
"pubnub": "7.2.0",
1515
"pubnub-react": "3.0.1",
16-
"react": "18.0.0",
17-
"react-dom": "18.0.0"
16+
"react": "18.1.0",
17+
"react-dom": "18.1.0"
1818
},
1919
"devDependencies": {
2020
"@types/pubnub": "7.2.0",
21-
"@types/react": "18.0.20",
21+
"@types/react": "18.0.24",
2222
"@types/react-dom": "18.0.6",
2323
"@vitejs/plugin-react": "2.1.0",
2424
"typescript": "4.8.3",

0 commit comments

Comments
 (0)