Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fe3dc15
Disable bouncing
antonis Jan 30, 2025
72eef2d
Add modal ui appearance
antonis Jan 30, 2025
ccc808b
Update snapshot tests
antonis Jan 30, 2025
fd47fd2
Fix bottom margin
antonis Jan 30, 2025
dcc5d3b
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis Jan 31, 2025
9ecd8a2
Fix sheet height
antonis Jan 31, 2025
05f94f8
Remove extra modal border
antonis Jan 31, 2025
d88a599
Do not expose modal styles
antonis Jan 31, 2025
ce1de86
Animate background color
antonis Jan 31, 2025
a7a4e56
Avoid keyboard in modal
antonis Jan 31, 2025
8779886
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis Feb 3, 2025
ae80f7d
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis Feb 7, 2025
488658e
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis Feb 10, 2025
c4d502e
Use Image Picker interface matching `expo-image-picker` and `react-na…
antonis Feb 11, 2025
1b74b45
Update samples to pass the ImagePicker library implementation
antonis Feb 11, 2025
1d8a0db
Merge branch 'feedback-ui' into antonis/feedback-ui-imagepicker-integ…
antonis Feb 11, 2025
a0f4a77
Get image data from uri
antonis Feb 11, 2025
357dea8
Add early return and dev note
antonis Feb 11, 2025
192220b
Adds tests
antonis Feb 11, 2025
c3991ff
Adds sample expo plugin configuration
antonis Feb 11, 2025
91e96de
Merge branch 'feedback-ui' into antonis/feedback-ui-imagepicker-integ…
antonis Feb 11, 2025
6666cf6
Update media type for expo
antonis Feb 12, 2025
d1e5107
Update media type for rn
antonis Feb 12, 2025
d780fc1
Add native implementation for getDataFromUri
antonis Feb 13, 2025
85dff80
Bumped to the latest react-native-image-picker version 8
antonis Feb 13, 2025
e92fea6
Add missing null in return type
antonis Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update samples to pass the ImagePicker library implementation
  • Loading branch information
antonis committed Feb 11, 2025
commit 1b74b45d5b497f0fc0e13315b07db373b0f26be7
6 changes: 6 additions & 0 deletions samples/expo/app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ export default function TabOneScreen() {
Sentry.nativeCrash();
}}
/>
<Button
title="Show feedback form"
onPress={() => {
Sentry.showFeedbackForm();
}}
/>
<Button
title="Set Scope Properties"
onPress={() => {
Expand Down
4 changes: 4 additions & 0 deletions samples/expo/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ErrorEvent } from '@sentry/core';
import { isExpoGo } from '../utils/isExpoGo';
import { LogBox } from 'react-native';
import { isWeb } from '../utils/isWeb';
import * as ImagePicker from 'expo-image-picker';

export {
// Catch any errors thrown by the Layout component.
Expand Down Expand Up @@ -57,6 +58,9 @@ Sentry.init({
}),
navigationIntegration,
Sentry.reactNativeTracingIntegration(),
Sentry.feedbackIntegration({
imagePicker: ImagePicker,
}),
);
if (isWeb()) {
integrations.push(Sentry.browserReplayIntegration());
Expand Down
1 change: 1 addition & 0 deletions samples/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@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",
Expand Down
1 change: 0 additions & 1 deletion samples/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"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",
Expand Down
22 changes: 2 additions & 20 deletions samples/react-native/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ import { ErrorEvent } from '@sentry/core';
import HeavyNavigationScreen from './Screens/HeavyNavigationScreen';
import WebviewScreen from './Screens/WebviewScreen';
import { isTurboModuleEnabled } from '@sentry/react-native/dist/js/utils/environment';
import { toByteArray } from 'react-native-quick-base64';
import { launchImageLibrary } from 'react-native-image-picker';
import * as ImagePicker from 'react-native-image-picker';

if (typeof setImmediate === 'undefined') {
require('setimmediate');
Expand Down Expand Up @@ -107,6 +106,7 @@ Sentry.init({
: true,
}),
Sentry.feedbackIntegration({
imagePicker: ImagePicker,
styles:{
submitButton: {
backgroundColor: '#6a1b9a',
Expand Down Expand Up @@ -153,23 +153,6 @@ const Stack = isMobileOs
: createStackNavigator();
const Tab = createBottomTabNavigator();

const handleChooseImage = (attachFile: (filename: string, data: Uint8Array) => void): void => {
launchImageLibrary({ mediaType: 'photo', includeBase64: true }, (response) => {
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.errorCode) {
console.log('ImagePicker Error: ', response.errorMessage);
} else if (response.assets && response.assets.length > 0) {
const filename = response.assets[0].fileName;
const base64String = response.assets[0].base64;
const screenShotUint8Array = toByteArray(base64String);
if (filename && screenShotUint8Array) {
attachFile(filename, screenShotUint8Array);
}
}
});
};

const ErrorsTabNavigator = Sentry.withProfiler(
() => {
return (
Expand All @@ -189,7 +172,6 @@ const ErrorsTabNavigator = Sentry.withProfiler(
<FeedbackForm
{...props}
enableScreenshot={true}
onAddScreenshot={handleChooseImage}
onFormClose={props.navigation.goBack}
onFormSubmitted={props.navigation.goBack}
styles={{
Expand Down
Loading