Skip to content

Commit 8216878

Browse files
authored
Merge dcc5d3b into dbdfceb
2 parents dbdfceb + dcc5d3b commit 8216878

File tree

5 files changed

+45
-15
lines changed

5 files changed

+45
-15
lines changed

packages/core/src/js/feedback/FeedbackForm.styles.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,22 @@ const defaultStyles: FeedbackFormStyles = {
7979
},
8080
modalBackground: {
8181
flex: 1,
82-
justifyContent: 'center',
82+
justifyContent: 'flex-end',
83+
backgroundColor: 'rgba(0, 0, 0, 0.8)',
84+
},
85+
modalSheetContainer: {
86+
backgroundColor: BACKROUND_COLOR,
87+
borderTopLeftRadius: 16,
88+
borderTopRightRadius: 16,
89+
padding: 16,
90+
marginBottom: -32,
91+
alignSelf: 'stretch',
92+
height: '100%',
93+
shadowColor: '#000',
94+
shadowOffset: { width: 0, height: -3 },
95+
shadowOpacity: 0.1,
96+
shadowRadius: 4,
97+
elevation: 5,
8398
},
8499
};
85100

packages/core/src/js/feedback/FeedbackForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class FeedbackForm extends React.Component<FeedbackFormProps, FeedbackFor
131131
return (
132132
<SafeAreaView style={[styles.container, { padding: 0 }]}>
133133
<KeyboardAvoidingView behavior={'padding'} style={[styles.container, { padding: 0 }]}>
134-
<ScrollView>
134+
<ScrollView bounces={false}>
135135
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
136136
<View style={styles.container}>
137137
<View style={styles.titleContainer}>

packages/core/src/js/feedback/FeedbackForm.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ export interface FeedbackFormStyles {
205205
titleContainer?: ViewStyle;
206206
sentryLogo?: ImageStyle;
207207
modalBackground?: ViewStyle;
208+
modalSheetContainer?: ViewStyle;
208209
}
209210

210211
/**

packages/core/src/js/feedback/FeedbackFormManager.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { logger } from '@sentry/core';
22
import * as React from 'react';
3-
import { Modal, View } from 'react-native';
3+
import { Modal, SafeAreaView, View } from 'react-native';
44

55
import { FeedbackForm } from './FeedbackForm';
66
import defaultStyles from './FeedbackForm.styles';
@@ -70,12 +70,14 @@ class FeedbackFormProvider extends React.Component<FeedbackFormProviderProps> {
7070
{isVisible && (
7171
<View>
7272
<Modal visible={isVisible} transparent animationType="slide" onRequestClose={this._handleClose} testID="feedback-form-modal">
73-
<View style={styles.modalBackground}>
74-
<FeedbackForm {...getFeedbackOptions()}
75-
onFormClose={this._handleClose}
76-
onFormSubmitted={this._handleClose}
77-
/>
78-
</View>
73+
<SafeAreaView style={styles.modalBackground}>
74+
<View style={styles.modalSheetContainer}>
75+
<FeedbackForm {...getFeedbackOptions()}
76+
onFormClose={this._handleClose}
77+
onFormSubmitted={this._handleClose}
78+
/>
79+
</View>
80+
</SafeAreaView>
7981
</Modal>
8082
</View>
8183
)}

packages/core/test/feedback/__snapshots__/FeedbackForm.test.tsx.snap

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ exports[`FeedbackForm matches the snapshot with custom styles 1`] = `
3131
]
3232
}
3333
>
34-
<RCTScrollView>
34+
<RCTScrollView
35+
bounces={false}
36+
>
3537
<View>
3638
<View
3739
accessibilityState={
@@ -299,7 +301,9 @@ exports[`FeedbackForm matches the snapshot with custom styles and screenshot but
299301
]
300302
}
301303
>
302-
<RCTScrollView>
304+
<RCTScrollView
305+
bounces={false}
306+
>
303307
<View>
304308
<View
305309
accessibilityState={
@@ -617,7 +621,9 @@ exports[`FeedbackForm matches the snapshot with custom texts 1`] = `
617621
]
618622
}
619623
>
620-
<RCTScrollView>
624+
<RCTScrollView
625+
bounces={false}
626+
>
621627
<View>
622628
<View
623629
accessibilityState={
@@ -916,7 +922,9 @@ exports[`FeedbackForm matches the snapshot with custom texts and screenshot butt
916922
]
917923
}
918924
>
919-
<RCTScrollView>
925+
<RCTScrollView
926+
bounces={false}
927+
>
920928
<View>
921929
<View
922930
accessibilityState={
@@ -1265,7 +1273,9 @@ exports[`FeedbackForm matches the snapshot with default configuration 1`] = `
12651273
]
12661274
}
12671275
>
1268-
<RCTScrollView>
1276+
<RCTScrollView
1277+
bounces={false}
1278+
>
12691279
<View>
12701280
<View
12711281
accessibilityState={
@@ -1564,7 +1574,9 @@ exports[`FeedbackForm matches the snapshot with default configuration and screen
15641574
]
15651575
}
15661576
>
1567-
<RCTScrollView>
1577+
<RCTScrollView
1578+
bounces={false}
1579+
>
15681580
<View>
15691581
<View
15701582
accessibilityState={

0 commit comments

Comments
 (0)