From 6a3cec539c70771c4371ad7bd196bfcbda9427a9 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Thu, 8 Aug 2024 21:27:30 +0000 Subject: [PATCH 1/5] Update version to 9.0.18-5 (cherry picked from commit ed162413d7304eedb2ca987dd11fa4e88268f55a) --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 87886d3cf86ee..05a5643c2e1ff 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -108,8 +108,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1009001804 - versionName "9.0.18-4" + versionCode 1009001805 + versionName "9.0.18-5" // Supported language variants must be declared here to avoid from being removed during the compilation. // This also helps us to not include unnecessary language variants in the APK. resConfigs "en", "es" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index c59b2f1c4c57d..d796dd2380db5 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 9.0.18.4 + 9.0.18.5 FullStory OrgId diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 846e39b023f71..3767cb4f23f8b 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 9.0.18.4 + 9.0.18.5 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index cef2faf314bc7..51989da082899 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 9.0.18 CFBundleVersion - 9.0.18.4 + 9.0.18.5 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index 4e406fe5108d7..e8345acb1414b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "9.0.18-4", + "version": "9.0.18-5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "9.0.18-4", + "version": "9.0.18-5", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e7477f06934dc..a42f7f7591957 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "9.0.18-4", + "version": "9.0.18-5", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 4c7edb408fb72a69f037e514d2967cef5a747563 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Thu, 8 Aug 2024 10:58:07 -1000 Subject: [PATCH 2/5] Merge pull request #47110 from Expensify/Rory-RevertImagePasting Revert PR #45722 (cherry picked from commit aa1430f07202e43b9c6d0ec334dfd4e8d79510ef) (CP triggered by roryabraham) --- src/components/Composer/index.native.tsx | 19 +++++++++++++++++-- src/components/Composer/types.ts | 3 +-- src/stories/Composer.stories.tsx | 5 ++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/components/Composer/index.native.tsx b/src/components/Composer/index.native.tsx index 4b791e8d10345..119ba52477391 100644 --- a/src/components/Composer/index.native.tsx +++ b/src/components/Composer/index.native.tsx @@ -1,9 +1,13 @@ import type {MarkdownStyle} from '@expensify/react-native-live-markdown'; import type {ForwardedRef} from 'react'; +<<<<<<< HEAD import React, {useCallback, useEffect, useMemo, useRef} from 'react'; import type {NativeSyntheticEvent, TextInput, TextInputPasteEventData} from 'react-native'; +======= +import React, {useCallback, useMemo, useRef} from 'react'; +import type {NativeSyntheticEvent, TextInput, TextInputChangeEventData} from 'react-native'; +>>>>>>> aa1430f (Merge pull request #47110 from Expensify/Rory-RevertImagePasting) import {StyleSheet} from 'react-native'; -import type {FileObject} from '@components/AttachmentModal'; import type {AnimatedMarkdownTextInputRef} from '@components/RNMarkdownTextInput'; import RNMarkdownTextInput from '@components/RNMarkdownTextInput'; import useMarkdownStyle from '@hooks/useMarkdownStyle'; @@ -20,9 +24,13 @@ const excludeReportMentionStyle: Array = ['mentionReport']; function Composer( { +<<<<<<< HEAD shouldClear = false, onClear = () => {}, onPasteFile = () => {}, +======= + onClear: onClearProp = () => {}, +>>>>>>> aa1430f (Merge pull request #47110 from Expensify/Rory-RevertImagePasting) isDisabled = false, maxLines, isComposerFullSize = false, @@ -66,6 +74,7 @@ function Composer( // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps }, []); +<<<<<<< HEAD const pasteFile = useCallback( (e: NativeSyntheticEvent) => { const clipboardContent = e.nativeEvent.items[0]; @@ -78,6 +87,13 @@ function Composer( onPasteFile(file); }, [onPasteFile], +======= + const onClear = useCallback( + ({nativeEvent}: NativeSyntheticEvent) => { + onClearProp(nativeEvent.text); + }, + [onClearProp], +>>>>>>> aa1430f (Merge pull request #47110 from Expensify/Rory-RevertImagePasting) ); useEffect(() => { @@ -108,7 +124,6 @@ function Composer( /* eslint-disable-next-line react/jsx-props-no-spreading */ {...props} readOnly={isDisabled} - onPaste={pasteFile} onBlur={(e) => { if (!isFocused) { // eslint-disable-next-line react-compiler/react-compiler diff --git a/src/components/Composer/types.ts b/src/components/Composer/types.ts index a2d0620212059..9c7a5a215c1c8 100644 --- a/src/components/Composer/types.ts +++ b/src/components/Composer/types.ts @@ -1,5 +1,4 @@ import type {NativeSyntheticEvent, StyleProp, TextInputProps, TextInputSelectionChangeEventData, TextStyle} from 'react-native'; -import type {FileObject} from '@components/AttachmentModal'; type TextSelection = { start: number; @@ -32,7 +31,7 @@ type ComposerProps = TextInputProps & { onChangeText?: (numberOfLines: string) => void; /** Callback method to handle pasting a file */ - onPasteFile?: (file: FileObject) => void; + onPasteFile?: (file: File) => void; /** General styles to apply to the text input */ // eslint-disable-next-line react/forbid-prop-types diff --git a/src/stories/Composer.stories.tsx b/src/stories/Composer.stories.tsx index a92dc0e789a0b..805f2b4c74484 100644 --- a/src/stories/Composer.stories.tsx +++ b/src/stories/Composer.stories.tsx @@ -3,7 +3,6 @@ import type {Meta} from '@storybook/react'; import {ExpensiMark} from 'expensify-common'; import React, {useState} from 'react'; import {Image, View} from 'react-native'; -import type {FileObject} from '@components/AttachmentModal'; import Composer from '@components/Composer'; import type {ComposerProps} from '@components/Composer/types'; import RenderHTML from '@components/RenderHTML'; @@ -30,7 +29,7 @@ const parser = new ExpensiMark(); function Default(props: ComposerProps) { const StyleUtils = useStyleUtils(); - const [pastedFile, setPastedFile] = useState(null); + const [pastedFile, setPastedFile] = useState(null); const [comment, setComment] = useState(props.defaultValue); const renderedHTML = parser.replace(comment ?? ''); @@ -54,7 +53,7 @@ function Default(props: ComposerProps) { Rendered Comment {!!renderedHTML && } - {!!pastedFile && pastedFile instanceof File && ( + {!!pastedFile && ( Date: Thu, 8 Aug 2024 14:36:29 -0700 Subject: [PATCH 3/5] Resolve conflicts --- src/components/Composer/index.native.tsx | 27 ------------------------ 1 file changed, 27 deletions(-) diff --git a/src/components/Composer/index.native.tsx b/src/components/Composer/index.native.tsx index 119ba52477391..157087f53c282 100644 --- a/src/components/Composer/index.native.tsx +++ b/src/components/Composer/index.native.tsx @@ -24,13 +24,8 @@ const excludeReportMentionStyle: Array = ['mentionReport']; function Composer( { -<<<<<<< HEAD shouldClear = false, onClear = () => {}, - onPasteFile = () => {}, -======= - onClear: onClearProp = () => {}, ->>>>>>> aa1430f (Merge pull request #47110 from Expensify/Rory-RevertImagePasting) isDisabled = false, maxLines, isComposerFullSize = false, @@ -74,28 +69,6 @@ function Composer( // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps }, []); -<<<<<<< HEAD - const pasteFile = useCallback( - (e: NativeSyntheticEvent) => { - const clipboardContent = e.nativeEvent.items[0]; - if (clipboardContent.type === 'text/plain') { - return; - } - const fileURI = clipboardContent.data; - const fileName = fileURI.split('/').pop(); - const file: FileObject = {uri: fileURI, name: fileName, type: clipboardContent.type}; - onPasteFile(file); - }, - [onPasteFile], -======= - const onClear = useCallback( - ({nativeEvent}: NativeSyntheticEvent) => { - onClearProp(nativeEvent.text); - }, - [onClearProp], ->>>>>>> aa1430f (Merge pull request #47110 from Expensify/Rory-RevertImagePasting) - ); - useEffect(() => { if (!shouldClear) { return; From b911df2fcb818e20609548543b4ff1b5d966a04e Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 8 Aug 2024 14:37:37 -0700 Subject: [PATCH 4/5] Resolve more conflicts --- src/components/Composer/index.native.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/Composer/index.native.tsx b/src/components/Composer/index.native.tsx index 157087f53c282..0d988e9e5c40f 100644 --- a/src/components/Composer/index.native.tsx +++ b/src/components/Composer/index.native.tsx @@ -1,12 +1,7 @@ import type {MarkdownStyle} from '@expensify/react-native-live-markdown'; import type {ForwardedRef} from 'react'; -<<<<<<< HEAD -import React, {useCallback, useEffect, useMemo, useRef} from 'react'; -import type {NativeSyntheticEvent, TextInput, TextInputPasteEventData} from 'react-native'; -======= import React, {useCallback, useMemo, useRef} from 'react'; -import type {NativeSyntheticEvent, TextInput, TextInputChangeEventData} from 'react-native'; ->>>>>>> aa1430f (Merge pull request #47110 from Expensify/Rory-RevertImagePasting) +import type {TextInput} from 'react-native'; import {StyleSheet} from 'react-native'; import type {AnimatedMarkdownTextInputRef} from '@components/RNMarkdownTextInput'; import RNMarkdownTextInput from '@components/RNMarkdownTextInput'; From 1148f995f270f44239fc1f6992f575ac2dd62b26 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Thu, 8 Aug 2024 23:14:01 +0000 Subject: [PATCH 5/5] Update version to 9.0.18-7 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- ios/NotificationServiceExtension/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 0afc4d53adefb..5ce340e50016d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -108,8 +108,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1009001806 - versionName "9.0.18-6" + versionCode 1009001807 + versionName "9.0.18-7" // Supported language variants must be declared here to avoid from being removed during the compilation. // This also helps us to not include unnecessary language variants in the APK. resConfigs "en", "es" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index f94d8335e4ad5..d7b048b5aa737 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 9.0.18.6 + 9.0.18.7 FullStory OrgId diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 4c231bbf6a741..3f4dcbc31cf2b 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 9.0.18.6 + 9.0.18.7 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index c95fa5836e2f6..898c436e6e795 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 9.0.18 CFBundleVersion - 9.0.18.6 + 9.0.18.7 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index cfa485a462bfe..bda41337c734d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "9.0.18-6", + "version": "9.0.18-7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "9.0.18-6", + "version": "9.0.18-7", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index d949efe9c58d5..fa9e3be6ac4f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "9.0.18-6", + "version": "9.0.18-7", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",