diff --git a/.github/actions/install-and-build-sdk/action.yml b/.github/actions/install-and-build-sdk/action.yml new file mode 100644 index 0000000000..03869c8635 --- /dev/null +++ b/.github/actions/install-and-build-sdk/action.yml @@ -0,0 +1,28 @@ +name: 'Install and Build SDK' +description: 'Runs yarn install for all the packages and sample and fails if yarn lock has a change that is not committed' +runs: + using: 'composite' + steps: + - name: Install Root repo dependencies + run: yarn --frozen-lockfile + shell: bash + - name: Install & Build the Core Package + run: | + cd package/ + yarn --frozen-lockfile + shell: bash + - name: Install & Build the Native Package + run: | + cd package/native-package/ + yarn --frozen-lockfile + shell: bash + - name: Install & Build the Expo Package + run: | + cd package/expo-package/ + yarn --frozen-lockfile + shell: bash + - name: Install & Build the Sample App + run: | + cd examples/SampleApp/ + yarn --frozen-lockfile + shell: bash diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index b1345623b1..41c4c64152 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [ 16.x ] + node-version: [16.x] steps: - uses: actions/checkout@v3 with: @@ -23,18 +23,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - name: Installation & Build Package - # installation already takes care of calling prepare which calls build - # for the sdk package - run: | - yarn --frozen-lockfile - cd package/ - yarn --frozen-lockfile - cd native-package/ - yarn --frozen-lockfile - cd ../../examples/SampleApp/ - yarn --frozen-lockfile - + - name: Install && Build - SDK and Sample App + uses: ./.github/actions/install-and-build-sdk - name: Lint run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx' - name: Test diff --git a/.github/workflows/next-release.yml b/.github/workflows/next-release.yml index 9908bf6f6e..4c1a90e661 100644 --- a/.github/workflows/next-release.yml +++ b/.github/workflows/next-release.yml @@ -27,16 +27,8 @@ jobs: run: | git config --global user.name "Steve Galili" git config --global user.email "steve.galili@getstream.io" - - name: Installation && Build SDK - run: | - yarn --frozen-lockfile - cd package/ - yarn --frozen-lockfile - cd native-package/ - yarn --frozen-lockfile - cd ../../examples/SampleApp/ - yarn --frozen-lockfile - + - name: Install && Build - SDK and Sample App + uses: ./.github/actions/install-and-build-sdk - name: Lint run: yarn lerna-workspaces run lint && (cd docusaurus; npx prettier --check '**/*.mdx') - name: Test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81e0996ab7..4ed8cdcb73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,54 +1,46 @@ name: Release on: - push: - branches: - - main + push: + branches: + - main jobs: - publish-release: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.VERSION_BUMP_TOKEN }} - # pulls all commits (needed for semantic release to correctly version) - fetch-depth: '0' - # pulls all tags (needed for semantic release to correctly version) - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - registry-url: 'https://registry.npmjs.org' - - name: Prepare git - run: | - git config --global user.name "Steve Galili" - git config --global user.email "steve.galili@getstream.io" - - name: Installation && Build SDK - run: | - yarn --frozen-lockfile - cd package/ - yarn --frozen-lockfile - cd native-package/ - yarn --frozen-lockfile - cd ../../examples/SampleApp/ - yarn --frozen-lockfile - - - name: Lint - run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx' - - name: Publish Release - run: yarn release - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - GH_TOKEN: ${{ secrets.VERSION_BUMP_TOKEN }} - - name: Merge back changes - run: | - git stash - git checkout develop - git pull origin develop - git merge main -m "chore: merge back release [skip ci]" - git push origin develop + publish-release: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16.x] + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.VERSION_BUMP_TOKEN }} + # pulls all commits (needed for semantic release to correctly version) + fetch-depth: '0' + # pulls all tags (needed for semantic release to correctly version) + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + - name: Prepare git + run: | + git config --global user.name "Steve Galili" + git config --global user.email "steve.galili@getstream.io" + - name: Install && Build - SDK and Sample App + uses: ./.github/actions/install-and-build-sdk + - name: Lint + run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx' + - name: Publish Release + run: yarn release + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + GH_TOKEN: ${{ secrets.STREAM_CI_GITHUB_BOT_TOKEN }} + - name: Merge back changes + run: | + git stash + git checkout develop + git pull origin develop + git merge main -m "chore: merge back release [skip ci]" + git push origin develop diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 051cb45393..9735d67db2 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -21,20 +21,8 @@ jobs: with: working-directory: examples/SampleApp bundler-cache: true - - name: RN setup - uses: nick-invision/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 3 - command: | - yarn --frozen-lockfile - cd package/ - yarn --frozen-lockfile - cd native-package/ - yarn --frozen-lockfile - cd ../../examples/SampleApp/ - yarn --frozen-lockfile - + - name: Install && Build - SDK and Sample App + uses: ./.github/actions/install-and-build-sdk - name: Cache iOS pods uses: actions/cache@v2 with: @@ -71,21 +59,8 @@ jobs: distribution: 'zulu' java-version: '11' check-latest: true - - name: RN setup - uses: nick-invision/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 3 - command: | - yarn add global react-native-cli; - yarn --frozen-lockfile - cd package/ - yarn --frozen-lockfile - cd native-package/ - yarn --frozen-lockfile - cd ../../examples/SampleApp/ - yarn --frozen-lockfile - + - name: Install && Build - SDK and Sample App + uses: ./.github/actions/install-and-build-sdk - name: Build run: | cd examples/SampleApp diff --git a/docusaurus/docs/reactnative/contexts/translation_context.mdx b/docusaurus/docs/reactnative/contexts/translation_context.mdx index 682b57823c..1d40bb5b8a 100644 --- a/docusaurus/docs/reactnative/contexts/translation_context.mdx +++ b/docusaurus/docs/reactnative/contexts/translation_context.mdx @@ -4,7 +4,7 @@ title: TranslationContext --- `TranslationContext` is provided by [`OverlayProvider`](../core-components/overlay_provider.mdx) and [`Chat`](../core-components/chat.mdx) components. -Read the [translations section](basics/translations.mdx) for more information on how to customize your translations. +Read the [Adding Internationalization (i18n) section](../basics/translations.mdx) for more information on how to customize your translations. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html). ## Basic Usage diff --git a/examples/ExpoMessaging/yarn.lock b/examples/ExpoMessaging/yarn.lock index fcba859c31..ebeeb7e132 100644 --- a/examples/ExpoMessaging/yarn.lock +++ b/examples/ExpoMessaging/yarn.lock @@ -6672,16 +6672,17 @@ stream-buffers@2.2.x: version "0.0.0" uid "" -stream-chat-react-native-core@5.9.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.9.1.tgz#c496feb6905e391505adca37c2eef25712a6e6d7" - integrity sha512-3zWEaoOHNpGAHy7qEI1PFqdx3dq3oHSpEs+PBrHYuUi8Xj7NisKWYkXkK3sa0BSn0hwcduSMZmNGOO9oo9lj2g== +stream-chat-react-native-core@5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.10.0.tgz#6539a878e93e56d9e04d6bb7dde63925984e5285" + integrity sha512-lJ1ON2tbSc80obGAdDHcSqzA5dtctcBy4sZ/s9AJYBOAfrQ6fw3HZhnft1YFoDg6tGJ0tOeDrwODSjlA3C4cNw== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.5" dayjs "1.10.5" file-loader "6.2.0" i18next "20.2.4" + linkify-it "^4.0.1" lodash-es "4.17.21" metro-react-native-babel-preset "0.66.2" mime-types "^2.1.34" diff --git a/examples/SampleApp/ios/Podfile.lock b/examples/SampleApp/ios/Podfile.lock index 8bfa2d22f6..95aeaf7025 100644 --- a/examples/SampleApp/ios/Podfile.lock +++ b/examples/SampleApp/ios/Podfile.lock @@ -553,7 +553,7 @@ PODS: - React-Core - RNReactNativeHapticFeedback (1.11.0): - React-Core - - RNReanimated (2.14.2): + - RNReanimated (2.14.4): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -834,7 +834,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: d3cdc05875c89782840d2f38e1d6174fab24e4d2 FBReactNativeSpec: 0612c8f2dbd774414bb778247c6ec6cb05aa4c50 Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d @@ -855,7 +855,7 @@ SPEC CHECKSUMS: Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85 GoogleAppMeasurement: 4c19f031220c72464d460c9daa1fb5d1acce958e GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f @@ -910,7 +910,7 @@ SPEC CHECKSUMS: RNImageCropPicker: ffbba608264885c241cbf3a8f78eb7aeeb978241 RNNotifee: 5155e0a5e0a97d0c839030d8192783cd63053999 RNReactNativeHapticFeedback: 653a8c126a0f5e88ce15ffe280b3ff37e1fbb285 - RNReanimated: 3ed15d2c7d7fd9d9a284de291a1e347d132d282b + RNReanimated: 6668b0587bebd4b15dd849b99e5a9c70fc12ed95 RNScreens: c277bfc4b5bb7c2fe977d19635df6f974f95dfd6 RNShare: 755de6bac084428f8fd8fb54c376f126f40e560c RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f diff --git a/examples/SampleApp/yarn.lock b/examples/SampleApp/yarn.lock index 654ad3f685..ea549d2196 100644 --- a/examples/SampleApp/yarn.lock +++ b/examples/SampleApp/yarn.lock @@ -7605,16 +7605,17 @@ 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.9.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.9.1.tgz#c496feb6905e391505adca37c2eef25712a6e6d7" - integrity sha512-3zWEaoOHNpGAHy7qEI1PFqdx3dq3oHSpEs+PBrHYuUi8Xj7NisKWYkXkK3sa0BSn0hwcduSMZmNGOO9oo9lj2g== +stream-chat-react-native-core@5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.10.0.tgz#6539a878e93e56d9e04d6bb7dde63925984e5285" + integrity sha512-lJ1ON2tbSc80obGAdDHcSqzA5dtctcBy4sZ/s9AJYBOAfrQ6fw3HZhnft1YFoDg6tGJ0tOeDrwODSjlA3C4cNw== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.5" dayjs "1.10.5" file-loader "6.2.0" i18next "20.2.4" + linkify-it "^4.0.1" lodash-es "4.17.21" metro-react-native-babel-preset "0.66.2" mime-types "^2.1.34" diff --git a/examples/TypeScriptMessaging/yarn.lock b/examples/TypeScriptMessaging/yarn.lock index 5959909a60..31149301d1 100644 --- a/examples/TypeScriptMessaging/yarn.lock +++ b/examples/TypeScriptMessaging/yarn.lock @@ -7168,16 +7168,17 @@ 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.9.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.9.1.tgz#c496feb6905e391505adca37c2eef25712a6e6d7" - integrity sha512-3zWEaoOHNpGAHy7qEI1PFqdx3dq3oHSpEs+PBrHYuUi8Xj7NisKWYkXkK3sa0BSn0hwcduSMZmNGOO9oo9lj2g== +stream-chat-react-native-core@5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.10.0.tgz#6539a878e93e56d9e04d6bb7dde63925984e5285" + integrity sha512-lJ1ON2tbSc80obGAdDHcSqzA5dtctcBy4sZ/s9AJYBOAfrQ6fw3HZhnft1YFoDg6tGJ0tOeDrwODSjlA3C4cNw== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.5" dayjs "1.10.5" file-loader "6.2.0" i18next "20.2.4" + linkify-it "^4.0.1" lodash-es "4.17.21" metro-react-native-babel-preset "0.66.2" mime-types "^2.1.34" diff --git a/package/expo-package/yarn.lock b/package/expo-package/yarn.lock index 8092f819af..df29fed87b 100644 --- a/package/expo-package/yarn.lock +++ b/package/expo-package/yarn.lock @@ -2331,6 +2331,13 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +linkify-it@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec" + integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw== + dependencies: + uc.micro "^1.0.1" + loader-utils@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" @@ -2998,16 +3005,17 @@ 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.9.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.9.1.tgz#c496feb6905e391505adca37c2eef25712a6e6d7" - integrity sha512-3zWEaoOHNpGAHy7qEI1PFqdx3dq3oHSpEs+PBrHYuUi8Xj7NisKWYkXkK3sa0BSn0hwcduSMZmNGOO9oo9lj2g== +stream-chat-react-native-core@5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.10.0.tgz#6539a878e93e56d9e04d6bb7dde63925984e5285" + integrity sha512-lJ1ON2tbSc80obGAdDHcSqzA5dtctcBy4sZ/s9AJYBOAfrQ6fw3HZhnft1YFoDg6tGJ0tOeDrwODSjlA3C4cNw== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.5" dayjs "1.10.5" file-loader "6.2.0" i18next "20.2.4" + linkify-it "^4.0.1" lodash-es "4.17.21" metro-react-native-babel-preset "0.66.2" mime-types "^2.1.34" @@ -3098,6 +3106,11 @@ ua-parser-js@^0.7.30: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.32.tgz#cd8c639cdca949e30fa68c44b7813ef13e36d211" integrity sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw== +uc.micro@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" diff --git a/package/native-package/yarn.lock b/package/native-package/yarn.lock index 0993b7f66e..eee0f41722 100644 --- a/package/native-package/yarn.lock +++ b/package/native-package/yarn.lock @@ -2883,6 +2883,13 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== +linkify-it@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec" + integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw== + dependencies: + uc.micro "^1.0.1" + loader-utils@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" @@ -4403,16 +4410,17 @@ 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.9.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.9.1.tgz#c496feb6905e391505adca37c2eef25712a6e6d7" - integrity sha512-3zWEaoOHNpGAHy7qEI1PFqdx3dq3oHSpEs+PBrHYuUi8Xj7NisKWYkXkK3sa0BSn0hwcduSMZmNGOO9oo9lj2g== +stream-chat-react-native-core@5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.10.0.tgz#6539a878e93e56d9e04d6bb7dde63925984e5285" + integrity sha512-lJ1ON2tbSc80obGAdDHcSqzA5dtctcBy4sZ/s9AJYBOAfrQ6fw3HZhnft1YFoDg6tGJ0tOeDrwODSjlA3C4cNw== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.5" dayjs "1.10.5" file-loader "6.2.0" i18next "20.2.4" + linkify-it "^4.0.1" lodash-es "4.17.21" metro-react-native-babel-preset "0.66.2" mime-types "^2.1.34" @@ -4624,6 +4632,11 @@ type@^2.7.2: resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== +uc.micro@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + uglify-es@^3.1.9: version "3.3.9" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" diff --git a/package/src/components/MessageList/MessageList.tsx b/package/src/components/MessageList/MessageList.tsx index 0272c014ab..365beede08 100644 --- a/package/src/components/MessageList/MessageList.tsx +++ b/package/src/components/MessageList/MessageList.tsx @@ -75,6 +75,11 @@ const styles = StyleSheet.create({ }, flex: { flex: 1 }, invert: { transform: [{ scaleY: -1 }] }, + invertAndroid: { + // Invert the Y AND X axis to prevent a react native issue that can lead to ANRs on android 13 + // details: https://github.com/Expensify/App/pull/12820 + transform: [{ scaleX: -1 }, { scaleY: -1 }], + }, listContainer: { flex: 1, width: '100%', @@ -88,6 +93,10 @@ const styles = StyleSheet.create({ }, }); +const InvertedCellRendererComponent = (props: React.PropsWithChildren) => ( + +); + const keyExtractor = < StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, >( @@ -970,17 +979,23 @@ const MessageListWithContext = < return null; }; + const shouldApplyAndroidWorkaround = + inverted && Platform.OS === 'android' && Platform.Version >= 33; + return (