From afa663b0602fc19a48acd666044bf3ce23c10a7c Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:51:17 +0200 Subject: [PATCH 1/7] revert color pick for ereceipt and fix doubling mcc and trip icon --- src/components/EReceiptThumbnail.tsx | 6 +++--- src/libs/TripReservationUtils.ts | 18 +++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/components/EReceiptThumbnail.tsx b/src/components/EReceiptThumbnail.tsx index a8d636db460b..8e0f589cc34d 100644 --- a/src/components/EReceiptThumbnail.tsx +++ b/src/components/EReceiptThumbnail.tsx @@ -57,8 +57,7 @@ const backgroundImages = { function EReceiptThumbnail({transaction, borderRadius, fileExtension, isReceiptThumbnail = false, centerIconV = true, iconSize = 'large'}: EReceiptThumbnailProps) { const styles = useThemeStyles(); const StyleUtils = useStyleUtils(); - const {tripIcon, tripBGColor} = TripReservationUtils.getTripEReceiptData(transaction); - const colorCode = tripBGColor ?? (isReceiptThumbnail ? StyleUtils.getFileExtensionColorCode(fileExtension) : StyleUtils.getEReceiptColorCode(transaction)); + const colorCode = isReceiptThumbnail ? StyleUtils.getFileExtensionColorCode(fileExtension) : StyleUtils.getEReceiptColorCode(transaction); const backgroundImage = useMemo(() => backgroundImages[colorCode], [colorCode]); @@ -68,6 +67,7 @@ function EReceiptThumbnail({transaction, borderRadius, fileExtension, isReceiptT const transactionDetails = ReportUtils.getTransactionDetails(transaction); const transactionMCCGroup = transactionDetails?.mccGroup; const MCCIcon = transactionMCCGroup ? MCCIcons[`${transactionMCCGroup}`] : undefined; + const tripIcon = TripReservationUtils.getTripEReceiptIcon(transaction); let receiptIconWidth: number = variables.eReceiptIconWidth; let receiptIconHeight: number = variables.eReceiptIconHeight; @@ -143,7 +143,7 @@ function EReceiptThumbnail({transaction, borderRadius, fileExtension, isReceiptT fill={primaryColor} /> ) : null} - {tripIcon ? ( + {!MCCIcon && tripIcon ? ( Date: Mon, 15 Jul 2024 09:37:58 +0200 Subject: [PATCH 2/7] fix lint --- src/libs/TripReservationUtils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/TripReservationUtils.ts b/src/libs/TripReservationUtils.ts index 048d7ecaf082..13bc3293cd9d 100644 --- a/src/libs/TripReservationUtils.ts +++ b/src/libs/TripReservationUtils.ts @@ -1,4 +1,3 @@ -import type {EReceiptColorName} from '@styles/utils/types'; import * as Expensicons from '@src/components/Icon/Expensicons'; import CONST from '@src/CONST'; import type {Reservation, ReservationType} from '@src/types/onyx/Transaction'; From 130d400ab84e65911db9cfdaab679b8abaa9635a Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Mon, 15 Jul 2024 19:13:20 +0200 Subject: [PATCH 3/7] add patch for font scalling in react-native --- ...17+iOS-fix-whitespace-support-sourcemap.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch b/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch index e8ca87026282..9199c7d322ae 100644 --- a/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch +++ b/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch @@ -1,3 +1,19 @@ +diff --git a/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m b/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m +index ee391a2..cdd6358 100644 +--- a/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m ++++ b/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m +@@ -19,6 +19,11 @@ - (void)scaleFontSizeToFitSize:(CGSize)size + minimumFontSize:(CGFloat)minimumFontSize + maximumFontSize:(CGFloat)maximumFontSize + { ++ // Don't scale the font if it already fits ++ if ([self compareToSize:size thresholdRatio:0.01] & RCTTextSizeComparisonSmaller) { ++ return; ++ } ++ + CGFloat bottomRatio = 1.0 / 128.0; + CGFloat topRatio = 128.0; + CGFloat ratio = 1.0; diff --git a/node_modules/react-native/scripts/react-native-xcode.sh b/node_modules/react-native/scripts/react-native-xcode.sh index d6c382b..3e1742c 100755 --- a/node_modules/react-native/scripts/react-native-xcode.sh From 45c620adfd35860e4337e6bb9998020dc0c41e78 Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:52:39 +0200 Subject: [PATCH 4/7] Revert "add patch for font scalling in react-native" This reverts commit 130d400ab84e65911db9cfdaab679b8abaa9635a. revert modifying patch --- ...17+iOS-fix-whitespace-support-sourcemap.patch | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch b/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch index 9199c7d322ae..e8ca87026282 100644 --- a/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch +++ b/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch @@ -1,19 +1,3 @@ -diff --git a/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m b/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m -index ee391a2..cdd6358 100644 ---- a/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m -+++ b/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m -@@ -19,6 +19,11 @@ - (void)scaleFontSizeToFitSize:(CGSize)size - minimumFontSize:(CGFloat)minimumFontSize - maximumFontSize:(CGFloat)maximumFontSize - { -+ // Don't scale the font if it already fits -+ if ([self compareToSize:size thresholdRatio:0.01] & RCTTextSizeComparisonSmaller) { -+ return; -+ } -+ - CGFloat bottomRatio = 1.0 / 128.0; - CGFloat topRatio = 128.0; - CGFloat ratio = 1.0; diff --git a/node_modules/react-native/scripts/react-native-xcode.sh b/node_modules/react-native/scripts/react-native-xcode.sh index d6c382b..3e1742c 100755 --- a/node_modules/react-native/scripts/react-native-xcode.sh From 1093c34cfbf7fccf04bf615a6d75fb262291485c Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Wed, 17 Jul 2024 23:20:52 +0200 Subject: [PATCH 5/7] create patch as a separate file --- ...ix-adjustFontSizeToFit-new-architecture.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 patches/react-native+0.73.4+018+iOS-fix-adjustFontSizeToFit-new-architecture.patch diff --git a/patches/react-native+0.73.4+018+iOS-fix-adjustFontSizeToFit-new-architecture.patch b/patches/react-native+0.73.4+018+iOS-fix-adjustFontSizeToFit-new-architecture.patch new file mode 100644 index 000000000000..7fe379f6da2c --- /dev/null +++ b/patches/react-native+0.73.4+018+iOS-fix-adjustFontSizeToFit-new-architecture.patch @@ -0,0 +1,16 @@ +diff --git a/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m b/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m +index ee391a2..cdd6358 100644 +--- a/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m ++++ b/node_modules/react-native/Libraries/Text/Text/NSTextStorage+FontScaling.m +@@ -19,6 +19,11 @@ - (void)scaleFontSizeToFitSize:(CGSize)size + minimumFontSize:(CGFloat)minimumFontSize + maximumFontSize:(CGFloat)maximumFontSize + { ++ // Don't scale the font if it already fits ++ if ([self compareToSize:size thresholdRatio:0.01] & RCTTextSizeComparisonSmaller) { ++ return; ++ } ++ + CGFloat bottomRatio = 1.0 / 128.0; + CGFloat topRatio = 128.0; + CGFloat ratio = 1.0; From c91d1aac8ecbfbfce91b72bde1276aca74961e61 Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:42:08 +0200 Subject: [PATCH 6/7] rename react-native patches to fix their ordering --- ....4+014+fixPath.patch => react-native+0.73.4+015+fixPath.patch} | 0 ...react-native+0.73.4+016+iOSCoreAnimationBorderRendering.patch} | 0 ...Clone.patch => react-native+0.73.4+017+copyStateOnClone.patch} | 0 ...ash.patch => react-native+0.73.4+018+fixIOSWebViewCrash.patch} | 0 ...mojis.patch => react-native+0.73.4+019+fixClippedEmojis.patch} | 0 ...=> react-native+0.73.4+020+iOS-textinput-onscroll-event.patch} | 0 ...-native+0.73.4+021+iOS-fix-whitespace-support-sourcemap.patch} | 0 ...utClear.patch => react-native+0.73.4+022+textInputClear.patch} | 0 ...0.73.4+023+iOS-fix-adjustFontSizeToFit-new-architecture.patch} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename patches/{react-native+0.73.4+014+fixPath.patch => react-native+0.73.4+015+fixPath.patch} (100%) rename patches/{react-native+0.73.4+014+iOSCoreAnimationBorderRendering.patch => react-native+0.73.4+016+iOSCoreAnimationBorderRendering.patch} (100%) rename patches/{react-native+0.73.4+015+copyStateOnClone.patch => react-native+0.73.4+017+copyStateOnClone.patch} (100%) rename patches/{react-native+0.73.4+015+fixIOSWebViewCrash.patch => react-native+0.73.4+018+fixIOSWebViewCrash.patch} (100%) rename patches/{react-native+0.73.4+016+fixClippedEmojis.patch => react-native+0.73.4+019+fixClippedEmojis.patch} (100%) rename patches/{react-native+0.73.4+016+iOS-textinput-onscroll-event.patch => react-native+0.73.4+020+iOS-textinput-onscroll-event.patch} (100%) rename patches/{react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch => react-native+0.73.4+021+iOS-fix-whitespace-support-sourcemap.patch} (100%) rename patches/{react-native+0.73.4+018+textInputClear.patch => react-native+0.73.4+022+textInputClear.patch} (100%) rename patches/{react-native+0.73.4+018+iOS-fix-adjustFontSizeToFit-new-architecture.patch => react-native+0.73.4+023+iOS-fix-adjustFontSizeToFit-new-architecture.patch} (100%) diff --git a/patches/react-native+0.73.4+014+fixPath.patch b/patches/react-native+0.73.4+015+fixPath.patch similarity index 100% rename from patches/react-native+0.73.4+014+fixPath.patch rename to patches/react-native+0.73.4+015+fixPath.patch diff --git a/patches/react-native+0.73.4+014+iOSCoreAnimationBorderRendering.patch b/patches/react-native+0.73.4+016+iOSCoreAnimationBorderRendering.patch similarity index 100% rename from patches/react-native+0.73.4+014+iOSCoreAnimationBorderRendering.patch rename to patches/react-native+0.73.4+016+iOSCoreAnimationBorderRendering.patch diff --git a/patches/react-native+0.73.4+015+copyStateOnClone.patch b/patches/react-native+0.73.4+017+copyStateOnClone.patch similarity index 100% rename from patches/react-native+0.73.4+015+copyStateOnClone.patch rename to patches/react-native+0.73.4+017+copyStateOnClone.patch diff --git a/patches/react-native+0.73.4+015+fixIOSWebViewCrash.patch b/patches/react-native+0.73.4+018+fixIOSWebViewCrash.patch similarity index 100% rename from patches/react-native+0.73.4+015+fixIOSWebViewCrash.patch rename to patches/react-native+0.73.4+018+fixIOSWebViewCrash.patch diff --git a/patches/react-native+0.73.4+016+fixClippedEmojis.patch b/patches/react-native+0.73.4+019+fixClippedEmojis.patch similarity index 100% rename from patches/react-native+0.73.4+016+fixClippedEmojis.patch rename to patches/react-native+0.73.4+019+fixClippedEmojis.patch diff --git a/patches/react-native+0.73.4+016+iOS-textinput-onscroll-event.patch b/patches/react-native+0.73.4+020+iOS-textinput-onscroll-event.patch similarity index 100% rename from patches/react-native+0.73.4+016+iOS-textinput-onscroll-event.patch rename to patches/react-native+0.73.4+020+iOS-textinput-onscroll-event.patch diff --git a/patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch b/patches/react-native+0.73.4+021+iOS-fix-whitespace-support-sourcemap.patch similarity index 100% rename from patches/react-native+0.73.4+017+iOS-fix-whitespace-support-sourcemap.patch rename to patches/react-native+0.73.4+021+iOS-fix-whitespace-support-sourcemap.patch diff --git a/patches/react-native+0.73.4+018+textInputClear.patch b/patches/react-native+0.73.4+022+textInputClear.patch similarity index 100% rename from patches/react-native+0.73.4+018+textInputClear.patch rename to patches/react-native+0.73.4+022+textInputClear.patch diff --git a/patches/react-native+0.73.4+018+iOS-fix-adjustFontSizeToFit-new-architecture.patch b/patches/react-native+0.73.4+023+iOS-fix-adjustFontSizeToFit-new-architecture.patch similarity index 100% rename from patches/react-native+0.73.4+018+iOS-fix-adjustFontSizeToFit-new-architecture.patch rename to patches/react-native+0.73.4+023+iOS-fix-adjustFontSizeToFit-new-architecture.patch From 454736164569a3b286b6c403d27c68c7ffa1491a Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:53:59 +0200 Subject: [PATCH 7/7] rename other patches that weren't ordered correctly --- ...ealthcheck+0.0.0-experimental-b130d5f-20240625+002+json.patch} | 0 ...xperimental-b130d5f-20240625+003+enable-ref-identifiers.patch} | 0 ....8.1.patch => react-native-reanimated+3.8.1+001+initial.patch} | 0 ... react-native-reanimated+3.8.1+002+fix-boost-dependency.patch} | 0 ...e.patch => react-native-reanimated+3.8.1+003+copy-state.patch} | 0 ...ch => react-native-reanimated+3.8.1+004+fix-strict-mode.patch} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename patches/{react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+001+json.patch => react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+002+json.patch} (100%) rename patches/{react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+002+enable-ref-identifiers.patch => react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+003+enable-ref-identifiers.patch} (100%) rename patches/{react-native-reanimated+3.8.1.patch => react-native-reanimated+3.8.1+001+initial.patch} (100%) rename patches/{react-native-reanimated+3.8.1+001+fix-boost-dependency.patch => react-native-reanimated+3.8.1+002+fix-boost-dependency.patch} (100%) rename patches/{react-native-reanimated+3.8.1+002+copy-state.patch => react-native-reanimated+3.8.1+003+copy-state.patch} (100%) rename patches/{react-native-reanimated+3.8.1+003+fix-strict-mode.patch => react-native-reanimated+3.8.1+004+fix-strict-mode.patch} (100%) diff --git a/patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+001+json.patch b/patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+002+json.patch similarity index 100% rename from patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+001+json.patch rename to patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+002+json.patch diff --git a/patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+002+enable-ref-identifiers.patch b/patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+003+enable-ref-identifiers.patch similarity index 100% rename from patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+002+enable-ref-identifiers.patch rename to patches/react-compiler-healthcheck+0.0.0-experimental-b130d5f-20240625+003+enable-ref-identifiers.patch diff --git a/patches/react-native-reanimated+3.8.1.patch b/patches/react-native-reanimated+3.8.1+001+initial.patch similarity index 100% rename from patches/react-native-reanimated+3.8.1.patch rename to patches/react-native-reanimated+3.8.1+001+initial.patch diff --git a/patches/react-native-reanimated+3.8.1+001+fix-boost-dependency.patch b/patches/react-native-reanimated+3.8.1+002+fix-boost-dependency.patch similarity index 100% rename from patches/react-native-reanimated+3.8.1+001+fix-boost-dependency.patch rename to patches/react-native-reanimated+3.8.1+002+fix-boost-dependency.patch diff --git a/patches/react-native-reanimated+3.8.1+002+copy-state.patch b/patches/react-native-reanimated+3.8.1+003+copy-state.patch similarity index 100% rename from patches/react-native-reanimated+3.8.1+002+copy-state.patch rename to patches/react-native-reanimated+3.8.1+003+copy-state.patch diff --git a/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch b/patches/react-native-reanimated+3.8.1+004+fix-strict-mode.patch similarity index 100% rename from patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch rename to patches/react-native-reanimated+3.8.1+004+fix-strict-mode.patch