From fe3dc15fc86f7fe9bee6d6e1601ff8dea5d57e7b Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 30 Jan 2025 14:28:26 +0200 Subject: [PATCH 01/22] Disable bouncing --- packages/core/src/js/feedback/FeedbackForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.tsx b/packages/core/src/js/feedback/FeedbackForm.tsx index d8a295fa9b..61cf757410 100644 --- a/packages/core/src/js/feedback/FeedbackForm.tsx +++ b/packages/core/src/js/feedback/FeedbackForm.tsx @@ -131,7 +131,7 @@ export class FeedbackForm extends React.Component - + From 72eef2dc432da8062ccad0a51c4b8e801533d2f8 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 30 Jan 2025 14:28:51 +0200 Subject: [PATCH 02/22] Add modal ui appearance --- .../core/src/js/feedback/FeedbackForm.styles.ts | 16 +++++++++++++++- .../core/src/js/feedback/FeedbackForm.types.ts | 1 + .../core/src/js/feedback/FeedbackFormManager.tsx | 16 +++++++++------- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.styles.ts b/packages/core/src/js/feedback/FeedbackForm.styles.ts index 57d407adf3..5c742c037b 100644 --- a/packages/core/src/js/feedback/FeedbackForm.styles.ts +++ b/packages/core/src/js/feedback/FeedbackForm.styles.ts @@ -79,7 +79,21 @@ const defaultStyles: FeedbackFormStyles = { }, modalBackground: { flex: 1, - justifyContent: 'center', + justifyContent: 'flex-end', + backgroundColor: 'rgba(0, 0, 0, 0.8)', + }, + modalSheetContainer: { + backgroundColor: BACKROUND_COLOR, + borderTopLeftRadius: 16, + borderTopRightRadius: 16, + padding: 16, + alignSelf: 'stretch', + height: '98%', + shadowColor: '#000', + shadowOffset: { width: 0, height: -3 }, + shadowOpacity: 0.1, + shadowRadius: 4, + elevation: 5, }, }; diff --git a/packages/core/src/js/feedback/FeedbackForm.types.ts b/packages/core/src/js/feedback/FeedbackForm.types.ts index fbeee76896..c77bf2c6f7 100644 --- a/packages/core/src/js/feedback/FeedbackForm.types.ts +++ b/packages/core/src/js/feedback/FeedbackForm.types.ts @@ -205,6 +205,7 @@ export interface FeedbackFormStyles { titleContainer?: ViewStyle; sentryLogo?: ImageStyle; modalBackground?: ViewStyle; + modalSheetContainer?: ViewStyle; } /** diff --git a/packages/core/src/js/feedback/FeedbackFormManager.tsx b/packages/core/src/js/feedback/FeedbackFormManager.tsx index 4676f90258..db412e0acf 100644 --- a/packages/core/src/js/feedback/FeedbackFormManager.tsx +++ b/packages/core/src/js/feedback/FeedbackFormManager.tsx @@ -1,6 +1,6 @@ import { logger } from '@sentry/core'; import * as React from 'react'; -import { Modal, View } from 'react-native'; +import { Modal, SafeAreaView, View } from 'react-native'; import { FeedbackForm } from './FeedbackForm'; import defaultStyles from './FeedbackForm.styles'; @@ -70,12 +70,14 @@ class FeedbackFormProvider extends React.Component { {isVisible && ( - - - + + + + + )} From ccc808b5d2a8651d0950caacfafdc90929d1a952 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 30 Jan 2025 14:29:03 +0200 Subject: [PATCH 03/22] Update snapshot tests --- .../__snapshots__/FeedbackForm.test.tsx.snap | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/core/test/feedback/__snapshots__/FeedbackForm.test.tsx.snap b/packages/core/test/feedback/__snapshots__/FeedbackForm.test.tsx.snap index a642bd88da..a3c2857ac9 100644 --- a/packages/core/test/feedback/__snapshots__/FeedbackForm.test.tsx.snap +++ b/packages/core/test/feedback/__snapshots__/FeedbackForm.test.tsx.snap @@ -31,7 +31,9 @@ exports[`FeedbackForm matches the snapshot with custom styles 1`] = ` ] } > - + - + - + - + - + - + Date: Thu, 30 Jan 2025 16:17:09 +0200 Subject: [PATCH 04/22] Fix bottom margin --- packages/core/src/js/feedback/FeedbackForm.styles.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.styles.ts b/packages/core/src/js/feedback/FeedbackForm.styles.ts index 5c742c037b..cff6092d7b 100644 --- a/packages/core/src/js/feedback/FeedbackForm.styles.ts +++ b/packages/core/src/js/feedback/FeedbackForm.styles.ts @@ -87,8 +87,9 @@ const defaultStyles: FeedbackFormStyles = { borderTopLeftRadius: 16, borderTopRightRadius: 16, padding: 16, + marginBottom: -32, alignSelf: 'stretch', - height: '98%', + height: '100%', shadowColor: '#000', shadowOffset: { width: 0, height: -3 }, shadowOpacity: 0.1, From 9ecd8a20f2011b84f748694e7517611ff9e1b535 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 31 Jan 2025 14:01:25 +0200 Subject: [PATCH 05/22] Fix sheet height --- packages/core/src/js/feedback/FeedbackForm.styles.ts | 5 ++--- packages/core/src/js/feedback/FeedbackFormManager.tsx | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.styles.ts b/packages/core/src/js/feedback/FeedbackForm.styles.ts index cff6092d7b..97ffac4a20 100644 --- a/packages/core/src/js/feedback/FeedbackForm.styles.ts +++ b/packages/core/src/js/feedback/FeedbackForm.styles.ts @@ -80,16 +80,15 @@ const defaultStyles: FeedbackFormStyles = { modalBackground: { flex: 1, justifyContent: 'flex-end', - backgroundColor: 'rgba(0, 0, 0, 0.8)', + backgroundColor: 'rgba(0, 0, 0, 0.9)', }, modalSheetContainer: { backgroundColor: BACKROUND_COLOR, borderTopLeftRadius: 16, borderTopRightRadius: 16, padding: 16, - marginBottom: -32, alignSelf: 'stretch', - height: '100%', + height: '92%', shadowColor: '#000', shadowOffset: { width: 0, height: -3 }, shadowOpacity: 0.1, diff --git a/packages/core/src/js/feedback/FeedbackFormManager.tsx b/packages/core/src/js/feedback/FeedbackFormManager.tsx index db412e0acf..caf26d5fce 100644 --- a/packages/core/src/js/feedback/FeedbackFormManager.tsx +++ b/packages/core/src/js/feedback/FeedbackFormManager.tsx @@ -1,6 +1,6 @@ import { logger } from '@sentry/core'; import * as React from 'react'; -import { Modal, SafeAreaView, View } from 'react-native'; +import { Modal, View } from 'react-native'; import { FeedbackForm } from './FeedbackForm'; import defaultStyles from './FeedbackForm.styles'; @@ -70,14 +70,14 @@ class FeedbackFormProvider extends React.Component { {isVisible && ( - + - + )} From 05f94f85ceaad44f88c199b3371098c3065f1842 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 31 Jan 2025 14:12:01 +0200 Subject: [PATCH 06/22] Remove extra modal border --- packages/core/src/js/feedback/FeedbackForm.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.styles.ts b/packages/core/src/js/feedback/FeedbackForm.styles.ts index 97ffac4a20..d0944c8fc1 100644 --- a/packages/core/src/js/feedback/FeedbackForm.styles.ts +++ b/packages/core/src/js/feedback/FeedbackForm.styles.ts @@ -86,7 +86,7 @@ const defaultStyles: FeedbackFormStyles = { backgroundColor: BACKROUND_COLOR, borderTopLeftRadius: 16, borderTopRightRadius: 16, - padding: 16, + overflow: 'hidden', alignSelf: 'stretch', height: '92%', shadowColor: '#000', From d88a59910d4e4b67b7a0d7621c7bdf2454688912 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 31 Jan 2025 16:29:40 +0200 Subject: [PATCH 07/22] Do not expose modal styles --- .../src/js/feedback/FeedbackForm.styles.ts | 18 ------------------ .../core/src/js/feedback/FeedbackForm.types.ts | 2 -- 2 files changed, 20 deletions(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.styles.ts b/packages/core/src/js/feedback/FeedbackForm.styles.ts index d0944c8fc1..9cbbfab7f7 100644 --- a/packages/core/src/js/feedback/FeedbackForm.styles.ts +++ b/packages/core/src/js/feedback/FeedbackForm.styles.ts @@ -77,24 +77,6 @@ const defaultStyles: FeedbackFormStyles = { width: 40, height: 40, }, - modalBackground: { - flex: 1, - justifyContent: 'flex-end', - backgroundColor: 'rgba(0, 0, 0, 0.9)', - }, - modalSheetContainer: { - backgroundColor: BACKROUND_COLOR, - borderTopLeftRadius: 16, - borderTopRightRadius: 16, - overflow: 'hidden', - alignSelf: 'stretch', - height: '92%', - shadowColor: '#000', - shadowOffset: { width: 0, height: -3 }, - shadowOpacity: 0.1, - shadowRadius: 4, - elevation: 5, - }, }; export default defaultStyles; diff --git a/packages/core/src/js/feedback/FeedbackForm.types.ts b/packages/core/src/js/feedback/FeedbackForm.types.ts index c77bf2c6f7..cffe54447a 100644 --- a/packages/core/src/js/feedback/FeedbackForm.types.ts +++ b/packages/core/src/js/feedback/FeedbackForm.types.ts @@ -204,8 +204,6 @@ export interface FeedbackFormStyles { screenshotText?: TextStyle; titleContainer?: ViewStyle; sentryLogo?: ImageStyle; - modalBackground?: ViewStyle; - modalSheetContainer?: ViewStyle; } /** From ce1de86607d31502c42f827010b4bc9a49105da0 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 31 Jan 2025 16:46:51 +0200 Subject: [PATCH 08/22] Animate background color --- .../src/js/feedback/FeedbackForm.styles.ts | 29 +++++++++++++ .../src/js/feedback/FeedbackFormManager.tsx | 43 +++++++++++++++---- 2 files changed, 63 insertions(+), 9 deletions(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.styles.ts b/packages/core/src/js/feedback/FeedbackForm.styles.ts index 9cbbfab7f7..1e90af07c6 100644 --- a/packages/core/src/js/feedback/FeedbackForm.styles.ts +++ b/packages/core/src/js/feedback/FeedbackForm.styles.ts @@ -1,3 +1,5 @@ +import type { ViewStyle } from 'react-native'; + import type { FeedbackFormStyles } from './FeedbackForm.types'; const PURPLE = 'rgba(88, 74, 192, 1)'; @@ -79,4 +81,31 @@ const defaultStyles: FeedbackFormStyles = { }, }; +export const modalWrapper: ViewStyle = { + position: 'absolute', + top: 0, + left: 0, + right: 0, + bottom: 0, +}; + +export const modalBackground: ViewStyle = { + flex: 1, + justifyContent: 'flex-end', +}; + +export const modalSheetContainer: ViewStyle = { + backgroundColor: '#ffffff', + borderTopLeftRadius: 16, + borderTopRightRadius: 16, + overflow: 'hidden', + alignSelf: 'stretch', + height: '92%', + shadowColor: '#000', + shadowOffset: { width: 0, height: -3 }, + shadowOpacity: 0.1, + shadowRadius: 4, + elevation: 5, +}; + export default defaultStyles; diff --git a/packages/core/src/js/feedback/FeedbackFormManager.tsx b/packages/core/src/js/feedback/FeedbackFormManager.tsx index caf26d5fce..c6a31fcc70 100644 --- a/packages/core/src/js/feedback/FeedbackFormManager.tsx +++ b/packages/core/src/js/feedback/FeedbackFormManager.tsx @@ -1,9 +1,9 @@ import { logger } from '@sentry/core'; import * as React from 'react'; -import { Modal, View } from 'react-native'; +import { Animated, Modal, View } from 'react-native'; import { FeedbackForm } from './FeedbackForm'; -import defaultStyles from './FeedbackForm.styles'; +import { modalBackground, modalSheetContainer, modalWrapper } from './FeedbackForm.styles'; import type { FeedbackFormStyles } from './FeedbackForm.types'; import { getFeedbackOptions } from './integration'; import { isModalSupported } from './utils'; @@ -40,9 +40,15 @@ interface FeedbackFormProviderProps { styles?: FeedbackFormStyles; } +interface FeedbackFormProviderState { + isVisible: boolean; + backgroundOpacity: Animated.Value; +} + class FeedbackFormProvider extends React.Component { - public state = { + public state: FeedbackFormProviderState = { isVisible: false, + backgroundOpacity: new Animated.Value(0), }; public constructor(props: FeedbackFormProviderProps) { @@ -50,6 +56,21 @@ class FeedbackFormProvider extends React.Component { FeedbackFormManager.initialize(this._setVisibilityFunction); } + /** + * Animates the background opacity when the modal is shown. + */ + public componentDidUpdate(_prevProps: any, prevState: FeedbackFormProviderState): void { + if (!prevState.isVisible && this.state.isVisible) { + Animated.timing(this.state.backgroundOpacity, { + toValue: 1, + duration: 300, + useNativeDriver: true, + }).start(); + } else if (prevState.isVisible && !this.state.isVisible) { + this.state.backgroundOpacity.setValue(0); + } + } + /** * Renders the feedback form modal. */ @@ -59,8 +80,12 @@ class FeedbackFormProvider extends React.Component { return <>{this.props.children}; } - const { isVisible } = this.state; - const styles: FeedbackFormStyles = { ...defaultStyles, ...this.props.styles }; + const { isVisible, backgroundOpacity } = this.state; + + const backgroundColor = backgroundOpacity.interpolate({ + inputRange: [0, 1], + outputRange: ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.9)'], + }); // Wrapping the `Modal` component in a `View` component is necessary to avoid // issues like https://github.com/software-mansion/react-native-reanimated/issues/6035 @@ -68,10 +93,10 @@ class FeedbackFormProvider extends React.Component { <> {this.props.children} {isVisible && ( - + - - + + { - + )} ); From a7a4e56ddd257781b6905ae51e706b1343042049 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 31 Jan 2025 18:57:59 +0200 Subject: [PATCH 09/22] Avoid keyboard in modal --- packages/core/src/js/feedback/FeedbackForm.tsx | 6 +++++- packages/core/src/js/feedback/FeedbackFormManager.tsx | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.tsx b/packages/core/src/js/feedback/FeedbackForm.tsx index 61cf757410..5b8dc28b70 100644 --- a/packages/core/src/js/feedback/FeedbackForm.tsx +++ b/packages/core/src/js/feedback/FeedbackForm.tsx @@ -7,6 +7,7 @@ import { Image, Keyboard, KeyboardAvoidingView, + Platform, SafeAreaView, ScrollView, Text, @@ -130,7 +131,10 @@ export class FeedbackForm extends React.Component - + diff --git a/packages/core/src/js/feedback/FeedbackFormManager.tsx b/packages/core/src/js/feedback/FeedbackFormManager.tsx index c6a31fcc70..b7b9f9fe55 100644 --- a/packages/core/src/js/feedback/FeedbackFormManager.tsx +++ b/packages/core/src/js/feedback/FeedbackFormManager.tsx @@ -1,6 +1,6 @@ import { logger } from '@sentry/core'; import * as React from 'react'; -import { Animated, Modal, View } from 'react-native'; +import { Animated, KeyboardAvoidingView, Modal, Platform, View } from 'react-native'; import { FeedbackForm } from './FeedbackForm'; import { modalBackground, modalSheetContainer, modalWrapper } from './FeedbackForm.styles'; @@ -95,14 +95,17 @@ class FeedbackFormProvider extends React.Component { {isVisible && ( - + - + )} From c4d502edde307d60f60323078b1eddb7c135c312 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 11 Feb 2025 11:31:24 +0200 Subject: [PATCH 10/22] Use Image Picker interface matching `expo-image-picker` and `react-native-image-picker` --- .../core/src/js/feedback/FeedbackForm.tsx | 43 ++++++++++++++---- .../src/js/feedback/FeedbackForm.types.ts | 45 ++++++++++++++++++- packages/core/src/js/feedback/utils.ts | 30 +++++++++++++ yarn.lock | 34 ++++++++------ 4 files changed, 130 insertions(+), 22 deletions(-) diff --git a/packages/core/src/js/feedback/FeedbackForm.tsx b/packages/core/src/js/feedback/FeedbackForm.tsx index 5b8dc28b70..236a93ab12 100644 --- a/packages/core/src/js/feedback/FeedbackForm.tsx +++ b/packages/core/src/js/feedback/FeedbackForm.tsx @@ -20,8 +20,8 @@ import { import { sentryLogo } from './branding'; import { defaultConfiguration } from './defaults'; import defaultStyles from './FeedbackForm.styles'; -import type { FeedbackFormProps, FeedbackFormState, FeedbackFormStyles,FeedbackGeneralConfiguration, FeedbackTextConfiguration } from './FeedbackForm.types'; -import { isValidEmail } from './utils'; +import type { FeedbackFormProps, FeedbackFormState, FeedbackFormStyles, FeedbackGeneralConfiguration, FeedbackTextConfiguration, ImagePickerConfiguration } from './FeedbackForm.types'; +import { base64ToUint8Array, isValidEmail } from './utils'; /** * @beta @@ -100,12 +100,38 @@ export class FeedbackForm extends React.Component void = () => { + public onScreenshotButtonPress: () => void = async () => { if (!this.state.filename && !this.state.attachment) { - const { onAddScreenshot } = { ...defaultConfiguration, ...this.props }; - onAddScreenshot((filename: string, attachement: Uint8Array) => { - this.setState({ filename, attachment: attachement }); - }); + const imagePickerConfiguration: ImagePickerConfiguration = this.props; + if (imagePickerConfiguration.imagePicker && imagePickerConfiguration.imagePicker.launchImageLibraryAsync) { + // expo-image-picker library is available + const result = await imagePickerConfiguration.imagePicker.launchImageLibraryAsync({ + mediaTypes: ['images'], base64: true + }); + if (!result.canceled) { + const filename = result.assets[0].fileName; + const attachement = base64ToUint8Array(result.assets[0].base64); + this.setState({ filename, attachment: attachement }); + } + } else if (imagePickerConfiguration.imagePicker && imagePickerConfiguration.imagePicker.launchImageLibrary) { + // react-native-image-picker library is available + const result = await imagePickerConfiguration.imagePicker.launchImageLibrary({ + mediaType: 'photo', includeBase64: true + }); + if (!result.didCancel && !result.errorCode) { + const filename = result.assets[0].fileName; + const attachement = base64ToUint8Array(result.assets[0].base64); + this.setState({ filename, attachment: attachement }); + } + } else { + logger.warn('No image picker library found. Please provide an image picker library to use this feature.'); + + // Defaulting to the onAddScreenshot callback + const { onAddScreenshot } = { ...defaultConfiguration, ...this.props }; + onAddScreenshot((filename: string, attachement: Uint8Array) => { + this.setState({ filename, attachment: attachement }); + }); + } } else { this.setState({ filename: undefined, attachment: undefined }); } @@ -118,6 +144,7 @@ export class FeedbackForm extends React.Component { @@ -191,7 +218,7 @@ export class FeedbackForm extends React.Component this.setState({ description: value })} multiline /> - {config.enableScreenshot && ( + {(config.enableScreenshot || imagePickerConfiguration.imagePicker) && ( {!this.state.filename && !this.state.attachment diff --git a/packages/core/src/js/feedback/FeedbackForm.types.ts b/packages/core/src/js/feedback/FeedbackForm.types.ts index cffe54447a..4300e7ebb8 100644 --- a/packages/core/src/js/feedback/FeedbackForm.types.ts +++ b/packages/core/src/js/feedback/FeedbackForm.types.ts @@ -4,7 +4,11 @@ import type { ImageStyle, TextStyle, ViewStyle } from 'react-native'; /** * The props for the feedback form */ -export interface FeedbackFormProps extends FeedbackGeneralConfiguration, FeedbackTextConfiguration, FeedbackCallbacks { +export interface FeedbackFormProps + extends FeedbackGeneralConfiguration, + FeedbackTextConfiguration, + FeedbackCallbacks, + ImagePickerConfiguration { styles?: FeedbackFormStyles; } @@ -187,6 +191,45 @@ export interface FeedbackCallbacks { onFormSubmitted?: () => void; } +/** + * Image Picker configuration interfact matching `expo-image-picker` and `react-native-image-picker` + */ +export interface ImagePickerConfiguration { + imagePicker?: ImagePicker; +} + +interface ExpoImagePickerResponse { + canceled?: boolean; + assets?: ImagePickerAsset[]; +} + +interface ReactNativeImagePickerResponse { + didCancel?: boolean; + errorCode?: string; + assets?: ImagePickerAsset[]; +} + +interface ImagePickerAsset { + fileName?: string; + base64?: string; +} + +interface ExpoImageLibraryOptions { + mediaTypes?: any[]; + base64?: boolean; +} + +interface ReactNativeImageLibraryOptions { + mediaType: any; + includeBase64?: boolean; +} + +interface ImagePicker { + launchImageLibraryAsync?: (options?: ExpoImageLibraryOptions) => Promise; + + launchImageLibrary?: (options: ReactNativeImageLibraryOptions) => Promise; +} + /** * The styles for the feedback form */ diff --git a/packages/core/src/js/feedback/utils.ts b/packages/core/src/js/feedback/utils.ts index b27fb3ea8d..3e5bc15dc0 100644 --- a/packages/core/src/js/feedback/utils.ts +++ b/packages/core/src/js/feedback/utils.ts @@ -14,3 +14,33 @@ export const isValidEmail = (email: string): boolean => { const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; return emailRegex.test(email); }; + +/* eslint-disable no-bitwise */ +export const base64ToUint8Array = (base64?: string): Uint8Array | undefined => { + if (!base64) return undefined; + + const cleanedBase64 = base64.replace(/^data:.*;base64,/, ''); // Remove any prefix before the base64 string + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + const bytes: number[] = []; + + let buffer = 0; + let bits = 0; + + for (const char of cleanedBase64) { + if (char === '=') break; + + const value = chars.indexOf(char); // Validate each character + if (value === -1) return undefined; + + buffer = (buffer << 6) | value; // Shift 6 bits to the left and add the value + bits += 6; + + if (bits >= 8) { + // Add a byte when we have 8 or more bits + bits -= 8; + bytes.push((buffer >> bits) & 0xff); + } + } + + return new Uint8Array(bytes); +}; diff --git a/yarn.lock b/yarn.lock index 73ef62958c..f29bc21f66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14686,6 +14686,26 @@ __metadata: languageName: node linkType: hard +"expo-image-loader@npm:~5.0.0": + version: 5.0.0 + resolution: "expo-image-loader@npm:5.0.0" + peerDependencies: + expo: "*" + checksum: 7741b4b926124a1f85e51b0b8c8c9adc37fccf0654eaa0e715cb55cffc716bdc149c0421120f9bec69a69643d3328ec8562899b4aa37a0fdcecfb6fe3cf6f985 + languageName: node + linkType: hard + +"expo-image-picker@npm:~16.0.5": + version: 16.0.5 + resolution: "expo-image-picker@npm:16.0.5" + dependencies: + expo-image-loader: ~5.0.0 + peerDependencies: + expo: "*" + checksum: 8391455480d07a2fa785a0246b8eb892d393e64173f4663d77ee26bc497a0f52d9e1690b0fa04094d03ada8cc78aa5477505d870bdcbdb05d5c48c791ddac168 + languageName: node + linkType: hard + "expo-keep-awake@npm:~14.0.1": version: 14.0.1 resolution: "expo-keep-awake@npm:14.0.1" @@ -22988,18 +23008,6 @@ __metadata: languageName: node linkType: hard -"react-native-quick-base64@npm:^2.1.2": - version: 2.1.2 - resolution: "react-native-quick-base64@npm:2.1.2" - dependencies: - base64-js: ^1.5.1 - peerDependencies: - react: "*" - react-native: "*" - checksum: 46f3b26f48b26978686b0c043336220d681e6a02af5abcf3eb4ab7b9216251d1eb2fac5c559e984d963e93f54bd9f323651daac09762196815558abbd551729b - languageName: node - linkType: hard - "react-native-reanimated@npm:3.16.7": version: 3.16.7 resolution: "react-native-reanimated@npm:3.16.7" @@ -24599,6 +24607,7 @@ __metadata: "@types/react": ~18.3.12 expo: ^52.0.0 expo-constants: ~17.0.3 + expo-image-picker: ~16.0.5 expo-linking: ~7.0.2 expo-router: ~4.0.5 expo-status-bar: ~2.0.0 @@ -24695,7 +24704,6 @@ __metadata: react-native: 0.77.0 react-native-gesture-handler: ^2.22.1 react-native-image-picker: ^7.2.2 - react-native-quick-base64: ^2.1.2 react-native-reanimated: 3.16.7 react-native-safe-area-context: 5.2.0 react-native-screens: 4.6.0 From 1b74b45d5b497f0fc0e13315b07db373b0f26be7 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 11 Feb 2025 11:32:00 +0200 Subject: [PATCH 11/22] Update samples to pass the ImagePicker library implementation --- samples/expo/app/(tabs)/index.tsx | 6 ++++++ samples/expo/app/_layout.tsx | 4 ++++ samples/expo/package.json | 1 + samples/react-native/package.json | 1 - samples/react-native/src/App.tsx | 22 ++-------------------- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/samples/expo/app/(tabs)/index.tsx b/samples/expo/app/(tabs)/index.tsx index 952f21ca44..6c8d39a0c5 100644 --- a/samples/expo/app/(tabs)/index.tsx +++ b/samples/expo/app/(tabs)/index.tsx @@ -57,6 +57,12 @@ export default function TabOneScreen() { Sentry.nativeCrash(); }} /> +