From fc5d670b822d24c16c3b7b7faaa3de6b08ee1916 Mon Sep 17 00:00:00 2001 From: Batyr Kanzitdinov Date: Sat, 3 Sep 2022 14:50:32 +0200 Subject: [PATCH 1/3] `react-native-ui-lib` updated --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c98d9c5..f25fc22 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "react-native-navigation-hooks": "^6.3.0", "react-native-reanimated": "^2.10.0", "react-native-restart": "^0.0.24", - "react-native-ui-lib": "^6.20.2", + "react-native-ui-lib": "^6.20.3", "react-native-vector-icons": "^9.2.0", "rn-bounceable": "^1.2.0", "rnn-screens": "^0.3.1" diff --git a/yarn.lock b/yarn.lock index beeafde..f105e13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8852,10 +8852,10 @@ react-native-text-size@4.0.0-rc.1: resolved "https://registry.yarnpkg.com/react-native-text-size/-/react-native-text-size-4.0.0-rc.1.tgz#1e048d345dd6a5a8e1269e0585c1a5948c478da5" integrity sha512-CysqjU2jK6Yc+a+kEI222pUyTY2ywcU2HqbFqf1KHymW6OPTdvBBHqbEJKL0QiLhQaFYDbqicM+h990s9TP00g== -react-native-ui-lib@^6.20.2: - version "6.20.2" - resolved "https://registry.yarnpkg.com/react-native-ui-lib/-/react-native-ui-lib-6.20.2.tgz#c5204b8420b1ee021cfc2d7bc024a6283de4308f" - integrity sha512-fw6gYdGNhm8vKI1E6NDtp6zlkJAYyLc6euVb+EKJrlXuoIidxzo/Mko88RAbGVP1nCUbw3dewA3H4ssML1wpdw== +react-native-ui-lib@^6.20.3: + version "6.20.3" + resolved "https://registry.yarnpkg.com/react-native-ui-lib/-/react-native-ui-lib-6.20.3.tgz#71f139cc5d308775e58fd578e311b9d1887cc3f4" + integrity sha512-5C4SCCvnrktkjMr0uolhoR9gZjfVBwSlPUFR5tVUVwGitV6wRUURFyhpU6/SG4Wt+Mw07zcxkSkpOqOofZ6P7w== dependencies: babel-plugin-transform-inline-environment-variables "^0.0.2" color "^3.1.0" From 991ab917e7bf7fff374b598a7944c1c06657d595 Mon Sep 17 00:00:00 2001 From: Batyr Kanzitdinov Date: Sat, 3 Sep 2022 14:51:06 +0200 Subject: [PATCH 2/3] fix: patch file for dark mode (rnuilib) --- patches/react-native-ui-lib+6.20.3.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 patches/react-native-ui-lib+6.20.3.patch diff --git a/patches/react-native-ui-lib+6.20.3.patch b/patches/react-native-ui-lib+6.20.3.patch new file mode 100644 index 0000000..13a7e87 --- /dev/null +++ b/patches/react-native-ui-lib+6.20.3.patch @@ -0,0 +1,16 @@ +diff --git a/node_modules/react-native-ui-lib/src/hooks/useThemeProps/index.js b/node_modules/react-native-ui-lib/src/hooks/useThemeProps/index.js +index fdcba11..0b28fdf 100644 +--- a/node_modules/react-native-ui-lib/src/hooks/useThemeProps/index.js ++++ b/node_modules/react-native-ui-lib/src/hooks/useThemeProps/index.js +@@ -1,9 +1,11 @@ + import { useContext, createContext } from 'react'; ++import { useColorScheme } from 'react-native'; + import * as Modifiers from "../../commons/modifiers"; + import { ThemeManager } from "../../style"; + const EmptyContext = createContext({}); + + const useThemeProps = (props, componentName) => { ++ useColorScheme(); + const themeContext = ThemeManager.getThemeContext(); + const context = useContext(themeContext ?? EmptyContext); + return Modifiers.getThemeProps(props, context, componentName); From 72b05092ecfd0d4bc5ea51fe08ca40fda09bee1a Mon Sep 17 00:00:00 2001 From: Batyr Kanzitdinov Date: Sat, 3 Sep 2022 15:06:08 +0200 Subject: [PATCH 3/3] `Broken Dark mode` section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dcfbbe..910e134 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ Feel free to open an issue for suggestions. - _Large title is not shown on 2nd+ tab_. This [issue](https://github.com/software-mansion/react-native-screens/issues/649) exists. So you can find the patch file for fixing that in `patches/react-native+0.69.5.patch`. It will be autorun when you do `yarn add/remove/etc`. - _Issue after renaming on Android_. This happens when you [rename](#rename) the app using `yarn rename` script. Check [Rename](#rename) section for possible solution. -- _Broken Dark mode_. This happens if `appearance` is system and the app's appearance is toggled. This is connected to RNUILib's View component and this [issue](https://github.com/wix/react-native-ui-lib/issues/2127) particularly. +- _Broken Dark mode_. This happens if `appearance` is system and the app's appearance is toggled. This is connected to RNUILib's View component and this [issue](https://github.com/wix/react-native-ui-lib/issues/2127) particularly. `UPD`: Possible solution is to use the patch file (under `patches` folder) that will be automatically applied in this starter. More detailed info will be posted soon. ## Worth checking