From 031fa95715c7244d744424d93446b5d4d5483697 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 29 Sep 2025 22:31:55 +0300 Subject: [PATCH] remove root sibling library (#9097) --- jest/test-utils.tsx | 20 +++----- package.json | 1 - src/App.native.tsx | 115 +++++++++++++++++++++----------------------- src/App.web.tsx | 111 +++++++++++++++++++++--------------------- yarn.lock | 5 -- 5 files changed, 118 insertions(+), 134 deletions(-) diff --git a/jest/test-utils.tsx b/jest/test-utils.tsx index 0a22d792bc..264b31fae5 100644 --- a/jest/test-utils.tsx +++ b/jest/test-utils.tsx @@ -1,22 +1,18 @@ -import React from 'react' -import {render} from '@testing-library/react-native' import {GestureHandlerRootView} from 'react-native-gesture-handler' -import {RootSiblingParent} from 'react-native-root-siblings' import {SafeAreaProvider} from 'react-native-safe-area-context' -import {RootStoreProvider, RootStoreModel} from '../src/state' +import {render} from '@testing-library/react-native' + import {ThemeProvider} from '../src/lib/ThemeContext' +import {type RootStoreModel, RootStoreProvider} from '../src/state' const customRender = (ui: any, rootStore: RootStoreModel) => render( - // eslint-disable-next-line react-native/no-inline-styles - - - - {ui} - - - + + + {ui} + + , ) diff --git a/package.json b/package.json index 71c28fe0af..6ff8711102 100644 --- a/package.json +++ b/package.json @@ -197,7 +197,6 @@ "react-native-progress": "bluesky-social/react-native-progress", "react-native-qrcode-styled": "^0.3.3", "react-native-reanimated": "^3.19.1", - "react-native-root-siblings": "^5.0.1", "react-native-safe-area-context": "~5.6.0", "react-native-screens": "~4.16.0", "react-native-svg": "15.12.1", diff --git a/src/App.native.tsx b/src/App.native.tsx index 9821aa871c..30a5e81296 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -4,7 +4,6 @@ import '#/view/icons' import React, {useEffect, useState} from 'react' import {GestureHandlerRootView} from 'react-native-gesture-handler' -import {RootSiblingParent} from 'react-native-root-siblings' import { initialWindowMetrics, SafeAreaProvider, @@ -137,64 +136,62 @@ function InnerApp() { - - - - - - - - - - {/* LabelDefsProvider MUST come before ModerationOptsProvider */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + {/* LabelDefsProvider MUST come before ModerationOptsProvider */} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/App.web.tsx b/src/App.web.tsx index 569c9be799..b7cba6122e 100644 --- a/src/App.web.tsx +++ b/src/App.web.tsx @@ -3,7 +3,6 @@ import '#/view/icons' import './style.css' import React, {useEffect, useState} from 'react' -import {RootSiblingParent} from 'react-native-root-siblings' import {SafeAreaProvider} from 'react-native-safe-area-context' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -111,62 +110,60 @@ function InnerApp() { - - - - - - - - - - - {/* LabelDefsProvider MUST come before ModerationOptsProvider */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + {/* LabelDefsProvider MUST come before ModerationOptsProvider */} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/yarn.lock b/yarn.lock index a773233e7e..dfab6f354a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17071,11 +17071,6 @@ react-native-reanimated@^3.19.1: invariant "^2.2.4" react-native-is-edge-to-edge "1.1.7" -react-native-root-siblings@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/react-native-root-siblings/-/react-native-root-siblings-5.0.1.tgz#97e050e5155228f65810fb1c466ff8e769c5272c" - integrity sha512-Ay3k/fBj6ReUkWX5WNS+oEAcgPLEGOK8n7K/L7D85mf3xvd8rm/b4spsv26E4HlFzluVx5HKbxEt9cl0wQ1u3g== - react-native-safe-area-context@~5.6.0: version "5.6.1" resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-5.6.1.tgz#cb4d249ef1a6f7e8fd0cfdfa9764838dffda26b6"