You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename all references from FeedbackWidget/showFeedbackWidget to
FeedbackForm/showFeedbackForm to match the SDK rename in
getsentry/sentry-react-native#5931.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The User Feedback Widget offers many customization options, and if the available options are insufficient, you can [use your own UI](/platforms/react-native/user-feedback/#user-feedback-api).
8
+
The User Feedback Form offers many customization options, and if the available options are insufficient, you can [use your own UI](/platforms/react-native/user-feedback/#user-feedback-api).
9
9
10
-

11
-
To collect user feedback from inside your application, use the `showFeedbackButton`/`hideFeedbackButton` to show/hide a button that triggers the Feedback Widget or the `showFeedbackWidget` method to present the widget directly.
10
+

11
+
To collect user feedback from inside your application, use the `showFeedbackButton`/`hideFeedbackButton` to show/hide a button that triggers the Feedback Form or the `showFeedbackForm` method to present the form directly.
12
12
13
-
```JavaScript {tabTitle:Widget}
13
+
```JavaScript {tabTitle:Form}
14
14
import*asSentryfrom"@sentry/react-native";
15
15
16
16
Sentry.wrap(RootComponent);
17
17
18
-
Sentry.showFeedbackWidget();
18
+
Sentry.showFeedbackForm();
19
19
```
20
20
21
21
```JavaScript {tabTitle:Button}
@@ -31,35 +31,35 @@ Note that [the root application component must be wrapped with `Sentry.wrap`](/p
31
31
32
32
## General
33
33
34
-
The following options can be configured for the integration in `feedbackIntegration({})` or passed in the `FeedbackWidget` component props:
34
+
The following options can be configured for the integration in `feedbackIntegration({})` or passed in the `FeedbackForm` component props:
|`showBranding`|`boolean`|`true`| Displays the Sentry logo. |
40
-
|`showName`|`boolean`|`true`| Displays the name field on the feedback widget.|
41
-
|`showEmail`|`boolean`|`true`| Displays the email field on the feedback widget.|
42
-
|`enableShakeToReport`|`boolean`|`false`| Opens the Feedback Widget when the user shakes the device. |
40
+
|`showName`|`boolean`|`true`| Displays the name field on the feedback form. |
41
+
|`showEmail`|`boolean`|`true`| Displays the email field on the feedback form. |
42
+
|`enableShakeToReport`|`boolean`|`false`| Opens the Feedback Form when the user shakes the device.|
43
43
|`enableScreenshot`|`boolean`|`false`| Allows the user to send a screenshot attachment with their feedback. |
44
44
|`enableTakeScreenshot`|`boolean`|`false`| Determines whether the "Take Screenshot" button is displayed. |
45
-
|`isNameRequired`|`boolean`|`false`| Requires the name field on the feedback widget to be filled in. |
46
-
|`isEmailRequired`|`boolean`|`false`| Requires the email field on the feedback widget to be filled in. |
45
+
|`isNameRequired`|`boolean`|`false`| Requires the name field on the feedback form to be filled in.|
46
+
|`isEmailRequired`|`boolean`|`false`| Requires the email field on the feedback form to be filled in.|
47
47
|`shouldValidateEmail`|`boolean`|`true`| If set the email is validated with the following regular expression `"/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/"`|
48
48
|`useSentryUser`|`Record<string, string>`|`{ email: 'email', name: 'username'}`| Sets the default values for the `email` and `name` fields. |
49
49
50
50
51
51
## Text Customization
52
52
53
-
All the text that you see in the Feedback widget can be customized.
53
+
All the text that you see in the Feedback Form can be customized.
54
54
55
-
The following options can be configured for the integration in `feedbackIntegration({})` or passed in the `FeedbackWidget` component props:
55
+
The following options can be configured for the integration in `feedbackIntegration({})` or passed in the `FeedbackForm` component props:
|`onFormOpen`||| Callback when widget is opened. |
191
-
|`onFormClose`|| The widget is unmounted.| Callback when widget is closed and not submitted. |
190
+
|`onFormOpen`||| Callback when form is opened.|
191
+
|`onFormClose`|| The form is unmounted.| Callback when form is closed and not submitted.|
192
192
|`onSubmitSuccess`|`data: FeedbackFormData`|| Callback when feedback is successfully submitted. |
193
193
|`onSubmitError`|`error: Error`|| Callback when feedback is unsuccessfully submitted. |
194
-
|`onFormSubmitted`|| The widget is unmounted.| Callback when the feedback widget is submitted successfully, and the SuccessMessage is complete, or dismissed.|
194
+
|`onFormSubmitted`|| The form is unmounted.| Callback when the feedback form is submitted successfully, and the SuccessMessage is complete, or dismissed.|
195
195
|`onAddScreenshot`|`addScreenshot: (uri: string) => void`|| Callback when a screenshot is added. |
196
196
197
197
## Screenshots
@@ -228,10 +228,10 @@ Sentry.init({
228
228
});
229
229
```
230
230
231
-
The `imagePicker` integration is used when launching the feedback widget with the `showFeedbackWidget` or the `FeedbackButton`. In order to use it with a custom `FeedbackWidget` component, you need to pass the `imagePicker` prop to the component as shown below:
231
+
The `imagePicker` integration is used when launching the feedback form with the `showFeedbackForm` or the `FeedbackButton`. In order to use it with a custom `FeedbackForm` component, you need to pass the `imagePicker` prop to the component as shown below:
232
232
233
233
```javascript
234
-
<FeedbackWidget
234
+
<FeedbackForm
235
235
imagePicker={ImagePicker}
236
236
/>
237
237
```
@@ -262,7 +262,7 @@ Sentry.feedbackIntegration({
262
262
263
263
### Screenshot Button
264
264
265
-
You can show a button that allows the user to take a screenshot in the Feedback Widget. The button is shown when `enableTakeScreenshot` is set to `true` in the `feedbackIntegration` method like in the example below.
265
+
You can show a button that allows the user to take a screenshot in the Feedback Form. The button is shown when `enableTakeScreenshot` is set to `true` in the `feedbackIntegration` method like in the example below.
266
266
267
267
```javascript
268
268
import*asSentryfrom"@sentry/react-native";
@@ -285,7 +285,7 @@ Sentry.init({
285
285
Sentry.showFeedbackButton();
286
286
```
287
287
288
-
You can customize the Feedback Widget screenshot button text with the following options.
288
+
You can customize the Feedback Form screenshot button text with the following options.
@@ -308,7 +308,7 @@ Note that the screenshot button is currently not supported on the web.
308
308
309
309
## Theming
310
310
311
-
You can also customize the Feedback Widget colors to match your app's theme. The example below shows how to customize the widget background and foreground for the light and dark system themes with the `feedbackIntegration`.
311
+
You can also customize the Feedback Form colors to match your app's theme. The example below shows how to customize the form background and foreground for the light and dark system themes with the `feedbackIntegration`.
312
312
313
313
```javascript
314
314
import*asSentryfrom"@sentry/react-native";
@@ -335,8 +335,8 @@ The available theme options are:
0 commit comments