From e17238b7e24e44905763b835fc8a80784ec4f2e3 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 22 Aug 2025 14:09:36 +0200 Subject: [PATCH 1/5] fix: add react native patch for navigation bar translucency issue --- patches/react-native/details.md | 9 ++++++- ...fix-modal-transparent-navigation-bar.patch | 26 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 85f3c5f4a367..8ba805ab2f08 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -189,4 +189,11 @@ - Reason: This patch fixes a crash that occurred when the clipboard text data can be null. - Upstream PR/issue: 🛑 - E/App issue: [#66925](https://github.com/Expensify/App/issues/66925) -- PR introducing patch: [#66749](https://github.com/Expensify/App/pull/66749) \ No newline at end of file +- PR introducing patch: [#66749](https://github.com/Expensify/App/pull/66749) +- +### [react-native+0.79.2+028+ix-modal-transparent-navigation-bar.patch](react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch) + +- Reason: This patch fixes an issue where it is not possible to enable a transparent navigation bar on Android +- Upstream PR/issue: 🛑 +- E/App issue: [Slack thread](https://margelo.slack.com/archives/C08CZDJFJ77/p1744187707721529) +- PR introducing patch: [#57181](https://github.com/Expensify/App/pull/57181) diff --git a/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch new file mode 100644 index 000000000000..f8115e1866ef --- /dev/null +++ b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch @@ -0,0 +1,26 @@ +diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +index 139a1c1..f6d1faa 100644 +--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt ++++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +@@ -361,6 +361,21 @@ public class ReactModalHostView(context: ThemedReactContext) : + // Navigation bar cannot be translucent without status bar being translucent too + dialogWindow.setSystemBarsTranslucency(navigationBarTranslucent) + ++ // If enforceNavigationBarContrast is explicitly set in the modal style (Theme.Theme_FullScreenDialog), ++ // we need to override the default behaviour for edge-to-edge mode in WindowUtils.setSystemBarsTranslucency. ++ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { ++ val attrs = intArrayOf(android.R.attr.enforceNavigationBarContrast) ++ val ta = context.obtainStyledAttributes(R.style.Theme_FullScreenDialog, attrs) ++ ++ if (ta.length() == 1) { ++ val enforceNavigationBarContrastStyleValue = ta.getBoolean(0, false) ++ dialogWindow.isNavigationBarContrastEnforced = enforceNavigationBarContrastStyleValue ++ } ++ ++ ta.recycle() ++ } ++ ++ + if (!navigationBarTranslucent) { + dialogWindow.setStatusBarTranslucency(statusBarTranslucent) + } \ No newline at end of file From 040dddffcc383e5b6a803e9c2a11d9d19932f295 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 22 Aug 2025 14:12:34 +0200 Subject: [PATCH 2/5] fix: update patch PR in details.md --- patches/react-native/details.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 8ba805ab2f08..474fb6ec356d 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -196,4 +196,4 @@ - Reason: This patch fixes an issue where it is not possible to enable a transparent navigation bar on Android - Upstream PR/issue: 🛑 - E/App issue: [Slack thread](https://margelo.slack.com/archives/C08CZDJFJ77/p1744187707721529) -- PR introducing patch: [#57181](https://github.com/Expensify/App/pull/57181) +- PR introducing patch: [#69004](https://github.com/Expensify/App/pull/69004) From abb8b6f5a6289e685c61044012df6476b8fb7973 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 22 Aug 2025 14:19:04 +0200 Subject: [PATCH 3/5] fix: update patch issue in details.md --- patches/react-native/details.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 474fb6ec356d..3c0b3f1f942f 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -195,5 +195,5 @@ - Reason: This patch fixes an issue where it is not possible to enable a transparent navigation bar on Android - Upstream PR/issue: 🛑 -- E/App issue: [Slack thread](https://margelo.slack.com/archives/C08CZDJFJ77/p1744187707721529) +- E/App issue: [#69005](https://github.com/Expensify/App/issues/69005) - PR introducing patch: [#69004](https://github.com/Expensify/App/pull/69004) From 8db1c3949b4eb3a9a4063fcc67ecc3c1b35399ed Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 22 Aug 2025 14:22:47 +0200 Subject: [PATCH 4/5] fix: update theme resource used in patch --- ...tive+0.79.2+028+fix-modal-transparent-navigation-bar.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch index f8115e1866ef..aa2dc57b0448 100644 --- a/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch +++ b/patches/react-native/react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch @@ -6,11 +6,11 @@ index 139a1c1..f6d1faa 100644 // Navigation bar cannot be translucent without status bar being translucent too dialogWindow.setSystemBarsTranslucency(navigationBarTranslucent) -+ // If enforceNavigationBarContrast is explicitly set in the modal style (Theme.Theme_FullScreenDialog), ++ // If enforceNavigationBarContrast is explicitly set in the app theme (AppTheme), + // we need to override the default behaviour for edge-to-edge mode in WindowUtils.setSystemBarsTranslucency. + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + val attrs = intArrayOf(android.R.attr.enforceNavigationBarContrast) -+ val ta = context.obtainStyledAttributes(R.style.Theme_FullScreenDialog, attrs) ++ val ta = context.obtainStyledAttributes(R.style.AppTheme, attrs) + + if (ta.length() == 1) { + val enforceNavigationBarContrastStyleValue = ta.getBoolean(0, false) From 508747ddac9f2df85335bd61f0eed0935c01f869 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 22 Aug 2025 14:24:13 +0200 Subject: [PATCH 5/5] fix: details.md patch name --- patches/react-native/details.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 3c0b3f1f942f..0f414aff44b2 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -191,7 +191,7 @@ - E/App issue: [#66925](https://github.com/Expensify/App/issues/66925) - PR introducing patch: [#66749](https://github.com/Expensify/App/pull/66749) - -### [react-native+0.79.2+028+ix-modal-transparent-navigation-bar.patch](react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch) +### [react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch](react-native+0.79.2+028+fix-modal-transparent-navigation-bar.patch) - Reason: This patch fixes an issue where it is not possible to enable a transparent navigation bar on Android - Upstream PR/issue: 🛑