From c5f5d5332ee33a12ab705dd3a942f4b3acd851ba Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Wed, 18 Jun 2025 22:26:19 +0700 Subject: [PATCH 01/11] fix: pasting from wps office crashes app --- ...+0.77.1+011+Add-onPaste-to-TextInput.patch | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/patches/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch b/patches/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch index ba4a9f1b0cbc..ae0819fb0fcc 100644 --- a/patches/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch +++ b/patches/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch @@ -302,7 +302,7 @@ index 4804624..90b7081 100644 @property (nonatomic, assign) NSInteger mostRecentEventCount; @property (nonatomic, assign, readonly) NSInteger nativeEventCount; diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm -index 95edfd5..5111bda 100644 +index 6deea73..4d82c72 100644 --- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm +++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm @@ -574,6 +574,26 @@ - (void)textInputDidChangeSelection @@ -445,7 +445,7 @@ index 0000000..bfb5819 + public void onPaste(String type, String data); +} diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -index 56a1069..9f14425 100644 +index 56a1069..1f40bfd 100644 --- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -9,6 +9,10 @@ package com.facebook.react.views.textinput; @@ -483,7 +483,7 @@ index 56a1069..9f14425 100644 mTextAttributes = new TextAttributes(); applyTextAttributes(); -@@ -332,8 +339,38 @@ public class ReactEditText extends AppCompatEditText { +@@ -332,8 +339,40 @@ public class ReactEditText extends AppCompatEditText { */ @Override public boolean onTextContextMenuItem(int id) { @@ -503,12 +503,14 @@ index 56a1069..9f14425 100644 + if (itemUri != null) { + ContentResolver cr = getReactContext(this).getContentResolver(); + type = cr.getType(itemUri); -+ data = itemUri.toString(); -+ if (mPasteWatcher != null) { -+ mPasteWatcher.onPaste(type, data); ++ if (type != null && !type.equals(ClipDescription.MIMETYPE_TEXT_PLAIN)) { ++ data = itemUri.toString(); ++ if (mPasteWatcher != null) { ++ mPasteWatcher.onPaste(type, data); ++ } ++ // Prevents default behavior to avoid inserting raw binary data into the text field ++ return true; + } -+ // Prevents default behavior to avoid inserting raw binary data into the text field -+ return true; + } + + if (clipData.getDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) { @@ -523,7 +525,7 @@ index 56a1069..9f14425 100644 } return super.onTextContextMenuItem(id); } -@@ -395,6 +432,10 @@ public class ReactEditText extends AppCompatEditText { +@@ -395,6 +434,10 @@ public class ReactEditText extends AppCompatEditText { mScrollWatcher = scrollWatcher; } From e374a33d57765b5919b909d4a568b7c1c3cffcf4 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Wed, 18 Jun 2025 22:50:52 +0700 Subject: [PATCH 02/11] tidy up react-native patches --- patches/react-native/details.md | 15 +++++++++++++++ .../react-native+0.77.1+001+initial.patch | 0 .../react-native+0.77.1+002+fixMVCPAndroid.patch | 0 ...ive+0.77.1+003+disableTextInputRecycling.patch | 0 ...eact-native+0.77.1+004+iOSFontResolution.patch | 0 ...ative+0.77.1+005+resetAutoresizingOnView.patch | 0 ....77.1+006+disableNonTranslucentStatusBar.patch | 0 .../react-native+0.77.1+007+TextInput.patch | 0 ...77.1+008+iOSCoreAnimationBorderRendering.patch | 0 ...react-native+0.77.1+009+copyStateOnClone.patch | 0 ...ative+0.77.1+010+textinput-clear-command.patch | 0 ...tive+0.77.1+011+Add-onPaste-to-TextInput.patch | 0 .../react-native+0.77.1+012+alert-style.patch | 0 ...ative+0.77.1+013+fixNavigationAnimations.patch | 0 ...act-native+0.77.1+014+fixScrollViewState.patch | 0 ...ct-native+0.77.1+015+redactAppParameters.patch | 0 ....77.1+016+android-keyboard-avoiding-view.patch | 0 ...0.77.1+017+fix-mask-persisting-recycling.patch | 0 ...+0.77.1+018+fix-text-selecting-on-change.patch | 0 ...t-native+0.77.1+019+fix-scroll-view-jump.patch | 0 ...0+fix-dropping-mutations-in-transactions.patch | 0 ...77.1+021+fix-crash-when-deleting-expense.patch | 0 ...ive+0.77.1+022+disable-suggestion-pop-up.patch | 0 ...+0.77.1+023+dont-enable-height-centering.patch | 0 ...1+024+fix-surface-stopped-before-started.patch | 0 .../react-native+0.77.1+025.patch | 0 26 files changed, 15 insertions(+) create mode 100644 patches/react-native/details.md rename patches/{ => react-native}/react-native+0.77.1+001+initial.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+002+fixMVCPAndroid.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+003+disableTextInputRecycling.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+004+iOSFontResolution.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+005+resetAutoresizingOnView.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+007+TextInput.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+009+copyStateOnClone.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+010+textinput-clear-command.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+012+alert-style.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+013+fixNavigationAnimations.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+014+fixScrollViewState.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+015+redactAppParameters.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+016+android-keyboard-avoiding-view.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+017+fix-mask-persisting-recycling.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+018+fix-text-selecting-on-change.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+019+fix-scroll-view-jump.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+022+disable-suggestion-pop-up.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+023+dont-enable-height-centering.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+024+fix-surface-stopped-before-started.patch (100%) rename patches/{ => react-native}/react-native+0.77.1+025.patch (100%) diff --git a/patches/react-native/details.md b/patches/react-native/details.md new file mode 100644 index 000000000000..d25b76aafa8f --- /dev/null +++ b/patches/react-native/details.md @@ -0,0 +1,15 @@ +# `react-native` patches + +### [react-native+0.77.1+011+Add-onPaste-to-TextInput.patch](react-native+0.77.1+011+Add-onPaste-to-TextInput.patch) + +- Reasons: + - Adds `onPaste` callback to `TextInput` to support image pasting on native + - Fixes an issue where pasted image displays as binary text on some Android devices where rich clipboard data is stored in binary form + - Fixes an issue where pasting from WPS Office app crashes the app on Android where its content URI is not recognized by Android `ContentResolver` +- Upstream PR/issue: https://github.com/facebook/react-native/pull/45425 +- Upstream RFC: https://github.com/s77rt/discussions-and-proposals/blob/TextInput-onPaste/proposals/0000-textinput-onpaste.md +- E/App issue: + - https://github.com/Expensify/App/issues/41239 + - https://github.com/Expensify/App/issues/55304 + - https://github.com/Expensify/App/issues/63191 +- PR Introducing Patch: [#47203](https://github.com/Expensify/App/pull/47203) diff --git a/patches/react-native+0.77.1+001+initial.patch b/patches/react-native/react-native+0.77.1+001+initial.patch similarity index 100% rename from patches/react-native+0.77.1+001+initial.patch rename to patches/react-native/react-native+0.77.1+001+initial.patch diff --git a/patches/react-native+0.77.1+002+fixMVCPAndroid.patch b/patches/react-native/react-native+0.77.1+002+fixMVCPAndroid.patch similarity index 100% rename from patches/react-native+0.77.1+002+fixMVCPAndroid.patch rename to patches/react-native/react-native+0.77.1+002+fixMVCPAndroid.patch diff --git a/patches/react-native+0.77.1+003+disableTextInputRecycling.patch b/patches/react-native/react-native+0.77.1+003+disableTextInputRecycling.patch similarity index 100% rename from patches/react-native+0.77.1+003+disableTextInputRecycling.patch rename to patches/react-native/react-native+0.77.1+003+disableTextInputRecycling.patch diff --git a/patches/react-native+0.77.1+004+iOSFontResolution.patch b/patches/react-native/react-native+0.77.1+004+iOSFontResolution.patch similarity index 100% rename from patches/react-native+0.77.1+004+iOSFontResolution.patch rename to patches/react-native/react-native+0.77.1+004+iOSFontResolution.patch diff --git a/patches/react-native+0.77.1+005+resetAutoresizingOnView.patch b/patches/react-native/react-native+0.77.1+005+resetAutoresizingOnView.patch similarity index 100% rename from patches/react-native+0.77.1+005+resetAutoresizingOnView.patch rename to patches/react-native/react-native+0.77.1+005+resetAutoresizingOnView.patch diff --git a/patches/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch b/patches/react-native/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch similarity index 100% rename from patches/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch rename to patches/react-native/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch diff --git a/patches/react-native+0.77.1+007+TextInput.patch b/patches/react-native/react-native+0.77.1+007+TextInput.patch similarity index 100% rename from patches/react-native+0.77.1+007+TextInput.patch rename to patches/react-native/react-native+0.77.1+007+TextInput.patch diff --git a/patches/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch b/patches/react-native/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch similarity index 100% rename from patches/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch rename to patches/react-native/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch diff --git a/patches/react-native+0.77.1+009+copyStateOnClone.patch b/patches/react-native/react-native+0.77.1+009+copyStateOnClone.patch similarity index 100% rename from patches/react-native+0.77.1+009+copyStateOnClone.patch rename to patches/react-native/react-native+0.77.1+009+copyStateOnClone.patch diff --git a/patches/react-native+0.77.1+010+textinput-clear-command.patch b/patches/react-native/react-native+0.77.1+010+textinput-clear-command.patch similarity index 100% rename from patches/react-native+0.77.1+010+textinput-clear-command.patch rename to patches/react-native/react-native+0.77.1+010+textinput-clear-command.patch diff --git a/patches/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch b/patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch similarity index 100% rename from patches/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch rename to patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch diff --git a/patches/react-native+0.77.1+012+alert-style.patch b/patches/react-native/react-native+0.77.1+012+alert-style.patch similarity index 100% rename from patches/react-native+0.77.1+012+alert-style.patch rename to patches/react-native/react-native+0.77.1+012+alert-style.patch diff --git a/patches/react-native+0.77.1+013+fixNavigationAnimations.patch b/patches/react-native/react-native+0.77.1+013+fixNavigationAnimations.patch similarity index 100% rename from patches/react-native+0.77.1+013+fixNavigationAnimations.patch rename to patches/react-native/react-native+0.77.1+013+fixNavigationAnimations.patch diff --git a/patches/react-native+0.77.1+014+fixScrollViewState.patch b/patches/react-native/react-native+0.77.1+014+fixScrollViewState.patch similarity index 100% rename from patches/react-native+0.77.1+014+fixScrollViewState.patch rename to patches/react-native/react-native+0.77.1+014+fixScrollViewState.patch diff --git a/patches/react-native+0.77.1+015+redactAppParameters.patch b/patches/react-native/react-native+0.77.1+015+redactAppParameters.patch similarity index 100% rename from patches/react-native+0.77.1+015+redactAppParameters.patch rename to patches/react-native/react-native+0.77.1+015+redactAppParameters.patch diff --git a/patches/react-native+0.77.1+016+android-keyboard-avoiding-view.patch b/patches/react-native/react-native+0.77.1+016+android-keyboard-avoiding-view.patch similarity index 100% rename from patches/react-native+0.77.1+016+android-keyboard-avoiding-view.patch rename to patches/react-native/react-native+0.77.1+016+android-keyboard-avoiding-view.patch diff --git a/patches/react-native+0.77.1+017+fix-mask-persisting-recycling.patch b/patches/react-native/react-native+0.77.1+017+fix-mask-persisting-recycling.patch similarity index 100% rename from patches/react-native+0.77.1+017+fix-mask-persisting-recycling.patch rename to patches/react-native/react-native+0.77.1+017+fix-mask-persisting-recycling.patch diff --git a/patches/react-native+0.77.1+018+fix-text-selecting-on-change.patch b/patches/react-native/react-native+0.77.1+018+fix-text-selecting-on-change.patch similarity index 100% rename from patches/react-native+0.77.1+018+fix-text-selecting-on-change.patch rename to patches/react-native/react-native+0.77.1+018+fix-text-selecting-on-change.patch diff --git a/patches/react-native+0.77.1+019+fix-scroll-view-jump.patch b/patches/react-native/react-native+0.77.1+019+fix-scroll-view-jump.patch similarity index 100% rename from patches/react-native+0.77.1+019+fix-scroll-view-jump.patch rename to patches/react-native/react-native+0.77.1+019+fix-scroll-view-jump.patch diff --git a/patches/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch b/patches/react-native/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch similarity index 100% rename from patches/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch rename to patches/react-native/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch diff --git a/patches/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch b/patches/react-native/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch similarity index 100% rename from patches/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch rename to patches/react-native/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch diff --git a/patches/react-native+0.77.1+022+disable-suggestion-pop-up.patch b/patches/react-native/react-native+0.77.1+022+disable-suggestion-pop-up.patch similarity index 100% rename from patches/react-native+0.77.1+022+disable-suggestion-pop-up.patch rename to patches/react-native/react-native+0.77.1+022+disable-suggestion-pop-up.patch diff --git a/patches/react-native+0.77.1+023+dont-enable-height-centering.patch b/patches/react-native/react-native+0.77.1+023+dont-enable-height-centering.patch similarity index 100% rename from patches/react-native+0.77.1+023+dont-enable-height-centering.patch rename to patches/react-native/react-native+0.77.1+023+dont-enable-height-centering.patch diff --git a/patches/react-native+0.77.1+024+fix-surface-stopped-before-started.patch b/patches/react-native/react-native+0.77.1+024+fix-surface-stopped-before-started.patch similarity index 100% rename from patches/react-native+0.77.1+024+fix-surface-stopped-before-started.patch rename to patches/react-native/react-native+0.77.1+024+fix-surface-stopped-before-started.patch diff --git a/patches/react-native+0.77.1+025.patch b/patches/react-native/react-native+0.77.1+025.patch similarity index 100% rename from patches/react-native+0.77.1+025.patch rename to patches/react-native/react-native+0.77.1+025.patch From 7c16a5338ea3e48b36869d4d4a9c87770a95d743 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Thu, 19 Jun 2025 00:15:42 +0700 Subject: [PATCH 03/11] fill in the remaining patches --- patches/react-native/details.md | 96 +++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/patches/react-native/details.md b/patches/react-native/details.md index d25b76aafa8f..0bb42473befd 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -1,5 +1,45 @@ # `react-native` patches +### [react-native+0.77.1+001+initial.patch](react-native+0.77.1+001+initial.patch) + +// TODO + +### [react-native+0.77.1+002+fixMVCPAndroid.patch](react-native+0.77.1+002+fixMVCPAndroid.patch) + +// TODO + +### [react-native+0.77.1+003+disableTextInputRecycling.patch](react-native+0.77.1+003+disableTextInputRecycling.patch) + +// TODO + +### [react-native+0.77.1+004+iOSFontResolution.patch](react-native+0.77.1+004+iOSFontResolution.patch) + +// TODO + +### [react-native+0.77.1+005+resetAutoresizingOnView.patch](react-native+0.77.1+005+resetAutoresizingOnView.patch) + +// TODO + +### [react-native+0.77.1+006+disableNonTranslucentStatusBar.patch](react-native+0.77.1+006+disableNonTranslucentStatusBar.patch) + +// TODO + +### [react-native+0.77.1+007+TextInput.patch](react-native+0.77.1+007+TextInput.patch) + +// TODO + +### [react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch](react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch) + +// TODO + +### [react-native+0.77.1+009+copyStateOnClone.patch](react-native+0.77.1+009+copyStateOnClone.patch) + +// TODO + +### [react-native+0.77.1+010+textinput-clear-command.patch](react-native+0.77.1+010+textinput-clear-command.patch) + +// TODO + ### [react-native+0.77.1+011+Add-onPaste-to-TextInput.patch](react-native+0.77.1+011+Add-onPaste-to-TextInput.patch) - Reasons: @@ -13,3 +53,59 @@ - https://github.com/Expensify/App/issues/55304 - https://github.com/Expensify/App/issues/63191 - PR Introducing Patch: [#47203](https://github.com/Expensify/App/pull/47203) + +### [react-native+0.77.1+012+alert-style.patch](react-native+0.77.1+012+alert-style.patch) + +// TODO + +### [react-native+0.77.1+013+fixNavigationAnimations.patch](react-native+0.77.1+013+fixNavigationAnimations.patch) + +// TODO + +### [react-native+0.77.1+014+fixScrollViewState.patch](react-native+0.77.1+014+fixScrollViewState.patch) + +// TODO + +### [react-native+0.77.1+015+redactAppParameters.patch](react-native+0.77.1+015+redactAppParameters.patch) + +// TODO + +### [react-native+0.77.1+016+android-keyboard-avoiding-view.patch](react-native+0.77.1+016+android-keyboard-avoiding-view.patch) + +// TODO + +### [react-native+0.77.1+017+fix-mask-persisting-recycling.patch](react-native+0.77.1+017+fix-mask-persisting-recycling.patch) + +// TODO + +### [react-native+0.77.1+018+fix-text-selecting-on-change.patch](react-native+0.77.1+018+fix-text-selecting-on-change.patch) + +// TODO + +### [react-native+0.77.1+019+fix-scroll-view-jump.patch](react-native+0.77.1+019+fix-scroll-view-jump.patch) + +// TODO + +### [react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch](react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch) + +// TODO + +### [react-native+0.77.1+021+fix-crash-when-deleting-expense.patch](react-native+0.77.1+021+fix-crash-when-deleting-expense.patch) + +// TODO + +### [react-native+0.77.1+022+disable-suggestion-pop-up.patch](react-native+0.77.1+022+disable-suggestion-pop-up.patch) + +// TODO + +### [react-native+0.77.1+023+dont-enable-height-centering.patch](react-native+0.77.1+023+dont-enable-height-centering.patch) + +// TODO + +### [react-native+0.77.1+024+fix-surface-stopped-before-started.patch](react-native+0.77.1+024+fix-surface-stopped-before-started.patch) + +// TODO + +### [react-native+0.77.1+025.patch](react-native+0.77.1+025.patch) + +// TODO From 300aa7529f082b9d439ba2721c97d086fc91ac26 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 24 Jun 2025 12:48:58 +0700 Subject: [PATCH 04/11] revert improper merge commit --- ...+0.79.2+011+Add-onPaste-to-TextInput.patch | 30 +- patches/react-native/details.md | 111 --- .../react-native+0.77.1+001+initial.patch | 18 - ...act-native+0.77.1+002+fixMVCPAndroid.patch | 173 ----- ...0.77.1+003+disableTextInputRecycling.patch | 16 - ...-native+0.77.1+004+iOSFontResolution.patch | 50 -- ...e+0.77.1+005+resetAutoresizingOnView.patch | 13 - ...1+006+disableNonTranslucentStatusBar.patch | 14 - .../react-native+0.77.1+007+TextInput.patch | 21 - ...+008+iOSCoreAnimationBorderRendering.patch | 23 - ...t-native+0.77.1+009+copyStateOnClone.patch | 14 - ...e+0.77.1+010+textinput-clear-command.patch | 310 -------- ...+0.77.1+011+Add-onPaste-to-TextInput.patch | 714 ------------------ .../react-native+0.77.1+012+alert-style.patch | 20 - ...e+0.77.1+013+fixNavigationAnimations.patch | 45 -- ...native+0.77.1+014+fixScrollViewState.patch | 13 - ...ative+0.77.1+015+redactAppParameters.patch | 40 - ...1+016+android-keyboard-avoiding-view.patch | 26 - ....1+017+fix-mask-persisting-recycling.patch | 12 - ...7.1+018+fix-text-selecting-on-change.patch | 35 - ...tive+0.77.1+019+fix-scroll-view-jump.patch | 18 - ...x-dropping-mutations-in-transactions.patch | 67 -- ...+021+fix-crash-when-deleting-expense.patch | 12 - ...4+fix-surface-stopped-before-started.patch | 15 - .../react-native+0.77.1+025.patch | 73 -- 25 files changed, 6 insertions(+), 1877 deletions(-) delete mode 100644 patches/react-native/details.md delete mode 100644 patches/react-native/react-native+0.77.1+001+initial.patch delete mode 100644 patches/react-native/react-native+0.77.1+002+fixMVCPAndroid.patch delete mode 100644 patches/react-native/react-native+0.77.1+003+disableTextInputRecycling.patch delete mode 100644 patches/react-native/react-native+0.77.1+004+iOSFontResolution.patch delete mode 100644 patches/react-native/react-native+0.77.1+005+resetAutoresizingOnView.patch delete mode 100644 patches/react-native/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch delete mode 100644 patches/react-native/react-native+0.77.1+007+TextInput.patch delete mode 100644 patches/react-native/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch delete mode 100644 patches/react-native/react-native+0.77.1+009+copyStateOnClone.patch delete mode 100644 patches/react-native/react-native+0.77.1+010+textinput-clear-command.patch delete mode 100644 patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch delete mode 100644 patches/react-native/react-native+0.77.1+012+alert-style.patch delete mode 100644 patches/react-native/react-native+0.77.1+013+fixNavigationAnimations.patch delete mode 100644 patches/react-native/react-native+0.77.1+014+fixScrollViewState.patch delete mode 100644 patches/react-native/react-native+0.77.1+015+redactAppParameters.patch delete mode 100644 patches/react-native/react-native+0.77.1+016+android-keyboard-avoiding-view.patch delete mode 100644 patches/react-native/react-native+0.77.1+017+fix-mask-persisting-recycling.patch delete mode 100644 patches/react-native/react-native+0.77.1+018+fix-text-selecting-on-change.patch delete mode 100644 patches/react-native/react-native+0.77.1+019+fix-scroll-view-jump.patch delete mode 100644 patches/react-native/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch delete mode 100644 patches/react-native/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch delete mode 100644 patches/react-native/react-native+0.77.1+024+fix-surface-stopped-before-started.patch delete mode 100644 patches/react-native/react-native+0.77.1+025.patch diff --git a/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch b/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch index 8c266ac2ed75..81709036316b 100644 --- a/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch +++ b/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch @@ -302,11 +302,7 @@ index 4804624..90b7081 100644 @property (nonatomic, assign) NSInteger mostRecentEventCount; @property (nonatomic, assign, readonly) NSInteger nativeEventCount; diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -index 6deea73..4d82c72 100644 -======== index 6a2d4f8..b6e6060 100644 ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch --- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm +++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm @@ -599,6 +599,26 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame) @@ -449,11 +445,7 @@ index 0000000..bfb5819 + public void onPaste(String type, String data); +} diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -index 56a1069..1f40bfd 100644 -======== index 42f2383..35bfa4d 100644 ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch --- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -9,6 +9,10 @@ package com.facebook.react.views.textinput; @@ -491,11 +483,7 @@ index 42f2383..35bfa4d 100644 mTextAttributes = new TextAttributes(); applyTextAttributes(); -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -@@ -332,8 +339,40 @@ public class ReactEditText extends AppCompatEditText { -======== @@ -335,8 +342,38 @@ public class ReactEditText extends AppCompatEditText { ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch */ @Override public boolean onTextContextMenuItem(int id) { @@ -515,14 +503,12 @@ index 42f2383..35bfa4d 100644 + if (itemUri != null) { + ContentResolver cr = getReactContext(this).getContentResolver(); + type = cr.getType(itemUri); -+ if (type != null && !type.equals(ClipDescription.MIMETYPE_TEXT_PLAIN)) { -+ data = itemUri.toString(); -+ if (mPasteWatcher != null) { -+ mPasteWatcher.onPaste(type, data); -+ } -+ // Prevents default behavior to avoid inserting raw binary data into the text field -+ return true; ++ data = itemUri.toString(); ++ if (mPasteWatcher != null) { ++ mPasteWatcher.onPaste(type, data); + } ++ // Prevents default behavior to avoid inserting raw binary data into the text field ++ return true; + } + + if (clipData.getDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) { @@ -537,11 +523,7 @@ index 42f2383..35bfa4d 100644 } return super.onTextContextMenuItem(id); } -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -@@ -395,6 +434,10 @@ public class ReactEditText extends AppCompatEditText { -======== @@ -417,6 +454,10 @@ public class ReactEditText extends AppCompatEditText { ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch mScrollWatcher = scrollWatcher; } @@ -711,4 +693,4 @@ index 33a8b3a..a3c4c0a 100644 + void onPaste(const std::string& type, const std::string& data) const; private: - void dispatchTextInputEvent( + void dispatchTextInputEvent( \ No newline at end of file diff --git a/patches/react-native/details.md b/patches/react-native/details.md deleted file mode 100644 index 0bb42473befd..000000000000 --- a/patches/react-native/details.md +++ /dev/null @@ -1,111 +0,0 @@ -# `react-native` patches - -### [react-native+0.77.1+001+initial.patch](react-native+0.77.1+001+initial.patch) - -// TODO - -### [react-native+0.77.1+002+fixMVCPAndroid.patch](react-native+0.77.1+002+fixMVCPAndroid.patch) - -// TODO - -### [react-native+0.77.1+003+disableTextInputRecycling.patch](react-native+0.77.1+003+disableTextInputRecycling.patch) - -// TODO - -### [react-native+0.77.1+004+iOSFontResolution.patch](react-native+0.77.1+004+iOSFontResolution.patch) - -// TODO - -### [react-native+0.77.1+005+resetAutoresizingOnView.patch](react-native+0.77.1+005+resetAutoresizingOnView.patch) - -// TODO - -### [react-native+0.77.1+006+disableNonTranslucentStatusBar.patch](react-native+0.77.1+006+disableNonTranslucentStatusBar.patch) - -// TODO - -### [react-native+0.77.1+007+TextInput.patch](react-native+0.77.1+007+TextInput.patch) - -// TODO - -### [react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch](react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch) - -// TODO - -### [react-native+0.77.1+009+copyStateOnClone.patch](react-native+0.77.1+009+copyStateOnClone.patch) - -// TODO - -### [react-native+0.77.1+010+textinput-clear-command.patch](react-native+0.77.1+010+textinput-clear-command.patch) - -// TODO - -### [react-native+0.77.1+011+Add-onPaste-to-TextInput.patch](react-native+0.77.1+011+Add-onPaste-to-TextInput.patch) - -- Reasons: - - Adds `onPaste` callback to `TextInput` to support image pasting on native - - Fixes an issue where pasted image displays as binary text on some Android devices where rich clipboard data is stored in binary form - - Fixes an issue where pasting from WPS Office app crashes the app on Android where its content URI is not recognized by Android `ContentResolver` -- Upstream PR/issue: https://github.com/facebook/react-native/pull/45425 -- Upstream RFC: https://github.com/s77rt/discussions-and-proposals/blob/TextInput-onPaste/proposals/0000-textinput-onpaste.md -- E/App issue: - - https://github.com/Expensify/App/issues/41239 - - https://github.com/Expensify/App/issues/55304 - - https://github.com/Expensify/App/issues/63191 -- PR Introducing Patch: [#47203](https://github.com/Expensify/App/pull/47203) - -### [react-native+0.77.1+012+alert-style.patch](react-native+0.77.1+012+alert-style.patch) - -// TODO - -### [react-native+0.77.1+013+fixNavigationAnimations.patch](react-native+0.77.1+013+fixNavigationAnimations.patch) - -// TODO - -### [react-native+0.77.1+014+fixScrollViewState.patch](react-native+0.77.1+014+fixScrollViewState.patch) - -// TODO - -### [react-native+0.77.1+015+redactAppParameters.patch](react-native+0.77.1+015+redactAppParameters.patch) - -// TODO - -### [react-native+0.77.1+016+android-keyboard-avoiding-view.patch](react-native+0.77.1+016+android-keyboard-avoiding-view.patch) - -// TODO - -### [react-native+0.77.1+017+fix-mask-persisting-recycling.patch](react-native+0.77.1+017+fix-mask-persisting-recycling.patch) - -// TODO - -### [react-native+0.77.1+018+fix-text-selecting-on-change.patch](react-native+0.77.1+018+fix-text-selecting-on-change.patch) - -// TODO - -### [react-native+0.77.1+019+fix-scroll-view-jump.patch](react-native+0.77.1+019+fix-scroll-view-jump.patch) - -// TODO - -### [react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch](react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch) - -// TODO - -### [react-native+0.77.1+021+fix-crash-when-deleting-expense.patch](react-native+0.77.1+021+fix-crash-when-deleting-expense.patch) - -// TODO - -### [react-native+0.77.1+022+disable-suggestion-pop-up.patch](react-native+0.77.1+022+disable-suggestion-pop-up.patch) - -// TODO - -### [react-native+0.77.1+023+dont-enable-height-centering.patch](react-native+0.77.1+023+dont-enable-height-centering.patch) - -// TODO - -### [react-native+0.77.1+024+fix-surface-stopped-before-started.patch](react-native+0.77.1+024+fix-surface-stopped-before-started.patch) - -// TODO - -### [react-native+0.77.1+025.patch](react-native+0.77.1+025.patch) - -// TODO diff --git a/patches/react-native/react-native+0.77.1+001+initial.patch b/patches/react-native/react-native+0.77.1+001+initial.patch deleted file mode 100644 index 1f63ad379aaf..000000000000 --- a/patches/react-native/react-native+0.77.1+001+initial.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/node_modules/react-native/React/Views/RCTModalHostViewManager.m b/node_modules/react-native/React/Views/RCTModalHostViewManager.m -index eccf05f..e2ae7e2 100644 ---- a/node_modules/react-native/React/Views/RCTModalHostViewManager.m -+++ b/node_modules/react-native/React/Views/RCTModalHostViewManager.m -@@ -64,6 +64,13 @@ - (void)presentModalHostView:(RCTModalHostView *)modalHostView - if (self->_presentationBlock) { - self->_presentationBlock([modalHostView reactViewController], viewController, animated, completionBlock); - } else { -+ // In our App, If an input is blurred and a modal is opened, the rootView will become the firstResponder, which -+ // will cause system to retain a wrong keyboard state, and then the keyboard to flicker when the modal is closed. -+ // We first resign the rootView to avoid this problem. -+ UIWindow *window = RCTKeyWindow(); -+ if (window && window.rootViewController && [window.rootViewController.view isFirstResponder]) { -+ [window.rootViewController.view resignFirstResponder]; -+ } - [[modalHostView reactViewController] presentViewController:viewController - animated:animated - completion:completionBlock]; diff --git a/patches/react-native/react-native+0.77.1+002+fixMVCPAndroid.patch b/patches/react-native/react-native+0.77.1+002+fixMVCPAndroid.patch deleted file mode 100644 index 287bb86cb78b..000000000000 --- a/patches/react-native/react-native+0.77.1+002+fixMVCPAndroid.patch +++ /dev/null @@ -1,173 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java -index 26c9aeb..b2cff8b 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java -@@ -86,6 +86,7 @@ class MaintainVisibleScrollPositionHelper currentScroll || i == contentView.getChildCount() - 1) { -- mFirstVisibleView = new WeakReference<>(child); -- Rect frame = new Rect(); -- child.getHitRect(frame); -- mPrevFirstVisibleFrame = frame; -- break; -+ if ((position > currentScroll && position < firstVisibleViewPosition) || -+ (firstVisibleView == null && i == contentView.getChildCount() - 1)) { -+ firstVisibleView = child; -+ firstVisibleViewPosition = position; -+ } -+ } -+ mFirstVisibleView = new WeakReference<>(firstVisibleView); -+ } -+ -+ private View getFirstVisibleView() { -+ return mFirstVisibleView != null ? mFirstVisibleView.get() : null; -+ } -+ -+ private void willMountItemsInternal() { -+ View firstVisibleView = getFirstVisibleView(); -+ -+ // If we don't have a first visible view because no scroll happened call onScroll -+ // to update it. -+ if (firstVisibleView == null) { -+ onScroll(); -+ firstVisibleView = getFirstVisibleView(); -+ -+ // There are cases where it is possible for this to still be null so just bail out. -+ if (firstVisibleView == null) { -+ return; - } - } -+ Rect frame = new Rect(); -+ firstVisibleView.getHitRect(frame); -+ mPrevFirstVisibleFrame = frame; - } - - // UIManagerListener -@@ -186,19 +214,19 @@ class MaintainVisibleScrollPositionHelper(); diff --git a/patches/react-native/react-native+0.77.1+004+iOSFontResolution.patch b/patches/react-native/react-native+0.77.1+004+iOSFontResolution.patch deleted file mode 100644 index 20296b89b40b..000000000000 --- a/patches/react-native/react-native+0.77.1+004+iOSFontResolution.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm -index 39093ef..36cb558 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm -+++ b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm -@@ -38,9 +38,6 @@ static RCTFontProperties RCTResolveFontProperties( - { - fontProperties.family = fontProperties.family.length ? fontProperties.family : baseFontProperties.family; - fontProperties.size = !isnan(fontProperties.size) ? fontProperties.size : baseFontProperties.size; -- fontProperties.weight = !isnan(fontProperties.weight) ? fontProperties.weight : baseFontProperties.weight; -- fontProperties.style = -- fontProperties.style != RCTFontStyleUndefined ? fontProperties.style : baseFontProperties.style; - fontProperties.variant = - fontProperties.variant != RCTFontVariantUndefined ? fontProperties.variant : baseFontProperties.variant; - return fontProperties; -@@ -319,10 +316,14 @@ UIFont *RCTFontWithFontProperties(RCTFontProperties fontProperties) - } else if ([fontProperties.family isEqualToString:defaultFontProperties.family]) { - // Handle system font as special case. This ensures that we preserve - // the specific metrics of the standard system font as closely as possible. -+ fontProperties.weight = !isnan(fontProperties.weight) ? fontProperties.weight : defaultFontProperties.weight; -+ fontProperties.style = -+ fontProperties.style != RCTFontStyleUndefined ? fontProperties.style : defaultFontProperties.style; - font = RCTDefaultFontWithFontProperties(fontProperties); - } else { - NSArray *fontNames = [UIFont fontNamesForFamilyName:fontProperties.family]; - UIFontWeight fontWeight = fontProperties.weight; -+ RCTFontStyle fontStyle = fontProperties.style; - - if (fontNames.count == 0) { - // Gracefully handle being given a font name rather than font family, for -@@ -335,15 +336,18 @@ UIFont *RCTFontWithFontProperties(RCTFontProperties fontProperties) - // Failback to system font. - font = [UIFont systemFontOfSize:effectiveFontSize weight:fontProperties.weight]; - } -+ fontNames = [UIFont fontNamesForFamilyName:font.familyName]; -+ fontWeight = isnan(fontWeight) ? RCTGetFontWeight(font) : fontWeight; -+ fontStyle = fontStyle == RCTFontStyleUndefined ? RCTGetFontStyle(font) : fontStyle; - } - -- if (fontNames.count > 0) { -+ if (fontNames.count != 0) { - // Get the closest font that matches the given weight for the fontFamily - CGFloat closestWeight = INFINITY; - for (NSString *name in fontNames) { - UIFont *fontMatch = [UIFont fontWithName:name size:effectiveFontSize]; - -- if (RCTGetFontStyle(fontMatch) != fontProperties.style) { -+ if (RCTGetFontStyle(fontMatch) != fontStyle) { - continue; - } - diff --git a/patches/react-native/react-native+0.77.1+005+resetAutoresizingOnView.patch b/patches/react-native/react-native+0.77.1+005+resetAutoresizingOnView.patch deleted file mode 100644 index 655c67accc0e..000000000000 --- a/patches/react-native/react-native+0.77.1+005+resetAutoresizingOnView.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm -index bcebeda..4916cc0 100644 ---- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm -+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm -@@ -574,6 +574,8 @@ - (void)prepareForRecycle - self.layer.opacity = (float)props.opacity; - } - -+ self.autoresizingMask = UIViewAutoresizingNone; -+ - _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN = nil; - _eventEmitter.reset(); - _isJSResponder = NO; diff --git a/patches/react-native/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch b/patches/react-native/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch deleted file mode 100644 index fedfe544f353..000000000000 --- a/patches/react-native/react-native+0.77.1+006+disableNonTranslucentStatusBar.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/node_modules/react-native/Libraries/Components/StatusBar/StatusBar.js b/node_modules/react-native/Libraries/Components/StatusBar/StatusBar.js -index 2ac3d1f..5a400bf 100644 ---- a/node_modules/react-native/Libraries/Components/StatusBar/StatusBar.js -+++ b/node_modules/react-native/Libraries/Components/StatusBar/StatusBar.js -@@ -479,8 +479,7 @@ class StatusBar extends React.Component { - } - // Activities are not translucent by default, so always set if true. - if ( -- !oldProps || -- oldProps.translucent !== mergedProps.translucent || -+ (oldProps && oldProps.translucent !== mergedProps.translucent) || - mergedProps.translucent - ) { - NativeStatusBarManagerAndroid.setTranslucent(mergedProps.translucent); diff --git a/patches/react-native/react-native+0.77.1+007+TextInput.patch b/patches/react-native/react-native+0.77.1+007+TextInput.patch deleted file mode 100644 index 4b26e70fe4de..000000000000 --- a/patches/react-native/react-native+0.77.1+007+TextInput.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/node_modules/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp b/node_modules/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp -index d0b2b5b..6dea7a0 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp -+++ b/node_modules/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp -@@ -31,16 +31,6 @@ Size AndroidTextInputShadowNode::measureContent( - const LayoutConstraints& layoutConstraints) const { - auto textConstraints = getTextConstraints(layoutConstraints); - -- if (getStateData().cachedAttributedStringId != 0) { -- auto textSize = textLayoutManager_ -- ->measureCachedSpannableById( -- getStateData().cachedAttributedStringId, -- getConcreteProps().paragraphAttributes, -- textConstraints) -- .size; -- return layoutConstraints.clamp(textSize); -- } -- - // Layout is called right after measure. - // Measure is marked as `const`, and `layout` is not; so State can be - // updated during layout, but not during `measure`. If State is out-of-date diff --git a/patches/react-native/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch b/patches/react-native/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch deleted file mode 100644 index 478e282e387d..000000000000 --- a/patches/react-native/react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/node_modules/react-native/React/Fabric/Mounting/RCTMountingManager.mm b/node_modules/react-native/React/Fabric/Mounting/RCTMountingManager.mm -index b4cfb3d..fdfae56 100644 ---- a/node_modules/react-native/React/Fabric/Mounting/RCTMountingManager.mm -+++ b/node_modules/react-native/React/Fabric/Mounting/RCTMountingManager.mm -@@ -265,6 +265,9 @@ static void RCTPerformMountInstructions( - - auto surfaceId = mountingCoordinator.getSurfaceId(); - -+ [CATransaction begin]; -+ [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; -+ - mountingCoordinator.getTelemetryController().pullTransaction( - [&](const MountingTransaction &transaction, const SurfaceTelemetry &surfaceTelemetry) { - [self.delegate mountingManager:self willMountComponentsWithRootTag:surfaceId]; -@@ -278,6 +281,8 @@ static void RCTPerformMountInstructions( - _observerCoordinator.notifyObserversMountingTransactionDidMount(transaction, surfaceTelemetry); - [self.delegate mountingManager:self didMountComponentsWithRootTag:surfaceId]; - }); -+ -+ [CATransaction commit]; - } - - - (void)setIsJSResponder:(BOOL)isJSResponder diff --git a/patches/react-native/react-native+0.77.1+009+copyStateOnClone.patch b/patches/react-native/react-native+0.77.1+009+copyStateOnClone.patch deleted file mode 100644 index 854bc2b7baf7..000000000000 --- a/patches/react-native/react-native+0.77.1+009+copyStateOnClone.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/node_modules/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp b/node_modules/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp -index a9ca4d7..69e335f 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp -+++ b/node_modules/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp -@@ -363,7 +363,8 @@ ShadowNode::Unshared ShadowNode::cloneTree( - children[childIndex] = childNode; - - childNode = parentNode.clone( -- {.children = std::make_shared(children)}); -+ {.children = std::make_shared(children), -+ .state = parentNode.getState()}); - } - - return std::const_pointer_cast(childNode); diff --git a/patches/react-native/react-native+0.77.1+010+textinput-clear-command.patch b/patches/react-native/react-native+0.77.1+010+textinput-clear-command.patch deleted file mode 100644 index 181eb3d09446..000000000000 --- a/patches/react-native/react-native+0.77.1+010+textinput-clear-command.patch +++ /dev/null @@ -1,310 +0,0 @@ -diff --git a/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js b/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js -index 566ac15..08419c5 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js -+++ b/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js -@@ -410,6 +410,13 @@ export type NativeProps = $ReadOnly<{ - $ReadOnly<{target: Int32, text: string}>, - >, - -+ /** -+ * Invoked when the user performs the clear action. -+ */ -+ onClear?: ?BubblingEventHandler< -+ $ReadOnly<{target: Int32, eventCount: Int32, text: string}>, -+ >, -+ - /** - * Callback that is called when a key is pressed. - * This will be called with `{ nativeEvent: { key: keyValue } }` -@@ -653,6 +660,9 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = { - }, - }, - directEventTypes: { -+ topClear: { -+ registrationName: 'onClear', -+ }, - topScroll: { - registrationName: 'onScroll', - }, -@@ -691,6 +701,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = { - textTransform: true, - returnKeyType: true, - keyboardType: true, -+ onClear: true, - multiline: true, - color: {process: require('../../StyleSheet/processColor').default}, - autoComplete: true, -diff --git a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js -index fe5c491..c9f4eb2 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js -+++ b/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js -@@ -85,6 +85,9 @@ const RCTTextInputViewConfig = { - topContentSizeChange: { - registrationName: 'onContentSizeChange', - }, -+ topClear: { -+ registrationName: 'onClear', -+ }, - topChangeSync: { - registrationName: 'onChangeSync', - }, -@@ -158,6 +161,7 @@ const RCTTextInputViewConfig = { - lineBreakModeIOS: true, - smartInsertDelete: true, - ...ConditionallyIgnoredEventHandlers({ -+ onClear: true, - onChange: true, - onSelectionChange: true, - onContentSizeChange: true, -diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts b/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts -index 897824e..13a73e7 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts -+++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts -@@ -767,6 +767,13 @@ export interface TextInputProps - | ((e: NativeSyntheticEvent) => void) - | undefined; - -+ /** -+ * Callback that is called when the text input was cleared using the native clear command. -+ */ -+ onClear?: -+ | ((e: NativeSyntheticEvent) => void) -+ | undefined; -+ - /** - * Callback that is called when the text input's text changes. - */ -diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js -index a2f2081..6947909 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js -+++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js -@@ -1456,6 +1456,11 @@ function InternalTextInput(props: TextInputProps): React.Node { - }); - }; - -+ const _onClear = (event: ChangeEvent) => { -+ setMostRecentEventCount(event.nativeEvent.eventCount); -+ props.onClear && props.onClear(event); -+ }; -+ - const _onFocus = (event: TextInputFocusEvent) => { - TextInputState.focusInput(inputRef.current); - if (props.onFocus) { -@@ -1622,6 +1627,7 @@ function InternalTextInput(props: TextInputProps): React.Node { - nativeID={id ?? props.nativeID} - numberOfLines={props.rows ?? props.numberOfLines} - onBlur={_onBlur} -+ onClear={_onClear} - onChange={_onChange} - onContentSizeChange={props.onContentSizeChange} - onFocus={_onFocus} -@@ -1688,6 +1694,7 @@ function InternalTextInput(props: TextInputProps): React.Node { - nativeID={id ?? props.nativeID} - numberOfLines={props.rows ?? props.numberOfLines} - onBlur={_onBlur} -+ onClear={_onClear} - onChange={_onChange} - onFocus={_onFocus} - /* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match -diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm -index dd39699..93f8129 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm -+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm -@@ -63,6 +63,7 @@ RCT_EXPORT_VIEW_PROPERTY(passwordRules, NSString) - - RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock) - RCT_EXPORT_VIEW_PROPERTY(onKeyPressSync, RCTDirectEventBlock) -+RCT_EXPORT_VIEW_PROPERTY(onClear, RCTDirectEventBlock) - RCT_EXPORT_VIEW_PROPERTY(onChangeSync, RCTDirectEventBlock) - RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock) - RCT_EXPORT_VIEW_PROPERTY(onScroll, RCTDirectEventBlock) -diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm -index ca50289..f587ae2 100644 ---- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm -+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm -@@ -528,6 +528,19 @@ static NSSet *returnKeyTypesSet; - [_backedTextInputView resignFirstResponder]; - } - -+- (void)clear -+{ -+ auto metrics = [self _textInputMetrics]; -+ [self setTextAndSelection:_mostRecentEventCount value:@"" start:0 end:0]; -+ -+ _mostRecentEventCount++; -+ metrics.eventCount = _mostRecentEventCount; -+ -+ // Notify JS that the event counter has changed -+ const auto &textInputEventEmitter = static_cast(*_eventEmitter); -+ textInputEventEmitter.onClear(metrics); -+} -+ - - (void)setTextAndSelection:(NSInteger)eventCount - value:(NSString *__nullable)value - start:(NSInteger)start -diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h -index fe3376a..f674d98 100644 ---- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h -+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h -@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN - @protocol RCTTextInputViewProtocol - - (void)focus; - - (void)blur; -+- (void)clear; - - (void)setTextAndSelection:(NSInteger)eventCount - value:(NSString *__nullable)value - start:(NSInteger)start -@@ -48,6 +49,18 @@ RCTTextInputHandleCommand(id componentView, const NSSt - [componentView blur]; - return; - } -+ if ([commandName isEqualToString:@"clear"]) { -+#if RCT_DEBUG -+ if ([args count] != 0) { -+ RCTLogError( -+ @"%@ command %@ received %d arguments, expected %d.", @"TextInput", commandName, (int)[args count], 0); -+ return; -+ } -+#endif -+ -+ [componentView clear]; -+ return; -+ } - - if ([commandName isEqualToString:@"setTextAndSelection"]) { - #if RCT_DEBUG -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextClearEvent.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextClearEvent.java -new file mode 100644 -index 0000000..0c142a0 ---- /dev/null -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextClearEvent.java -@@ -0,0 +1,53 @@ -+/* -+ * Copyright (c) Meta Platforms, Inc. and affiliates. -+ * -+ * This source code is licensed under the MIT license found in the -+ * LICENSE file in the root directory of this source tree. -+ */ -+ -+package com.facebook.react.views.textinput; -+ -+import androidx.annotation.Nullable; -+ -+import com.facebook.react.bridge.Arguments; -+import com.facebook.react.bridge.WritableMap; -+import com.facebook.react.uimanager.common.ViewUtil; -+import com.facebook.react.uimanager.events.Event; -+ -+/** -+ * Event emitted by EditText native view when text changes. VisibleForTesting from {@link -+ * TextInputEventsTestCase}. -+ */ -+public class ReactTextClearEvent extends Event { -+ -+ public static final String EVENT_NAME = "topClear"; -+ -+ private String mText; -+ private int mEventCount; -+ -+ @Deprecated -+ public ReactTextClearEvent(int viewId, String text, int eventCount) { -+ this(ViewUtil.NO_SURFACE_ID, viewId, text, eventCount); -+ } -+ -+ public ReactTextClearEvent(int surfaceId, int viewId, String text, int eventCount) { -+ super(surfaceId, viewId); -+ mText = text; -+ mEventCount = eventCount; -+ } -+ -+ @Override -+ public String getEventName() { -+ return EVENT_NAME; -+ } -+ -+ @Nullable -+ @Override -+ protected WritableMap getEventData() { -+ WritableMap eventData = Arguments.createMap(); -+ eventData.putString("text", mText); -+ eventData.putInt("eventCount", mEventCount); -+ eventData.putInt("target", getViewTag()); -+ return eventData; -+ } -+} -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java -index f18e569..2733e3c 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java -@@ -8,6 +8,7 @@ - package com.facebook.react.views.textinput; - - import static com.facebook.react.uimanager.UIManagerHelper.getReactContext; -+import static com.facebook.react.uimanager.UIManagerHelper.getSurfaceId; - - import android.content.Context; - import android.content.res.ColorStateList; -@@ -266,6 +267,9 @@ public class ReactTextInputManager extends BaseViewManager, - >, - -+ /** -+ * Invoked when the user performs the paste action. -+ */ -+ onPaste?: ?DirectEventHandler< -+ $ReadOnly<{ -+ target: Int32, -+ items: $ReadOnlyArray< -+ $ReadOnly<{ -+ type: string, -+ data: string, -+ }>, -+ >, -+ }>, -+ >, -+ - /** - * The string that will be rendered before text input has been entered. - */ -@@ -666,6 +681,9 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = { - topScroll: { - registrationName: 'onScroll', - }, -+ topPaste: { -+ registrationName: 'onPaste', -+ }, - }, - validAttributes: { - maxFontSizeMultiplier: true, -@@ -720,6 +738,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = { - secureTextEntry: true, - textBreakStrategy: true, - onScroll: true, -+ onPaste: true, - onContentSizeChange: true, - disableFullscreenUI: true, - includeFontPadding: true, -diff --git a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js -index c9f4eb2..94b7d31 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js -+++ b/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js -@@ -88,6 +88,9 @@ const RCTTextInputViewConfig = { - topClear: { - registrationName: 'onClear', - }, -+ topPaste: { -+ registrationName: 'onPaste', -+ }, - topChangeSync: { - registrationName: 'onChangeSync', - }, -@@ -166,6 +169,7 @@ const RCTTextInputViewConfig = { - onSelectionChange: true, - onContentSizeChange: true, - onScroll: true, -+ onPaste: true, - onChangeSync: true, - onKeyPressSync: true, - }), -diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts b/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts -index 13a73e7..2112772 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts -+++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.d.ts -@@ -515,6 +515,16 @@ export interface TextInputSubmitEditingEventData { - text: string; - } - -+/** -+ * @see TextInputProps.onPaste -+ */ -+export interface TextInputPasteEventData extends TargetedEvent { -+ items: Array<{ -+ type: string; -+ data: string; -+ }>; -+} -+ - /** - * @see https://reactnative.dev/docs/textinput#props - */ -@@ -866,6 +876,13 @@ export interface TextInputProps - | ((e: NativeSyntheticEvent) => void) - | undefined; - -+ /** -+ * Invoked when the user performs the paste action. -+ */ -+ onPaste?: -+ | ((e: NativeSyntheticEvent) => void) -+ | undefined; -+ - /** - * The string that will be rendered before text input has been entered - */ -diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.flow.js b/node_modules/react-native/Libraries/Components/TextInput/TextInput.flow.js -index 53d6337..50f7794 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.flow.js -+++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.flow.js -@@ -97,6 +97,18 @@ export type TextInputEndEditingEventData = $ReadOnly<{ - export type TextInputEditingEvent = - NativeSyntheticEvent; - -+export type PasteEvent = SyntheticEvent< -+ $ReadOnly<{ -+ target: number, -+ items: $ReadOnlyArray< -+ $ReadOnly<{ -+ type: string, -+ data: string, -+ }>, -+ >, -+ }>, -+>; -+ - type DataDetectorTypesType = - | 'phoneNumber' - | 'link' -@@ -849,6 +861,11 @@ export type TextInputProps = $ReadOnly<{ - */ - onScroll?: ?(e: ScrollEvent) => mixed, - -+ /** -+ * Invoked when the user performs the paste action. -+ */ -+ onPaste?: ?(e: PasteEvent) => mixed, -+ - /** - * The string that will be rendered before text input has been entered. - */ -diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js -index 6947909..1fb07fb 100644 ---- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js -+++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js -@@ -132,6 +132,18 @@ export type TextInputEndEditingEventData = $ReadOnly<{ - export type TextInputEditingEvent = - NativeSyntheticEvent; - -+export type PasteEvent = SyntheticEvent< -+ $ReadOnly<{ -+ target: number, -+ items: $ReadOnlyArray< -+ $ReadOnly<{ -+ type: string, -+ data: string, -+ }>, -+ >, -+ }>, -+>; -+ - type DataDetectorTypesType = - | 'phoneNumber' - | 'link' -@@ -843,6 +855,11 @@ export type TextInputProps = $ReadOnly<{ - */ - onScroll?: ?(e: ScrollEvent) => mixed, - -+ /** -+ * Invoked when the user performs the paste action. -+ */ -+ onPaste?: ?(e: PasteEvent) => mixed, -+ - /** - * The string that will be rendered before text input has been entered. - */ -diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm -index 565b0f6..f6670fd 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm -+++ b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm -@@ -13,6 +13,10 @@ - #import - #import - -+#import -+#import -+#import -+ - @implementation RCTUITextView { - UILabel *_placeholderView; - UITextView *_detachedTextView; -@@ -198,7 +202,31 @@ static UIColor *defaultPlaceholderColor(void) - - (void)paste:(id)sender - { - _textWasPasted = YES; -- [super paste:sender]; -+ UIPasteboard *clipboard = [UIPasteboard generalPasteboard]; -+ if (clipboard.hasImages) { -+ for (NSItemProvider *itemProvider in clipboard.itemProviders) { -+ if ([itemProvider hasItemConformingToTypeIdentifier:(NSString *)kUTTypeImage]) { -+ for (NSString *identifier in itemProvider.registeredTypeIdentifiers) { -+ if (UTTypeConformsTo((__bridge CFStringRef)identifier, kUTTypeImage)) { -+ NSString *MIMEType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)identifier, kUTTagClassMIMEType); -+ NSString *fileExtension = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)identifier, kUTTagClassFilenameExtension); -+ NSString *filePath = RCTTempFilePath(fileExtension, nil); -+ NSURL *fileURL = [NSURL fileURLWithPath:filePath]; -+ NSData *fileData = [clipboard dataForPasteboardType:identifier]; -+ [fileData writeToFile:filePath atomically:YES]; -+ [_textInputDelegateAdapter didPaste:MIMEType withData:[fileURL absoluteString]]; -+ break; -+ } -+ } -+ break; -+ } -+ } -+ } else { -+ if (clipboard.hasStrings) { -+ [_textInputDelegateAdapter didPaste:@"text/plain" withData:clipboard.string]; -+ } -+ [super paste:sender]; -+ } - } - - // Turn off scroll animation to fix flaky scrolling. -@@ -290,6 +318,10 @@ static UIColor *defaultPlaceholderColor(void) - return NO; - } - -+ if (action == @selector(paste:) && [UIPasteboard generalPasteboard].hasImages) { -+ return YES; -+ } -+ - return [super canPerformAction:action withSender:sender]; - } - -diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h -index 7187177..da00893 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h -+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h -@@ -37,6 +37,8 @@ NS_ASSUME_NONNULL_BEGIN - - - (void)textInputDidChangeSelection; - -+- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data; -+ - @optional - - - (void)scrollViewDidScroll:(UIScrollView *)scrollView; -diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h -index f1c32e6..0ce9dfe 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h -+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h -@@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN - - - (void)skipNextTextInputDidChangeSelectionEventWithTextRange:(UITextRange *)textRange; - - (void)selectedTextRangeWasSet; -+- (void)didPaste:(NSString *)type withData:(NSString *)data; - - @end - -@@ -30,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN - - (instancetype)initWithTextView:(UITextView *)backedTextInputView; - - - (void)skipNextTextInputDidChangeSelectionEventWithTextRange:(UITextRange *)textRange; -+- (void)didPaste:(NSString *)type withData:(NSString *)data; - - @end - -diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm -index ac8e464..2b91802 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm -+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm -@@ -147,6 +147,11 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo - [self textFieldProbablyDidChangeSelection]; - } - -+- (void)didPaste:(NSString *)type withData:(NSString *)data -+{ -+ [_backedTextInputView.textInputDelegate textInputDidPaste:type withData:data]; -+} -+ - #pragma mark - Generalization - - - (void)textFieldProbablyDidChangeSelection -@@ -292,6 +297,11 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo - _previousSelectedTextRange = textRange; - } - -+- (void)didPaste:(NSString *)type withData:(NSString *)data -+{ -+ [_backedTextInputView.textInputDelegate textInputDidPaste:type withData:data]; -+} -+ - #pragma mark - Generalization - - - (void)textViewProbablyDidChangeSelection -diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.h b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.h -index 4804624..90b7081 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.h -+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.h -@@ -37,6 +37,7 @@ NS_ASSUME_NONNULL_BEGIN - @property (nonatomic, copy, nullable) RCTDirectEventBlock onChange; - @property (nonatomic, copy, nullable) RCTDirectEventBlock onChangeSync; - @property (nonatomic, copy, nullable) RCTDirectEventBlock onScroll; -+@property (nonatomic, copy, nullable) RCTDirectEventBlock onPaste; - - @property (nonatomic, assign) NSInteger mostRecentEventCount; - @property (nonatomic, assign, readonly) NSInteger nativeEventCount; -diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -index 6deea73..4d82c72 100644 -======== -index 6a2d4f8..b6e6060 100644 ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch ---- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm -+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm -@@ -599,6 +599,26 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame) - }); - } - -+- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data -+{ -+ if (!_onPaste) { -+ return; -+ } -+ -+ NSMutableArray *items = [NSMutableArray new]; -+ [items addObject:@{ -+ @"type" : type, -+ @"data" : data, -+ }]; -+ -+ NSDictionary *payload = @{ -+ @"target" : self.reactTag, -+ @"items" : items, -+ }; -+ -+ _onPaste(payload); -+} -+ - - (void)updateLocalData - { - [self enforceTextAttributesIfNeeded]; -diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm -index 93f8129..4b43542 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm -+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm -@@ -67,6 +67,7 @@ RCT_EXPORT_VIEW_PROPERTY(onClear, RCTDirectEventBlock) - RCT_EXPORT_VIEW_PROPERTY(onChangeSync, RCTDirectEventBlock) - RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock) - RCT_EXPORT_VIEW_PROPERTY(onScroll, RCTDirectEventBlock) -+RCT_EXPORT_VIEW_PROPERTY(onPaste, RCTDirectEventBlock) - - RCT_EXPORT_VIEW_PROPERTY(mostRecentEventCount, NSInteger) - -diff --git a/node_modules/react-native/Libraries/Text/TextInput/Singleline/RCTUITextField.mm b/node_modules/react-native/Libraries/Text/TextInput/Singleline/RCTUITextField.mm -index d1bcd88..7e76c88 100644 ---- a/node_modules/react-native/Libraries/Text/TextInput/Singleline/RCTUITextField.mm -+++ b/node_modules/react-native/Libraries/Text/TextInput/Singleline/RCTUITextField.mm -@@ -12,6 +12,10 @@ - #import - #import - -+#import -+#import -+#import -+ - @implementation RCTUITextField { - RCTBackedTextFieldDelegateAdapter *_textInputDelegateAdapter; - NSDictionary *_defaultTextAttributes; -@@ -169,6 +173,10 @@ - return NO; - } - -+ if (action == @selector(paste:) && [UIPasteboard generalPasteboard].hasImages) { -+ return YES; -+ } -+ - return [super canPerformAction:action withSender:sender]; - } - -@@ -252,7 +260,31 @@ - - (void)paste:(id)sender - { - _textWasPasted = YES; -- [super paste:sender]; -+ UIPasteboard *clipboard = [UIPasteboard generalPasteboard]; -+ if (clipboard.hasImages) { -+ for (NSItemProvider *itemProvider in clipboard.itemProviders) { -+ if ([itemProvider hasItemConformingToTypeIdentifier:(NSString *)kUTTypeImage]) { -+ for (NSString *identifier in itemProvider.registeredTypeIdentifiers) { -+ if (UTTypeConformsTo((__bridge CFStringRef)identifier, kUTTypeImage)) { -+ NSString *MIMEType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)identifier, kUTTagClassMIMEType); -+ NSString *fileExtension = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)identifier, kUTTagClassFilenameExtension); -+ NSString *filePath = RCTTempFilePath(fileExtension, nil); -+ NSURL *fileURL = [NSURL fileURLWithPath:filePath]; -+ NSData *fileData = [clipboard dataForPasteboardType:identifier]; -+ [fileData writeToFile:filePath atomically:YES]; -+ [_textInputDelegateAdapter didPaste:MIMEType withData:[fileURL absoluteString]]; -+ break; -+ } -+ } -+ break; -+ } -+ } -+ } else { -+ if (clipboard.hasStrings) { -+ [_textInputDelegateAdapter didPaste:@"text/plain" withData:clipboard.string]; -+ } -+ [super paste:sender]; -+ } - } - - #pragma mark - Layout -diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm -index f587ae2..151ac38 100644 ---- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm -+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm -@@ -488,6 +488,13 @@ static NSSet *returnKeyTypesSet; - } - } - -+- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data -+{ -+ if (_eventEmitter) { -+ static_cast(*_eventEmitter).onPaste(std::string([type UTF8String]), std::string([data UTF8String])); -+ } -+} -+ - #pragma mark - RCTBackedTextInputDelegate (UIScrollViewDelegate) - - - (void)scrollViewDidScroll:(UIScrollView *)scrollView -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/PasteWatcher.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/PasteWatcher.java -new file mode 100644 -index 0000000..bfb5819 ---- /dev/null -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/PasteWatcher.java -@@ -0,0 +1,17 @@ -+/* -+ * Copyright (c) Meta Platforms, Inc. and affiliates. -+ * -+ * This source code is licensed under the MIT license found in the -+ * LICENSE file in the root directory of this source tree. -+ */ -+ -+package com.facebook.react.views.textinput; -+ -+/** -+ * Implement this interface to be informed of paste event in the -+ * ReactTextEdit This is used by the ReactTextInputManager to forward events -+ * from the EditText to JS -+ */ -+interface PasteWatcher { -+ public void onPaste(String type, String data); -+} -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -index 56a1069..1f40bfd 100644 -======== -index 42f2383..35bfa4d 100644 ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -@@ -9,6 +9,10 @@ package com.facebook.react.views.textinput; - - import static com.facebook.react.uimanager.UIManagerHelper.getReactContext; - -+import android.content.ClipboardManager; -+import android.content.ClipData; -+import android.content.ClipDescription; -+import android.content.ContentResolver; - import android.content.Context; - import android.graphics.Canvas; - import android.graphics.Color; -@@ -16,6 +20,7 @@ import android.graphics.Paint; - import android.graphics.Rect; - import android.graphics.Typeface; - import android.graphics.drawable.Drawable; -+import android.net.Uri; - import android.os.Build; - import android.os.Bundle; - import android.text.Editable; -@@ -121,6 +126,7 @@ public class ReactEditText extends AppCompatEditText { - private @Nullable SelectionWatcher mSelectionWatcher; - private @Nullable ContentSizeWatcher mContentSizeWatcher; - private @Nullable ScrollWatcher mScrollWatcher; -+ private @Nullable PasteWatcher mPasteWatcher; - private InternalKeyListener mKeyListener; - private boolean mDetectScrollMovement = false; - private boolean mOnKeyPress = false; -@@ -166,6 +172,7 @@ public class ReactEditText extends AppCompatEditText { - mKeyListener = new InternalKeyListener(); - } - mScrollWatcher = null; -+ mPasteWatcher = null; - mTextAttributes = new TextAttributes(); - - applyTextAttributes(); -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -@@ -332,8 +339,40 @@ public class ReactEditText extends AppCompatEditText { -======== -@@ -335,8 +342,38 @@ public class ReactEditText extends AppCompatEditText { ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch - */ - @Override - public boolean onTextContextMenuItem(int id) { -- if (id == android.R.id.paste) { -+ if (id == android.R.id.paste || id == android.R.id.pasteAsPlainText) { - id = android.R.id.pasteAsPlainText; -+ -+ ClipboardManager clipboardManager = -+ (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE); -+ ClipData clipData = clipboardManager.getPrimaryClip(); -+ if (clipData != null) { -+ ClipData.Item item = clipData.getItemAt(0); -+ Uri itemUri = item.getUri(); -+ String type = null; -+ String data = null; -+ -+ if (itemUri != null) { -+ ContentResolver cr = getReactContext(this).getContentResolver(); -+ type = cr.getType(itemUri); -+ if (type != null && !type.equals(ClipDescription.MIMETYPE_TEXT_PLAIN)) { -+ data = itemUri.toString(); -+ if (mPasteWatcher != null) { -+ mPasteWatcher.onPaste(type, data); -+ } -+ // Prevents default behavior to avoid inserting raw binary data into the text field -+ return true; -+ } -+ } -+ -+ if (clipData.getDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) { -+ type = ClipDescription.MIMETYPE_TEXT_PLAIN; -+ data = item.getText().toString(); -+ if (mPasteWatcher != null) { -+ mPasteWatcher.onPaste(type, data); -+ } -+ // Don't return - let the system proceed with default text pasting behavior -+ } -+ } - } - return super.onTextContextMenuItem(id); - } -<<<<<<<< HEAD:patches/react-native/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch -@@ -395,6 +434,10 @@ public class ReactEditText extends AppCompatEditText { -======== -@@ -417,6 +454,10 @@ public class ReactEditText extends AppCompatEditText { ->>>>>>>> cad7e67ed9e5276f32ec9c1651bce8b635aa7e35:patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch - mScrollWatcher = scrollWatcher; - } - -+ public void setPasteWatcher(@Nullable PasteWatcher pasteWatcher) { -+ mPasteWatcher = pasteWatcher; -+ } -+ - /** - * Attempt to set a selection or fail silently. Intentionally meant to handle bad inputs. - * EventCounter is the same one used as with text. -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java -index 2733e3c..93c3bec 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java -@@ -270,6 +270,9 @@ public class ReactTextInputManager extends BaseViewManager getExportedViewConstants() { -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputPasteEvent.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputPasteEvent.java -new file mode 100644 -index 0000000..78b14b7 ---- /dev/null -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputPasteEvent.java -@@ -0,0 +1,63 @@ -+/* -+ * Copyright (c) Meta Platforms, Inc. and affiliates. -+ * -+ * This source code is licensed under the MIT license found in the -+ * LICENSE file in the root directory of this source tree. -+ */ -+ -+package com.facebook.react.views.textinput; -+ -+import androidx.annotation.Nullable; -+import com.facebook.react.bridge.Arguments; -+import com.facebook.react.bridge.WritableMap; -+import com.facebook.react.bridge.WritableArray; -+import com.facebook.react.uimanager.common.ViewUtil; -+import com.facebook.react.uimanager.events.Event; -+ -+/** -+ * Event emitted by EditText native view when clipboard content is pasted -+ */ -+class ReactTextInputPasteEvent extends Event { -+ -+ private static final String EVENT_NAME = "topPaste"; -+ -+ private String mType; -+ private String mData; -+ -+ @Deprecated -+ public ReactTextInputPasteEvent(int viewId, String type, String data) { -+ this(ViewUtil.NO_SURFACE_ID, viewId, type, data); -+ } -+ -+ public ReactTextInputPasteEvent(int surfaceId, int viewId, String type, String data) { -+ super(surfaceId, viewId); -+ mType = type; -+ mData = data; -+ } -+ -+ @Override -+ public String getEventName() { -+ return EVENT_NAME; -+ } -+ -+ @Override -+ public boolean canCoalesce() { -+ return false; -+ } -+ -+ @Nullable -+ @Override -+ protected WritableMap getEventData() { -+ WritableMap eventData = Arguments.createMap(); -+ -+ WritableArray items = Arguments.createArray(); -+ WritableMap item = Arguments.createMap(); -+ item.putString("type", mType); -+ item.putString("data", mData); -+ items.pushMap(item); -+ -+ eventData.putArray("items", items); -+ -+ return eventData; -+ } -+} -diff --git a/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp b/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp -index b37e00b..eec0734 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp -+++ b/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp -@@ -180,6 +180,19 @@ void TextInputEventEmitter::onScroll(const Metrics& textInputMetrics) const { - }); - } - -+void TextInputEventEmitter::onPaste(const std::string& type, const std::string& data) const { -+ dispatchEvent("onPaste", [type, data](jsi::Runtime& runtime) { -+ auto payload = jsi::Object(runtime); -+ auto items = jsi::Array(runtime, 1); -+ auto item = jsi::Object(runtime); -+ item.setProperty(runtime, "type", type); -+ item.setProperty(runtime, "data", data); -+ items.setValueAtIndex(runtime, 0, item); -+ payload.setProperty(runtime, "items", items); -+ return payload; -+ }); -+} -+ - void TextInputEventEmitter::dispatchTextInputEvent( - const std::string& name, - const Metrics& textInputMetrics) const { -diff --git a/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h b/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h -index 33a8b3a..a3c4c0a 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h -+++ b/node_modules/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h -@@ -45,6 +45,7 @@ class TextInputEventEmitter : public ViewEventEmitter { - void onSubmitEditing(const Metrics& textInputMetrics) const; - void onKeyPress(const KeyPressMetrics& keyPressMetrics) const; - void onScroll(const Metrics& textInputMetrics) const; -+ void onPaste(const std::string& type, const std::string& data) const; - - private: - void dispatchTextInputEvent( diff --git a/patches/react-native/react-native+0.77.1+012+alert-style.patch b/patches/react-native/react-native+0.77.1+012+alert-style.patch deleted file mode 100644 index 504657c8bc15..000000000000 --- a/patches/react-native/react-native+0.77.1+012+alert-style.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java -index 7a8eb59..b9b4fd5 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java -@@ -9,6 +9,7 @@ package com.facebook.react.modules.dialog; - - import android.annotation.SuppressLint; - import android.app.Dialog; -+import android.app.AlertDialog; - import android.content.Context; - import android.content.DialogInterface; - import android.content.res.TypedArray; -@@ -18,7 +19,6 @@ import android.view.LayoutInflater; - import android.view.View; - import android.widget.TextView; - import androidx.annotation.Nullable; --import androidx.appcompat.app.AlertDialog; - import androidx.core.view.AccessibilityDelegateCompat; - import androidx.core.view.ViewCompat; - import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; diff --git a/patches/react-native/react-native+0.77.1+013+fixNavigationAnimations.patch b/patches/react-native/react-native+0.77.1+013+fixNavigationAnimations.patch deleted file mode 100644 index 2863c89890c9..000000000000 --- a/patches/react-native/react-native+0.77.1+013+fixNavigationAnimations.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js b/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js -index feeaa19..9b69879 100644 ---- a/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js -+++ b/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js -@@ -79,6 +79,7 @@ export default class AnimatedProps extends AnimatedNode { - #nodeKeys: $ReadOnlyArray; - #nodes: $ReadOnlyArray; - #props: {[string]: mixed}; -+ #connectedToView: boolean; - - constructor( - inputProps: {[string]: mixed}, -@@ -91,6 +92,7 @@ export default class AnimatedProps extends AnimatedNode { - this.#nodes = nodes; - this.#props = props; - this.#callback = callback; -+ this.#connectedToView = false; - } - - __getValue(): Object { -@@ -196,6 +198,8 @@ export default class AnimatedProps extends AnimatedNode { - - if (this.#animatedView) { - this.__connectAnimatedView(); -+ } else if (!this.#connectedToView && this._animatedView) { -+ this.__connectAnimatedView(); - } - } - } -@@ -220,6 +224,7 @@ export default class AnimatedProps extends AnimatedNode { - throw new Error('Unable to locate attached view in the native tree'); - } - } -+ this.#connectedToView = true; - NativeAnimatedHelper.API.connectAnimatedNodeToView( - this.__getNativeTag(), - nativeViewTag, -@@ -236,6 +241,7 @@ export default class AnimatedProps extends AnimatedNode { - throw new Error('Unable to locate attached view in the native tree'); - } - } -+ this.#connectedToView = false; - NativeAnimatedHelper.API.disconnectAnimatedNodeFromView( - this.__getNativeTag(), - nativeViewTag, diff --git a/patches/react-native/react-native+0.77.1+014+fixScrollViewState.patch b/patches/react-native/react-native+0.77.1+014+fixScrollViewState.patch deleted file mode 100644 index 39217faef404..000000000000 --- a/patches/react-native/react-native+0.77.1+014+fixScrollViewState.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt -index fabeec1..603c47c 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt -@@ -503,7 +503,7 @@ public object ReactScrollViewHelper { - /** Get the padding on the top for nav bar */ - public var scrollAwayPaddingTop: Int = 0 - /** Get the Fabric state of last scroll position */ -- public val lastStateUpdateScroll: Point = Point(-1, -1) -+ public val lastStateUpdateScroll: Point = Point(0, 0) - /** Get true if the previous animation was canceled */ - public var isCanceled: Boolean = false - /** Get true if previous animation was finished */ diff --git a/patches/react-native/react-native+0.77.1+015+redactAppParameters.patch b/patches/react-native/react-native+0.77.1+015+redactAppParameters.patch deleted file mode 100644 index 7c4273c6d0c1..000000000000 --- a/patches/react-native/react-native+0.77.1+015+redactAppParameters.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/node_modules/react-native/Libraries/ReactNative/AppRegistry.js b/node_modules/react-native/Libraries/ReactNative/AppRegistry.js -index 68bd389..be9b5bf 100644 ---- a/node_modules/react-native/Libraries/ReactNative/AppRegistry.js -+++ b/node_modules/react-native/Libraries/ReactNative/AppRegistry.js -@@ -232,12 +232,34 @@ const AppRegistry = { - appParameters: Object, - displayMode?: number, - ): void { -+ const redactAppParameters = (parameters) => { -+ const initialProps = parameters['initialProps']; -+ const url = initialProps['url']; -+ -+ if(!url) { -+ return parameters; -+ } -+ -+ const sensitiveParams = ['authToken', 'autoGeneratedPassword', 'autoGeneratedLogin']; -+ const [urlBase, queryString] = url.split('?'); -+ -+ if (!queryString) { -+ return parameters; -+ } -+ -+ const redactedSearchParams = queryString.split('&').map((param) => { -+ const [key, value] = param.split('='); -+ return `${key}=${sensitiveParams.includes(key) ? '' : value}` -+ }); -+ return {...parameters, initialProps: {...initialProps, url: `${urlBase}?${redactedSearchParams.join('&')}`}}; -+ } -+ - if (appKey !== 'LogBox') { - const msg = - 'Updating props for Surface "' + - appKey + - '" with ' + -- JSON.stringify(appParameters); -+ JSON.stringify(redactAppParameters(appParameters)); - infoLog(msg); - BugReporting.addSource( - 'AppRegistry.setSurfaceProps' + runCount++, diff --git a/patches/react-native/react-native+0.77.1+016+android-keyboard-avoiding-view.patch b/patches/react-native/react-native+0.77.1+016+android-keyboard-avoiding-view.patch deleted file mode 100644 index 218254a85605..000000000000 --- a/patches/react-native/react-native+0.77.1+016+android-keyboard-avoiding-view.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java -index a42933c..3d01cec 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java -@@ -923,7 +923,9 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot { - sendEvent( - "keyboardDidHide", - createKeyboardEventPayload( -- PixelUtil.toDIPFromPixel(mVisibleViewArea.height()), -+ // Use mLastHeight to account for the translucent status bar, and fall back to getMeasuredHeight() on Bridgeless mode. -+ // Remove this patch once the upstream fix for https://github.com/facebook/react-native/issues/47140 is released. -+ PixelUtil.toDIPFromPixel(mWasMeasured ? mLastHeight : getMeasuredHeight()), - 0, - PixelUtil.toDIPFromPixel(mVisibleViewArea.width()), - 0)); -@@ -972,7 +974,9 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot { - sendEvent( - "keyboardDidHide", - createKeyboardEventPayload( -- PixelUtil.toDIPFromPixel(mVisibleViewArea.height()), -+ // Use mLastHeight to account for the translucent status bar, and fall back to getMeasuredHeight() on Bridgeless mode. -+ // Remove this patch once the upstream fix for https://github.com/facebook/react-native/issues/47140 is released. -+ PixelUtil.toDIPFromPixel(mWasMeasured ? mLastHeight : getMeasuredHeight()), - 0, - PixelUtil.toDIPFromPixel(mVisibleViewArea.width()), - 0)); diff --git a/patches/react-native/react-native+0.77.1+017+fix-mask-persisting-recycling.patch b/patches/react-native/react-native+0.77.1+017+fix-mask-persisting-recycling.patch deleted file mode 100644 index 97c8fec0bd3c..000000000000 --- a/patches/react-native/react-native+0.77.1+017+fix-mask-persisting-recycling.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm -index 9d69f42..e3d77ac 100644 ---- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm -+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm -@@ -573,6 +573,7 @@ - (void)prepareForRecycle - if ([_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN containsObject:@"opacity"]) { - self.layer.opacity = (float)props.opacity; - } -+ self.layer.mask = nil; - - self.autoresizingMask = UIViewAutoresizingNone; - diff --git a/patches/react-native/react-native+0.77.1+018+fix-text-selecting-on-change.patch b/patches/react-native/react-native+0.77.1+018+fix-text-selecting-on-change.patch deleted file mode 100644 index 8fb1aa9a3019..000000000000 --- a/patches/react-native/react-native+0.77.1+018+fix-text-selecting-on-change.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -index 5b3ffa4..ff56df0 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -@@ -139,6 +139,7 @@ public class ReactEditText extends AppCompatEditText { - private boolean mContextMenuHidden = false; - private boolean mDidAttachToWindow = false; - private boolean mSelectTextOnFocus = false; -+ private boolean hasSelectedTextOnFocus = false; - private @Nullable String mPlaceholder = null; - private Overflow mOverflow = Overflow.VISIBLE; - -@@ -260,11 +261,11 @@ public class ReactEditText extends AppCompatEditText { - @Override - protected void onLayout(boolean changed, int left, int top, int right, int bottom) { - onContentSizeChange(); -- if (mSelectTextOnFocus && isFocused()) { -+ if (mSelectTextOnFocus && isFocused() && !hasSelectedTextOnFocus) { - // Explicitly call this method to select text when layout is drawn - selectAll(); - // Prevent text on being selected for next layout pass -- mSelectTextOnFocus = false; -+ hasSelectedTextOnFocus = true; - } - } - -@@ -398,7 +399,7 @@ public class ReactEditText extends AppCompatEditText { - if (getShowSoftInputOnFocus()) { - showSoftKeyboard(); - } -- -+ hasSelectedTextOnFocus = true; - return focused; - } - diff --git a/patches/react-native/react-native+0.77.1+019+fix-scroll-view-jump.patch b/patches/react-native/react-native+0.77.1+019+fix-scroll-view-jump.patch deleted file mode 100644 index 562cb07dbe3c..000000000000 --- a/patches/react-native/react-native+0.77.1+019+fix-scroll-view-jump.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java -index b2cff8b..097c1d3 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java -@@ -203,7 +203,12 @@ class MaintainVisibleScrollPositionHelper 0 || frame.height() > 0) { -+ mPrevFirstVisibleFrame = frame; -+ } else { -+ mPrevFirstVisibleFrame = null; -+ } - } - - // UIManagerListener diff --git a/patches/react-native/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch b/patches/react-native/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch deleted file mode 100644 index 96a7004572b2..000000000000 --- a/patches/react-native/react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp -index 6d781dc..21d4845 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp -+++ b/node_modules/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp -@@ -511,7 +511,7 @@ void FabricUIManagerBinding::schedulerDidFinishTransaction( - mountingTransaction->getSurfaceId(); - }); - -- if (pendingTransaction != pendingTransactions_.end()) { -+ if (pendingTransaction != pendingTransactions_.end() && pendingTransaction->canMergeWith(*mountingTransaction)) { - pendingTransaction->mergeWith(std::move(*mountingTransaction)); - } else { - pendingTransactions_.push_back(std::move(*mountingTransaction)); -diff --git a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp -index d7dd1bc..d95d779 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp -+++ b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.cpp -@@ -5,6 +5,8 @@ - * LICENSE file in the root directory of this source tree. - */ - -+#include -+ - #include "MountingTransaction.h" - - namespace facebook::react { -@@ -54,4 +56,21 @@ void MountingTransaction::mergeWith(MountingTransaction&& transaction) { - telemetry_ = std::move(transaction.telemetry_); - } - -+bool MountingTransaction::canMergeWith(MountingTransaction& transaction) { -+ std::set deletedTags; -+ for (const auto& mutation : mutations_) { -+ if (mutation.type == ShadowViewMutation::Type::Delete) { -+ deletedTags.insert(mutation.oldChildShadowView.tag); -+ } -+ } -+ -+ for (const auto& mutation : transaction.getMutations()) { -+ if (mutation.type == ShadowViewMutation::Type::Create && deletedTags.contains(mutation.newChildShadowView.tag)) { -+ return false; -+ } -+ } -+ -+ return true; -+} -+ - } // namespace facebook::react -diff --git a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h -index 277e9f4..38629db 100644 ---- a/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h -+++ b/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h -@@ -85,6 +85,14 @@ class MountingTransaction final { - */ - void mergeWith(MountingTransaction&& transaction); - -+ /* -+ * Checks whether the two transactions can be safely merged. Due to -+ * reordering of mutations during mount, the sequence of -+ * REMOVE -> DELETE | CREATE -> INSERT (2 transactions) may get changed to -+ * INSERT -> REMOVE -> DELETE and the state will diverge from there. -+ */ -+ bool canMergeWith(MountingTransaction& transaction); -+ - private: - SurfaceId surfaceId_; - Number number_; diff --git a/patches/react-native/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch b/patches/react-native/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch deleted file mode 100644 index 7206c5564e1b..000000000000 --- a/patches/react-native/react-native+0.77.1+021+fix-crash-when-deleting-expense.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java -index 887dc73..f881753 100644 ---- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java -+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java -@@ -404,6 +404,7 @@ public class SurfaceMountingManager { - // thus prevent the RemoveDeleteTree worker from deleting this - // View in the future. - if (viewParent instanceof ViewGroup) { -+ ((ViewGroup) viewParent).endViewTransition(view); - ((ViewGroup) viewParent).removeView(view); - } - mErroneouslyReaddedReactTags.add(tag); diff --git a/patches/react-native/react-native+0.77.1+024+fix-surface-stopped-before-started.patch b/patches/react-native/react-native+0.77.1+024+fix-surface-stopped-before-started.patch deleted file mode 100644 index ed59645c62a8..000000000000 --- a/patches/react-native/react-native+0.77.1+024+fix-surface-stopped-before-started.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/node_modules/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm b/node_modules/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm -index b796713..5142307 100644 ---- a/node_modules/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm -+++ b/node_modules/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm -@@ -254,7 +254,9 @@ class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::Ho - surface.surfaceHandler.setDisplayMode(displayMode); - [self _attachSurface:surface]; - -- [_instance callFunctionOnBufferedRuntimeExecutor:[surface](facebook::jsi::Runtime &_) { [surface start]; }]; -+ __weak RCTFabricSurface *weakSurface = surface; -+ // Use the BufferedRuntimeExecutor to start the surface after the main JS bundle was fully executed. -+ [_instance callFunctionOnBufferedRuntimeExecutor:[weakSurface](facebook::jsi::Runtime &_) { [weakSurface start]; }]; - return surface; - } - diff --git a/patches/react-native/react-native+0.77.1+025.patch b/patches/react-native/react-native+0.77.1+025.patch deleted file mode 100644 index fb645f0c446e..000000000000 --- a/patches/react-native/react-native+0.77.1+025.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/node_modules/react-native/.DS_Store b/node_modules/react-native/.DS_Store -new file mode 100644 -index 0000000..60811a9 -Binary files /dev/null and b/node_modules/react-native/.DS_Store differ -diff --git a/node_modules/react-native/ReactAndroid/.DS_Store b/node_modules/react-native/ReactAndroid/.DS_Store -new file mode 100644 -index 0000000..8bfcb73 -Binary files /dev/null and b/node_modules/react-native/ReactAndroid/.DS_Store differ -diff --git a/node_modules/react-native/ReactAndroid/publish.gradle b/node_modules/react-native/ReactAndroid/publish.gradle -index 32287a7..5607be3 100644 ---- a/node_modules/react-native/ReactAndroid/publish.gradle -+++ b/node_modules/react-native/ReactAndroid/publish.gradle -@@ -13,7 +13,11 @@ def signingKey = findProperty("SIGNING_KEY") - def signingPwd = findProperty("SIGNING_PWD") - - def reactAndroidProjectDir = project(':packages:react-native:ReactAndroid').projectDir --def mavenTempLocalUrl = "file:///tmp/maven-local" -+def mavenURL = "https://maven.pkg.github.com/Expensify/App" -+ -+def patchedVersion = System.getenv("PATCHED_VERSION") -+def isHybridBuild = System.getenv("IS_HYBRID_BUILD")?.toBoolean() -+def publishingGroupId = isHybridBuild ? "com.expensify.react-hybrid" : "com.expensify.react-standalone" - - publishing { - publications { -@@ -26,12 +30,14 @@ publishing { - } - } - -+ groupId = publishingGroupId -+ - // We populate the publishing version using the project version, - // appending -SNAPSHOT if on nightly or prerelase. - if (isSnapshot) { -- version = this.version + "-SNAPSHOT" -+ version = patchedVersion + "-SNAPSHOT" - } else { -- version = this.version -+ version = patchedVersion - } - - pom { -@@ -39,10 +45,14 @@ publishing { - description = "A framework for building native apps with React" - url = "https://github.com/facebook/react-native" - -+ properties = [ -+ "patchesHash": System.getenv("PATCHES_HASH"), -+ ] -+ - developers { - developer { -- id = "facebook" -- name = "Facebook" -+ id = "expensify" -+ name = "Expensify" - } - } - -@@ -65,8 +75,11 @@ publishing { - - repositories { - maven { -- name = "mavenTempLocal" -- url = mavenTempLocalUrl -+ url = mavenURL -+ credentials { -+ username = System.getenv("GH_PUBLISH_ACTOR") -+ password = System.getenv("GH_PUBLISH_TOKEN") -+ } - } - } - From 1e578430fbf7aea79b1b153bcf0adf56a9d32d55 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 24 Jun 2025 12:49:28 +0700 Subject: [PATCH 05/11] revert --- patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch b/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch index 81709036316b..fe781d548dd7 100644 --- a/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch +++ b/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch @@ -693,4 +693,4 @@ index 33a8b3a..a3c4c0a 100644 + void onPaste(const std::string& type, const std::string& data) const; private: - void dispatchTextInputEvent( \ No newline at end of file + void dispatchTextInputEvent( From 1cff511beed682ad8bf9e88fc3786e6954226de0 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 24 Jun 2025 14:38:58 +0700 Subject: [PATCH 06/11] create patch --- ...e+0.79.2+011+Add-onPaste-to-TextInput.patch | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch b/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch index fe781d548dd7..80f24ebba436 100644 --- a/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch +++ b/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch @@ -445,7 +445,7 @@ index 0000000..bfb5819 + public void onPaste(String type, String data); +} diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java -index 42f2383..35bfa4d 100644 +index 42f2383..9a98163 100644 --- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -9,6 +9,10 @@ package com.facebook.react.views.textinput; @@ -483,7 +483,7 @@ index 42f2383..35bfa4d 100644 mTextAttributes = new TextAttributes(); applyTextAttributes(); -@@ -335,8 +342,38 @@ public class ReactEditText extends AppCompatEditText { +@@ -335,8 +342,40 @@ public class ReactEditText extends AppCompatEditText { */ @Override public boolean onTextContextMenuItem(int id) { @@ -503,12 +503,14 @@ index 42f2383..35bfa4d 100644 + if (itemUri != null) { + ContentResolver cr = getReactContext(this).getContentResolver(); + type = cr.getType(itemUri); -+ data = itemUri.toString(); -+ if (mPasteWatcher != null) { -+ mPasteWatcher.onPaste(type, data); ++ if (type != null && !type.equals(ClipDescription.MIMETYPE_TEXT_PLAIN)) { ++ data = itemUri.toString(); ++ if (mPasteWatcher != null) { ++ mPasteWatcher.onPaste(type, data); ++ } ++ // Prevents default behavior to avoid inserting raw binary data into the text field ++ return true; + } -+ // Prevents default behavior to avoid inserting raw binary data into the text field -+ return true; + } + + if (clipData.getDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) { @@ -523,7 +525,7 @@ index 42f2383..35bfa4d 100644 } return super.onTextContextMenuItem(id); } -@@ -417,6 +454,10 @@ public class ReactEditText extends AppCompatEditText { +@@ -417,6 +456,10 @@ public class ReactEditText extends AppCompatEditText { mScrollWatcher = scrollWatcher; } From 8da5fb0cd61b08cc4cc79c66b7c8c38cc60fded7 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 24 Jun 2025 14:42:56 +0700 Subject: [PATCH 07/11] tidy up react-native patches --- patches/react-native/details.md | 111 ++++++++++++++++++ .../react-native+0.79.2+001+initial.patch | 0 ...act-native+0.79.2+002+fixMVCPAndroid.patch | 0 ...0.79.2+003+disableTextInputRecycling.patch | 0 ...-native+0.79.2+004+iOSFontResolution.patch | 0 ...e+0.79.2+005+resetAutoresizingOnView.patch | 0 ...2+006+disableNonTranslucentStatusBar.patch | 0 .../react-native+0.79.2+007+TextInput.patch | 0 ...+008+iOSCoreAnimationBorderRendering.patch | 0 ...t-native+0.79.2+009+copyStateOnClone.patch | 0 ...e+0.79.2+010+textinput-clear-command.patch | 0 ...+0.79.2+011+Add-onPaste-to-TextInput.patch | 0 .../react-native+0.79.2+012+alert-style.patch | 0 ...e+0.79.2+013+fixNavigationAnimations.patch | 0 ...native+0.79.2+014+fixScrollViewState.patch | 0 ...ative+0.79.2+015+redactAppParameters.patch | 0 ...2+016+android-keyboard-avoiding-view.patch | 0 ....2+017+fix-mask-persisting-recycling.patch | 0 ...9.2+018+fix-text-selecting-on-change.patch | 0 ...tive+0.79.2+019+fix-scroll-view-jump.patch | 0 ...x-dropping-mutations-in-transactions.patch | 0 ...+021+fix-crash-when-deleting-expense.patch | 0 ...2+fix-surface-stopped-before-started.patch | 0 ...act-native+0.79.2+023+publish-gradle.patch | 0 ...24+restore-old-line-height-algorithm.patch | 0 25 files changed, 111 insertions(+) create mode 100644 patches/react-native/details.md rename patches/{ => react-native}/react-native+0.79.2+001+initial.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+002+fixMVCPAndroid.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+003+disableTextInputRecycling.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+004+iOSFontResolution.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+005+resetAutoresizingOnView.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+007+TextInput.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+009+copyStateOnClone.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+010+textinput-clear-command.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+012+alert-style.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+013+fixNavigationAnimations.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+014+fixScrollViewState.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+015+redactAppParameters.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+016+android-keyboard-avoiding-view.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+017+fix-mask-persisting-recycling.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+018+fix-text-selecting-on-change.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+019+fix-scroll-view-jump.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+022+fix-surface-stopped-before-started.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+023+publish-gradle.patch (100%) rename patches/{ => react-native}/react-native+0.79.2+024+restore-old-line-height-algorithm.patch (100%) diff --git a/patches/react-native/details.md b/patches/react-native/details.md new file mode 100644 index 000000000000..0bb42473befd --- /dev/null +++ b/patches/react-native/details.md @@ -0,0 +1,111 @@ +# `react-native` patches + +### [react-native+0.77.1+001+initial.patch](react-native+0.77.1+001+initial.patch) + +// TODO + +### [react-native+0.77.1+002+fixMVCPAndroid.patch](react-native+0.77.1+002+fixMVCPAndroid.patch) + +// TODO + +### [react-native+0.77.1+003+disableTextInputRecycling.patch](react-native+0.77.1+003+disableTextInputRecycling.patch) + +// TODO + +### [react-native+0.77.1+004+iOSFontResolution.patch](react-native+0.77.1+004+iOSFontResolution.patch) + +// TODO + +### [react-native+0.77.1+005+resetAutoresizingOnView.patch](react-native+0.77.1+005+resetAutoresizingOnView.patch) + +// TODO + +### [react-native+0.77.1+006+disableNonTranslucentStatusBar.patch](react-native+0.77.1+006+disableNonTranslucentStatusBar.patch) + +// TODO + +### [react-native+0.77.1+007+TextInput.patch](react-native+0.77.1+007+TextInput.patch) + +// TODO + +### [react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch](react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch) + +// TODO + +### [react-native+0.77.1+009+copyStateOnClone.patch](react-native+0.77.1+009+copyStateOnClone.patch) + +// TODO + +### [react-native+0.77.1+010+textinput-clear-command.patch](react-native+0.77.1+010+textinput-clear-command.patch) + +// TODO + +### [react-native+0.77.1+011+Add-onPaste-to-TextInput.patch](react-native+0.77.1+011+Add-onPaste-to-TextInput.patch) + +- Reasons: + - Adds `onPaste` callback to `TextInput` to support image pasting on native + - Fixes an issue where pasted image displays as binary text on some Android devices where rich clipboard data is stored in binary form + - Fixes an issue where pasting from WPS Office app crashes the app on Android where its content URI is not recognized by Android `ContentResolver` +- Upstream PR/issue: https://github.com/facebook/react-native/pull/45425 +- Upstream RFC: https://github.com/s77rt/discussions-and-proposals/blob/TextInput-onPaste/proposals/0000-textinput-onpaste.md +- E/App issue: + - https://github.com/Expensify/App/issues/41239 + - https://github.com/Expensify/App/issues/55304 + - https://github.com/Expensify/App/issues/63191 +- PR Introducing Patch: [#47203](https://github.com/Expensify/App/pull/47203) + +### [react-native+0.77.1+012+alert-style.patch](react-native+0.77.1+012+alert-style.patch) + +// TODO + +### [react-native+0.77.1+013+fixNavigationAnimations.patch](react-native+0.77.1+013+fixNavigationAnimations.patch) + +// TODO + +### [react-native+0.77.1+014+fixScrollViewState.patch](react-native+0.77.1+014+fixScrollViewState.patch) + +// TODO + +### [react-native+0.77.1+015+redactAppParameters.patch](react-native+0.77.1+015+redactAppParameters.patch) + +// TODO + +### [react-native+0.77.1+016+android-keyboard-avoiding-view.patch](react-native+0.77.1+016+android-keyboard-avoiding-view.patch) + +// TODO + +### [react-native+0.77.1+017+fix-mask-persisting-recycling.patch](react-native+0.77.1+017+fix-mask-persisting-recycling.patch) + +// TODO + +### [react-native+0.77.1+018+fix-text-selecting-on-change.patch](react-native+0.77.1+018+fix-text-selecting-on-change.patch) + +// TODO + +### [react-native+0.77.1+019+fix-scroll-view-jump.patch](react-native+0.77.1+019+fix-scroll-view-jump.patch) + +// TODO + +### [react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch](react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch) + +// TODO + +### [react-native+0.77.1+021+fix-crash-when-deleting-expense.patch](react-native+0.77.1+021+fix-crash-when-deleting-expense.patch) + +// TODO + +### [react-native+0.77.1+022+disable-suggestion-pop-up.patch](react-native+0.77.1+022+disable-suggestion-pop-up.patch) + +// TODO + +### [react-native+0.77.1+023+dont-enable-height-centering.patch](react-native+0.77.1+023+dont-enable-height-centering.patch) + +// TODO + +### [react-native+0.77.1+024+fix-surface-stopped-before-started.patch](react-native+0.77.1+024+fix-surface-stopped-before-started.patch) + +// TODO + +### [react-native+0.77.1+025.patch](react-native+0.77.1+025.patch) + +// TODO diff --git a/patches/react-native+0.79.2+001+initial.patch b/patches/react-native/react-native+0.79.2+001+initial.patch similarity index 100% rename from patches/react-native+0.79.2+001+initial.patch rename to patches/react-native/react-native+0.79.2+001+initial.patch diff --git a/patches/react-native+0.79.2+002+fixMVCPAndroid.patch b/patches/react-native/react-native+0.79.2+002+fixMVCPAndroid.patch similarity index 100% rename from patches/react-native+0.79.2+002+fixMVCPAndroid.patch rename to patches/react-native/react-native+0.79.2+002+fixMVCPAndroid.patch diff --git a/patches/react-native+0.79.2+003+disableTextInputRecycling.patch b/patches/react-native/react-native+0.79.2+003+disableTextInputRecycling.patch similarity index 100% rename from patches/react-native+0.79.2+003+disableTextInputRecycling.patch rename to patches/react-native/react-native+0.79.2+003+disableTextInputRecycling.patch diff --git a/patches/react-native+0.79.2+004+iOSFontResolution.patch b/patches/react-native/react-native+0.79.2+004+iOSFontResolution.patch similarity index 100% rename from patches/react-native+0.79.2+004+iOSFontResolution.patch rename to patches/react-native/react-native+0.79.2+004+iOSFontResolution.patch diff --git a/patches/react-native+0.79.2+005+resetAutoresizingOnView.patch b/patches/react-native/react-native+0.79.2+005+resetAutoresizingOnView.patch similarity index 100% rename from patches/react-native+0.79.2+005+resetAutoresizingOnView.patch rename to patches/react-native/react-native+0.79.2+005+resetAutoresizingOnView.patch diff --git a/patches/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch b/patches/react-native/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch similarity index 100% rename from patches/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch rename to patches/react-native/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch diff --git a/patches/react-native+0.79.2+007+TextInput.patch b/patches/react-native/react-native+0.79.2+007+TextInput.patch similarity index 100% rename from patches/react-native+0.79.2+007+TextInput.patch rename to patches/react-native/react-native+0.79.2+007+TextInput.patch diff --git a/patches/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch b/patches/react-native/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch similarity index 100% rename from patches/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch rename to patches/react-native/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch diff --git a/patches/react-native+0.79.2+009+copyStateOnClone.patch b/patches/react-native/react-native+0.79.2+009+copyStateOnClone.patch similarity index 100% rename from patches/react-native+0.79.2+009+copyStateOnClone.patch rename to patches/react-native/react-native+0.79.2+009+copyStateOnClone.patch diff --git a/patches/react-native+0.79.2+010+textinput-clear-command.patch b/patches/react-native/react-native+0.79.2+010+textinput-clear-command.patch similarity index 100% rename from patches/react-native+0.79.2+010+textinput-clear-command.patch rename to patches/react-native/react-native+0.79.2+010+textinput-clear-command.patch diff --git a/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch b/patches/react-native/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch similarity index 100% rename from patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch rename to patches/react-native/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch diff --git a/patches/react-native+0.79.2+012+alert-style.patch b/patches/react-native/react-native+0.79.2+012+alert-style.patch similarity index 100% rename from patches/react-native+0.79.2+012+alert-style.patch rename to patches/react-native/react-native+0.79.2+012+alert-style.patch diff --git a/patches/react-native+0.79.2+013+fixNavigationAnimations.patch b/patches/react-native/react-native+0.79.2+013+fixNavigationAnimations.patch similarity index 100% rename from patches/react-native+0.79.2+013+fixNavigationAnimations.patch rename to patches/react-native/react-native+0.79.2+013+fixNavigationAnimations.patch diff --git a/patches/react-native+0.79.2+014+fixScrollViewState.patch b/patches/react-native/react-native+0.79.2+014+fixScrollViewState.patch similarity index 100% rename from patches/react-native+0.79.2+014+fixScrollViewState.patch rename to patches/react-native/react-native+0.79.2+014+fixScrollViewState.patch diff --git a/patches/react-native+0.79.2+015+redactAppParameters.patch b/patches/react-native/react-native+0.79.2+015+redactAppParameters.patch similarity index 100% rename from patches/react-native+0.79.2+015+redactAppParameters.patch rename to patches/react-native/react-native+0.79.2+015+redactAppParameters.patch diff --git a/patches/react-native+0.79.2+016+android-keyboard-avoiding-view.patch b/patches/react-native/react-native+0.79.2+016+android-keyboard-avoiding-view.patch similarity index 100% rename from patches/react-native+0.79.2+016+android-keyboard-avoiding-view.patch rename to patches/react-native/react-native+0.79.2+016+android-keyboard-avoiding-view.patch diff --git a/patches/react-native+0.79.2+017+fix-mask-persisting-recycling.patch b/patches/react-native/react-native+0.79.2+017+fix-mask-persisting-recycling.patch similarity index 100% rename from patches/react-native+0.79.2+017+fix-mask-persisting-recycling.patch rename to patches/react-native/react-native+0.79.2+017+fix-mask-persisting-recycling.patch diff --git a/patches/react-native+0.79.2+018+fix-text-selecting-on-change.patch b/patches/react-native/react-native+0.79.2+018+fix-text-selecting-on-change.patch similarity index 100% rename from patches/react-native+0.79.2+018+fix-text-selecting-on-change.patch rename to patches/react-native/react-native+0.79.2+018+fix-text-selecting-on-change.patch diff --git a/patches/react-native+0.79.2+019+fix-scroll-view-jump.patch b/patches/react-native/react-native+0.79.2+019+fix-scroll-view-jump.patch similarity index 100% rename from patches/react-native+0.79.2+019+fix-scroll-view-jump.patch rename to patches/react-native/react-native+0.79.2+019+fix-scroll-view-jump.patch diff --git a/patches/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch b/patches/react-native/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch similarity index 100% rename from patches/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch rename to patches/react-native/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch diff --git a/patches/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch b/patches/react-native/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch similarity index 100% rename from patches/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch rename to patches/react-native/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch diff --git a/patches/react-native+0.79.2+022+fix-surface-stopped-before-started.patch b/patches/react-native/react-native+0.79.2+022+fix-surface-stopped-before-started.patch similarity index 100% rename from patches/react-native+0.79.2+022+fix-surface-stopped-before-started.patch rename to patches/react-native/react-native+0.79.2+022+fix-surface-stopped-before-started.patch diff --git a/patches/react-native+0.79.2+023+publish-gradle.patch b/patches/react-native/react-native+0.79.2+023+publish-gradle.patch similarity index 100% rename from patches/react-native+0.79.2+023+publish-gradle.patch rename to patches/react-native/react-native+0.79.2+023+publish-gradle.patch diff --git a/patches/react-native+0.79.2+024+restore-old-line-height-algorithm.patch b/patches/react-native/react-native+0.79.2+024+restore-old-line-height-algorithm.patch similarity index 100% rename from patches/react-native+0.79.2+024+restore-old-line-height-algorithm.patch rename to patches/react-native/react-native+0.79.2+024+restore-old-line-height-algorithm.patch From 7379de7ef3928ae90e6d98e0ba2b929f3a5562b6 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 24 Jun 2025 14:47:47 +0700 Subject: [PATCH 08/11] rename patches --- patches/react-native/details.md | 50 ++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 0bb42473befd..6d159f9826bb 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -1,46 +1,46 @@ # `react-native` patches -### [react-native+0.77.1+001+initial.patch](react-native+0.77.1+001+initial.patch) +### [react-native+0.79.2+001+initial.patch](react-native+0.79.2+001+initial.patch) // TODO -### [react-native+0.77.1+002+fixMVCPAndroid.patch](react-native+0.77.1+002+fixMVCPAndroid.patch) +### [react-native+0.79.2+002+fixMVCPAndroid.patch](react-native+0.79.2+002+fixMVCPAndroid.patch) // TODO -### [react-native+0.77.1+003+disableTextInputRecycling.patch](react-native+0.77.1+003+disableTextInputRecycling.patch) +### [react-native+0.79.2+003+disableTextInputRecycling.patch](react-native+0.79.2+003+disableTextInputRecycling.patch) // TODO -### [react-native+0.77.1+004+iOSFontResolution.patch](react-native+0.77.1+004+iOSFontResolution.patch) +### [react-native+0.79.2+004+iOSFontResolution.patch](react-native+0.79.2+004+iOSFontResolution.patch) // TODO -### [react-native+0.77.1+005+resetAutoresizingOnView.patch](react-native+0.77.1+005+resetAutoresizingOnView.patch) +### [react-native+0.79.2+005+resetAutoresizingOnView.patch](react-native+0.79.2+005+resetAutoresizingOnView.patch) // TODO -### [react-native+0.77.1+006+disableNonTranslucentStatusBar.patch](react-native+0.77.1+006+disableNonTranslucentStatusBar.patch) +### [react-native+0.79.2+006+disableNonTranslucentStatusBar.patch](react-native+0.79.2+006+disableNonTranslucentStatusBar.patch) // TODO -### [react-native+0.77.1+007+TextInput.patch](react-native+0.77.1+007+TextInput.patch) +### [react-native+0.79.2+007+TextInput.patch](react-native+0.79.2+007+TextInput.patch) // TODO -### [react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch](react-native+0.77.1+008+iOSCoreAnimationBorderRendering.patch) +### [react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch](react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch) // TODO -### [react-native+0.77.1+009+copyStateOnClone.patch](react-native+0.77.1+009+copyStateOnClone.patch) +### [react-native+0.79.2+009+copyStateOnClone.patch](react-native+0.79.2+009+copyStateOnClone.patch) // TODO -### [react-native+0.77.1+010+textinput-clear-command.patch](react-native+0.77.1+010+textinput-clear-command.patch) +### [react-native+0.79.2+010+textinput-clear-command.patch](react-native+0.79.2+010+textinput-clear-command.patch) // TODO -### [react-native+0.77.1+011+Add-onPaste-to-TextInput.patch](react-native+0.77.1+011+Add-onPaste-to-TextInput.patch) +### [react-native+0.79.2+011+Add-onPaste-to-TextInput.patch](react-native+0.79.2+011+Add-onPaste-to-TextInput.patch) - Reasons: - Adds `onPaste` callback to `TextInput` to support image pasting on native @@ -54,58 +54,58 @@ - https://github.com/Expensify/App/issues/63191 - PR Introducing Patch: [#47203](https://github.com/Expensify/App/pull/47203) -### [react-native+0.77.1+012+alert-style.patch](react-native+0.77.1+012+alert-style.patch) +### [react-native+0.79.2+012+alert-style.patch](react-native+0.79.2+012+alert-style.patch) // TODO -### [react-native+0.77.1+013+fixNavigationAnimations.patch](react-native+0.77.1+013+fixNavigationAnimations.patch) +### [react-native+0.79.2+013+fixNavigationAnimations.patch](react-native+0.79.2+013+fixNavigationAnimations.patch) // TODO -### [react-native+0.77.1+014+fixScrollViewState.patch](react-native+0.77.1+014+fixScrollViewState.patch) +### [react-native+0.79.2+014+fixScrollViewState.patch](react-native+0.79.2+014+fixScrollViewState.patch) // TODO -### [react-native+0.77.1+015+redactAppParameters.patch](react-native+0.77.1+015+redactAppParameters.patch) +### [react-native+0.79.2+015+redactAppParameters.patch](react-native+0.79.2+015+redactAppParameters.patch) // TODO -### [react-native+0.77.1+016+android-keyboard-avoiding-view.patch](react-native+0.77.1+016+android-keyboard-avoiding-view.patch) +### [react-native+0.79.2+016+android-keyboard-avoiding-view.patch](react-native+0.79.2+016+android-keyboard-avoiding-view.patch) // TODO -### [react-native+0.77.1+017+fix-mask-persisting-recycling.patch](react-native+0.77.1+017+fix-mask-persisting-recycling.patch) +### [react-native+0.79.2+017+fix-mask-persisting-recycling.patch](react-native+0.79.2+017+fix-mask-persisting-recycling.patch) // TODO -### [react-native+0.77.1+018+fix-text-selecting-on-change.patch](react-native+0.77.1+018+fix-text-selecting-on-change.patch) +### [react-native+0.79.2+018+fix-text-selecting-on-change.patch](react-native+0.79.2+018+fix-text-selecting-on-change.patch) // TODO -### [react-native+0.77.1+019+fix-scroll-view-jump.patch](react-native+0.77.1+019+fix-scroll-view-jump.patch) +### [react-native+0.79.2+019+fix-scroll-view-jump.patch](react-native+0.79.2+019+fix-scroll-view-jump.patch) // TODO -### [react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch](react-native+0.77.1+020+fix-dropping-mutations-in-transactions.patch) +### [react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch](react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch) // TODO -### [react-native+0.77.1+021+fix-crash-when-deleting-expense.patch](react-native+0.77.1+021+fix-crash-when-deleting-expense.patch) +### [react-native+0.79.2+021+fix-crash-when-deleting-expense.patch](react-native+0.79.2+021+fix-crash-when-deleting-expense.patch) // TODO -### [react-native+0.77.1+022+disable-suggestion-pop-up.patch](react-native+0.77.1+022+disable-suggestion-pop-up.patch) +### [react-native+0.79.2+022+disable-suggestion-pop-up.patch](react-native+0.79.2+022+disable-suggestion-pop-up.patch) // TODO -### [react-native+0.77.1+023+dont-enable-height-centering.patch](react-native+0.77.1+023+dont-enable-height-centering.patch) +### [react-native+0.79.2+023+dont-enable-height-centering.patch](react-native+0.79.2+023+dont-enable-height-centering.patch) // TODO -### [react-native+0.77.1+024+fix-surface-stopped-before-started.patch](react-native+0.77.1+024+fix-surface-stopped-before-started.patch) +### [react-native+0.79.2+024+fix-surface-stopped-before-started.patch](react-native+0.79.2+024+fix-surface-stopped-before-started.patch) // TODO -### [react-native+0.77.1+025.patch](react-native+0.77.1+025.patch) +### [react-native+0.79.2+025.patch](react-native+0.79.2+025.patch) // TODO From 5c54abef30712dbe2f55d6fca307b5ab2c1b6f1c Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 24 Jun 2025 14:52:19 +0700 Subject: [PATCH 09/11] rename patches --- patches/react-native/details.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 6d159f9826bb..0ffb96bef4b1 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -94,18 +94,14 @@ // TODO -### [react-native+0.79.2+022+disable-suggestion-pop-up.patch](react-native+0.79.2+022+disable-suggestion-pop-up.patch) +### [react-native+0.79.2+022+fix-surface-stopped-before-started.patch](react-native+0.79.2+022+fix-surface-stopped-before-started.patch) // TODO -### [react-native+0.79.2+023+dont-enable-height-centering.patch](react-native+0.79.2+023+dont-enable-height-centering.patch) +### [react-native+0.79.2+023+publish-gradle.patch](react-native+0.79.2+023+publish-gradle.patch) // TODO -### [react-native+0.79.2+024+fix-surface-stopped-before-started.patch](react-native+0.79.2+024+fix-surface-stopped-before-started.patch) - -// TODO - -### [react-native+0.79.2+025.patch](react-native+0.79.2+025.patch) +### [react-native+0.79.2+024+restore-old-line-height-algorithm.patch](react-native+0.79.2+024+restore-old-line-height-algorithm.patch) // TODO From a848d245f785de847ee49411f9987afd17375ff2 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 24 Jun 2025 14:54:19 +0700 Subject: [PATCH 10/11] revert: tidy up react-native patches --- .../react-native+0.79.2+001+initial.patch | 0 ...act-native+0.79.2+002+fixMVCPAndroid.patch | 0 ...0.79.2+003+disableTextInputRecycling.patch | 0 ...-native+0.79.2+004+iOSFontResolution.patch | 0 ...e+0.79.2+005+resetAutoresizingOnView.patch | 0 ...2+006+disableNonTranslucentStatusBar.patch | 0 .../react-native+0.79.2+007+TextInput.patch | 0 ...+008+iOSCoreAnimationBorderRendering.patch | 0 ...t-native+0.79.2+009+copyStateOnClone.patch | 0 ...e+0.79.2+010+textinput-clear-command.patch | 0 ...+0.79.2+011+Add-onPaste-to-TextInput.patch | 0 .../react-native+0.79.2+012+alert-style.patch | 0 ...e+0.79.2+013+fixNavigationAnimations.patch | 0 ...native+0.79.2+014+fixScrollViewState.patch | 0 ...ative+0.79.2+015+redactAppParameters.patch | 0 ...2+016+android-keyboard-avoiding-view.patch | 0 ....2+017+fix-mask-persisting-recycling.patch | 0 ...9.2+018+fix-text-selecting-on-change.patch | 0 ...tive+0.79.2+019+fix-scroll-view-jump.patch | 0 ...x-dropping-mutations-in-transactions.patch | 0 ...+021+fix-crash-when-deleting-expense.patch | 0 ...2+fix-surface-stopped-before-started.patch | 0 ...act-native+0.79.2+023+publish-gradle.patch | 0 ...24+restore-old-line-height-algorithm.patch | 0 patches/react-native/details.md | 107 ------------------ 25 files changed, 107 deletions(-) rename patches/{react-native => }/react-native+0.79.2+001+initial.patch (100%) rename patches/{react-native => }/react-native+0.79.2+002+fixMVCPAndroid.patch (100%) rename patches/{react-native => }/react-native+0.79.2+003+disableTextInputRecycling.patch (100%) rename patches/{react-native => }/react-native+0.79.2+004+iOSFontResolution.patch (100%) rename patches/{react-native => }/react-native+0.79.2+005+resetAutoresizingOnView.patch (100%) rename patches/{react-native => }/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch (100%) rename patches/{react-native => }/react-native+0.79.2+007+TextInput.patch (100%) rename patches/{react-native => }/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch (100%) rename patches/{react-native => }/react-native+0.79.2+009+copyStateOnClone.patch (100%) rename patches/{react-native => }/react-native+0.79.2+010+textinput-clear-command.patch (100%) rename patches/{react-native => }/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch (100%) rename patches/{react-native => }/react-native+0.79.2+012+alert-style.patch (100%) rename patches/{react-native => }/react-native+0.79.2+013+fixNavigationAnimations.patch (100%) rename patches/{react-native => }/react-native+0.79.2+014+fixScrollViewState.patch (100%) rename patches/{react-native => }/react-native+0.79.2+015+redactAppParameters.patch (100%) rename patches/{react-native => }/react-native+0.79.2+016+android-keyboard-avoiding-view.patch (100%) rename patches/{react-native => }/react-native+0.79.2+017+fix-mask-persisting-recycling.patch (100%) rename patches/{react-native => }/react-native+0.79.2+018+fix-text-selecting-on-change.patch (100%) rename patches/{react-native => }/react-native+0.79.2+019+fix-scroll-view-jump.patch (100%) rename patches/{react-native => }/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch (100%) rename patches/{react-native => }/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch (100%) rename patches/{react-native => }/react-native+0.79.2+022+fix-surface-stopped-before-started.patch (100%) rename patches/{react-native => }/react-native+0.79.2+023+publish-gradle.patch (100%) rename patches/{react-native => }/react-native+0.79.2+024+restore-old-line-height-algorithm.patch (100%) delete mode 100644 patches/react-native/details.md diff --git a/patches/react-native/react-native+0.79.2+001+initial.patch b/patches/react-native+0.79.2+001+initial.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+001+initial.patch rename to patches/react-native+0.79.2+001+initial.patch diff --git a/patches/react-native/react-native+0.79.2+002+fixMVCPAndroid.patch b/patches/react-native+0.79.2+002+fixMVCPAndroid.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+002+fixMVCPAndroid.patch rename to patches/react-native+0.79.2+002+fixMVCPAndroid.patch diff --git a/patches/react-native/react-native+0.79.2+003+disableTextInputRecycling.patch b/patches/react-native+0.79.2+003+disableTextInputRecycling.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+003+disableTextInputRecycling.patch rename to patches/react-native+0.79.2+003+disableTextInputRecycling.patch diff --git a/patches/react-native/react-native+0.79.2+004+iOSFontResolution.patch b/patches/react-native+0.79.2+004+iOSFontResolution.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+004+iOSFontResolution.patch rename to patches/react-native+0.79.2+004+iOSFontResolution.patch diff --git a/patches/react-native/react-native+0.79.2+005+resetAutoresizingOnView.patch b/patches/react-native+0.79.2+005+resetAutoresizingOnView.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+005+resetAutoresizingOnView.patch rename to patches/react-native+0.79.2+005+resetAutoresizingOnView.patch diff --git a/patches/react-native/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch b/patches/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch rename to patches/react-native+0.79.2+006+disableNonTranslucentStatusBar.patch diff --git a/patches/react-native/react-native+0.79.2+007+TextInput.patch b/patches/react-native+0.79.2+007+TextInput.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+007+TextInput.patch rename to patches/react-native+0.79.2+007+TextInput.patch diff --git a/patches/react-native/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch b/patches/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch rename to patches/react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch diff --git a/patches/react-native/react-native+0.79.2+009+copyStateOnClone.patch b/patches/react-native+0.79.2+009+copyStateOnClone.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+009+copyStateOnClone.patch rename to patches/react-native+0.79.2+009+copyStateOnClone.patch diff --git a/patches/react-native/react-native+0.79.2+010+textinput-clear-command.patch b/patches/react-native+0.79.2+010+textinput-clear-command.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+010+textinput-clear-command.patch rename to patches/react-native+0.79.2+010+textinput-clear-command.patch diff --git a/patches/react-native/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch b/patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch rename to patches/react-native+0.79.2+011+Add-onPaste-to-TextInput.patch diff --git a/patches/react-native/react-native+0.79.2+012+alert-style.patch b/patches/react-native+0.79.2+012+alert-style.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+012+alert-style.patch rename to patches/react-native+0.79.2+012+alert-style.patch diff --git a/patches/react-native/react-native+0.79.2+013+fixNavigationAnimations.patch b/patches/react-native+0.79.2+013+fixNavigationAnimations.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+013+fixNavigationAnimations.patch rename to patches/react-native+0.79.2+013+fixNavigationAnimations.patch diff --git a/patches/react-native/react-native+0.79.2+014+fixScrollViewState.patch b/patches/react-native+0.79.2+014+fixScrollViewState.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+014+fixScrollViewState.patch rename to patches/react-native+0.79.2+014+fixScrollViewState.patch diff --git a/patches/react-native/react-native+0.79.2+015+redactAppParameters.patch b/patches/react-native+0.79.2+015+redactAppParameters.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+015+redactAppParameters.patch rename to patches/react-native+0.79.2+015+redactAppParameters.patch diff --git a/patches/react-native/react-native+0.79.2+016+android-keyboard-avoiding-view.patch b/patches/react-native+0.79.2+016+android-keyboard-avoiding-view.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+016+android-keyboard-avoiding-view.patch rename to patches/react-native+0.79.2+016+android-keyboard-avoiding-view.patch diff --git a/patches/react-native/react-native+0.79.2+017+fix-mask-persisting-recycling.patch b/patches/react-native+0.79.2+017+fix-mask-persisting-recycling.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+017+fix-mask-persisting-recycling.patch rename to patches/react-native+0.79.2+017+fix-mask-persisting-recycling.patch diff --git a/patches/react-native/react-native+0.79.2+018+fix-text-selecting-on-change.patch b/patches/react-native+0.79.2+018+fix-text-selecting-on-change.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+018+fix-text-selecting-on-change.patch rename to patches/react-native+0.79.2+018+fix-text-selecting-on-change.patch diff --git a/patches/react-native/react-native+0.79.2+019+fix-scroll-view-jump.patch b/patches/react-native+0.79.2+019+fix-scroll-view-jump.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+019+fix-scroll-view-jump.patch rename to patches/react-native+0.79.2+019+fix-scroll-view-jump.patch diff --git a/patches/react-native/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch b/patches/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch rename to patches/react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch diff --git a/patches/react-native/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch b/patches/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch rename to patches/react-native+0.79.2+021+fix-crash-when-deleting-expense.patch diff --git a/patches/react-native/react-native+0.79.2+022+fix-surface-stopped-before-started.patch b/patches/react-native+0.79.2+022+fix-surface-stopped-before-started.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+022+fix-surface-stopped-before-started.patch rename to patches/react-native+0.79.2+022+fix-surface-stopped-before-started.patch diff --git a/patches/react-native/react-native+0.79.2+023+publish-gradle.patch b/patches/react-native+0.79.2+023+publish-gradle.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+023+publish-gradle.patch rename to patches/react-native+0.79.2+023+publish-gradle.patch diff --git a/patches/react-native/react-native+0.79.2+024+restore-old-line-height-algorithm.patch b/patches/react-native+0.79.2+024+restore-old-line-height-algorithm.patch similarity index 100% rename from patches/react-native/react-native+0.79.2+024+restore-old-line-height-algorithm.patch rename to patches/react-native+0.79.2+024+restore-old-line-height-algorithm.patch diff --git a/patches/react-native/details.md b/patches/react-native/details.md deleted file mode 100644 index 0ffb96bef4b1..000000000000 --- a/patches/react-native/details.md +++ /dev/null @@ -1,107 +0,0 @@ -# `react-native` patches - -### [react-native+0.79.2+001+initial.patch](react-native+0.79.2+001+initial.patch) - -// TODO - -### [react-native+0.79.2+002+fixMVCPAndroid.patch](react-native+0.79.2+002+fixMVCPAndroid.patch) - -// TODO - -### [react-native+0.79.2+003+disableTextInputRecycling.patch](react-native+0.79.2+003+disableTextInputRecycling.patch) - -// TODO - -### [react-native+0.79.2+004+iOSFontResolution.patch](react-native+0.79.2+004+iOSFontResolution.patch) - -// TODO - -### [react-native+0.79.2+005+resetAutoresizingOnView.patch](react-native+0.79.2+005+resetAutoresizingOnView.patch) - -// TODO - -### [react-native+0.79.2+006+disableNonTranslucentStatusBar.patch](react-native+0.79.2+006+disableNonTranslucentStatusBar.patch) - -// TODO - -### [react-native+0.79.2+007+TextInput.patch](react-native+0.79.2+007+TextInput.patch) - -// TODO - -### [react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch](react-native+0.79.2+008+iOSCoreAnimationBorderRendering.patch) - -// TODO - -### [react-native+0.79.2+009+copyStateOnClone.patch](react-native+0.79.2+009+copyStateOnClone.patch) - -// TODO - -### [react-native+0.79.2+010+textinput-clear-command.patch](react-native+0.79.2+010+textinput-clear-command.patch) - -// TODO - -### [react-native+0.79.2+011+Add-onPaste-to-TextInput.patch](react-native+0.79.2+011+Add-onPaste-to-TextInput.patch) - -- Reasons: - - Adds `onPaste` callback to `TextInput` to support image pasting on native - - Fixes an issue where pasted image displays as binary text on some Android devices where rich clipboard data is stored in binary form - - Fixes an issue where pasting from WPS Office app crashes the app on Android where its content URI is not recognized by Android `ContentResolver` -- Upstream PR/issue: https://github.com/facebook/react-native/pull/45425 -- Upstream RFC: https://github.com/s77rt/discussions-and-proposals/blob/TextInput-onPaste/proposals/0000-textinput-onpaste.md -- E/App issue: - - https://github.com/Expensify/App/issues/41239 - - https://github.com/Expensify/App/issues/55304 - - https://github.com/Expensify/App/issues/63191 -- PR Introducing Patch: [#47203](https://github.com/Expensify/App/pull/47203) - -### [react-native+0.79.2+012+alert-style.patch](react-native+0.79.2+012+alert-style.patch) - -// TODO - -### [react-native+0.79.2+013+fixNavigationAnimations.patch](react-native+0.79.2+013+fixNavigationAnimations.patch) - -// TODO - -### [react-native+0.79.2+014+fixScrollViewState.patch](react-native+0.79.2+014+fixScrollViewState.patch) - -// TODO - -### [react-native+0.79.2+015+redactAppParameters.patch](react-native+0.79.2+015+redactAppParameters.patch) - -// TODO - -### [react-native+0.79.2+016+android-keyboard-avoiding-view.patch](react-native+0.79.2+016+android-keyboard-avoiding-view.patch) - -// TODO - -### [react-native+0.79.2+017+fix-mask-persisting-recycling.patch](react-native+0.79.2+017+fix-mask-persisting-recycling.patch) - -// TODO - -### [react-native+0.79.2+018+fix-text-selecting-on-change.patch](react-native+0.79.2+018+fix-text-selecting-on-change.patch) - -// TODO - -### [react-native+0.79.2+019+fix-scroll-view-jump.patch](react-native+0.79.2+019+fix-scroll-view-jump.patch) - -// TODO - -### [react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch](react-native+0.79.2+020+fix-dropping-mutations-in-transactions.patch) - -// TODO - -### [react-native+0.79.2+021+fix-crash-when-deleting-expense.patch](react-native+0.79.2+021+fix-crash-when-deleting-expense.patch) - -// TODO - -### [react-native+0.79.2+022+fix-surface-stopped-before-started.patch](react-native+0.79.2+022+fix-surface-stopped-before-started.patch) - -// TODO - -### [react-native+0.79.2+023+publish-gradle.patch](react-native+0.79.2+023+publish-gradle.patch) - -// TODO - -### [react-native+0.79.2+024+restore-old-line-height-algorithm.patch](react-native+0.79.2+024+restore-old-line-height-algorithm.patch) - -// TODO From 504c2d7978b763f13eee4fdacac13e47d08bb875 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 15 Jul 2025 13:23:39 +0700 Subject: [PATCH 11/11] add details.md entry for patch --- patches/react-native/details.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/patches/react-native/details.md b/patches/react-native/details.md index 66c1f2322689..33188e0c185a 100644 --- a/patches/react-native/details.md +++ b/patches/react-native/details.md @@ -74,10 +74,17 @@ ### [react-native+0.79.2+011+Add-onPaste-to-TextInput.patch](react-native+0.79.2+011+Add-onPaste-to-TextInput.patch) -- Reason: Adds onPaste event handler to TextInput component -- Upstream PR/issue: 🛑 -- E/App issue: 🛑 -- PR Introducing Patch: 🛑 +- Reasons: + - Adds `onPaste` callback to `TextInput` to support image pasting on native + - Fixes an issue where pasted image displays as binary text on some Android devices where rich clipboard data is stored in binary form + - Fixes an issue where pasting from WPS Office app crashes the app on Android where its content URI is not recognized by Android `ContentResolver` +- Upstream PR/issue: https://github.com/facebook/react-native/pull/45425 +- Upstream RFC: https://github.com/s77rt/discussions-and-proposals/blob/TextInput-onPaste/proposals/0000-textinput-onpaste.md +- E/App issue: + - https://github.com/Expensify/App/issues/41239 + - https://github.com/Expensify/App/issues/55304 + - https://github.com/Expensify/App/issues/63191 +- PR Introducing Patch: [#47203](https://github.com/Expensify/App/pull/47203) ### [react-native+0.79.2+012+alert-style.patch](react-native+0.79.2+012+alert-style.patch)