Skip to content

Commit 0b15fea

Browse files
antonisclaude
andauthored
Remove deprecated FeedbackButton from React Native docs (#17191)
**Based on #17190 ## DESCRIBE YOUR PR Remove all references to the deprecated `FeedbackButton`, `showFeedbackButton`, and `hideFeedbackButton` APIs from the React Native user feedback documentation. Removed: - `showFeedbackButton`/`hideFeedbackButton` code examples and mentions from the main user feedback page - Entire "Feedback Button Customization" section from the configuration page - `FeedbackButton` reference in the image picker section Follows SDK deprecation in getsentry/sentry-react-native#5933. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): - [ ] Other deadline: - [x] None: Not urgent, can wait up to 1 week+ ⚠️ Should be merged after getsentry/sentry-react-native#5933 is released ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b858e12 commit 0b15fea

File tree

2 files changed

+7
-69
lines changed

2 files changed

+7
-69
lines changed

docs/platforms/react-native/user-feedback/configuration/index.mdx

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,16 @@ og_image: /og-images/platforms-react-native-user-feedback-configuration.png
88
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).
99

1010
![An image showing the main customization options for the User Feedback Form](./img/mobile-user-feedback-widget-customization.png)
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.
11+
To collect user feedback from inside your application, use the `showFeedbackForm` method to present the form.
1212

13-
```JavaScript {tabTitle:Form}
13+
```JavaScript
1414
import * as Sentry from "@sentry/react-native";
1515

1616
Sentry.wrap(RootComponent);
1717

1818
Sentry.showFeedbackForm();
1919
```
2020

21-
```JavaScript {tabTitle:Button}
22-
import * as Sentry from "@sentry/react-native";
23-
24-
Sentry.wrap(RootComponent);
25-
26-
Sentry.showFeedbackButton();
27-
Sentry.hideFeedbackButton();
28-
```
29-
3021
Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for this to work.
3122

3223
## General
@@ -140,47 +131,6 @@ The following styles are available for customisation.
140131
| `screenshotThumbnail` | `ImageStyle` | The screenshot thumbnail image style. |
141132
| `titleContainer` | `ViewStyle` | The title container style. |
142133

143-
## Feedback Button Customization
144-
145-
You can customize placement of the feedback button, as well as the fonts and colors.
146-
147-
The example below shows how to customize the bottom margin with the `feedbackIntegration`.
148-
149-
```javascript
150-
import * as Sentry from "@sentry/react-native";
151-
152-
Sentry.init({
153-
integrations: [
154-
Sentry.feedbackIntegration({
155-
buttonOptions: {
156-
styles: {
157-
triggerButton: {
158-
marginBottom: 75,
159-
},
160-
},
161-
},
162-
}),
163-
],
164-
});
165-
166-
Sentry.showFeedbackButton();
167-
```
168-
169-
You can customize the button text with the following options.
170-
171-
| Key | Default | Description |
172-
| ------------------ | ---------------- | -------------------------------------------------------------------- |
173-
| `triggerLabel` | `"Report a Bug"` | The label for the Feedback button that opens the form. |
174-
| `triggerAriaLabel` | - | The aria label for the Feedback button that opens the form. |
175-
176-
The following styles are available for customisation.
177-
178-
| Style | Type | Description |
179-
| --------------- | ------------ | --------------------------------- |
180-
| `triggerButton` | `ViewStyle` | The feedback button style. |
181-
| `triggerText` | `TextStyle` | The feedback button text style. |
182-
| `triggerIcon` | `ImageStyle` | The feedback button icon style. |
183-
184134
## Event Callbacks
185135

186136
The following callbacks can be configured for the integration in `feedbackIntegration({})` or passed in the `FeedbackForm` component props:
@@ -228,7 +178,7 @@ Sentry.init({
228178
});
229179
```
230180

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:
181+
The `imagePicker` integration is used when launching the feedback form with `showFeedbackForm`. In order to use it with a custom `FeedbackForm` component, you need to pass the `imagePicker` prop to the component as shown below:
232182

233183
```javascript
234184
<FeedbackForm
@@ -270,6 +220,7 @@ import * as Sentry from "@sentry/react-native";
270220
Sentry.init({
271221
integrations: [
272222
Sentry.feedbackIntegration({
223+
enableTakeScreenshot: true,
273224
screenshotButtonOptions: {
274225
triggerLabel: 'Take Screenshot',
275226
styles: {
@@ -281,8 +232,6 @@ Sentry.init({
281232
}),
282233
],
283234
});
284-
285-
Sentry.showFeedbackButton();
286235
```
287236

288237
You can customize the Feedback Form screenshot button text with the following options.

docs/platforms/react-native/user-feedback/index.mdx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,9 @@ Sentry.wrap(RootComponent);
2929
Sentry.showFeedbackForm();
3030
```
3131

32-
You may also use the `showFeedbackButton` and `hideFeedbackButton` to show and hide a button that opens the Feedback Form.
32+
Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackForm` method to work. The method depends on the React Native `Modal` implementation. It is supported fully in the legacy architecture. For the new architecture (Fabric renderer) it requires React Native `0.71` and up.
3333

34-
```javascript
35-
import * as Sentry from "@sentry/react-native";
36-
37-
Sentry.wrap(RootComponent);
38-
39-
Sentry.showFeedbackButton();
40-
Sentry.hideFeedbackButton();
41-
```
42-
43-
Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackForm` and `showFeedbackButton` methods to work. The methods depend on the React Native `Modal` implementation. It is supported fully in the legacy architecture. For the new architecture (Fabric renderer) it requires React Native `0.71` and up.
44-
45-
To configure the widget or the button you can use the `Sentry.feedbackIntegration({})` or add it to your Sentry initialization.
34+
To configure the form you can use the `Sentry.feedbackIntegration({})` or add it to your Sentry initialization.
4635

4736
```javascript
4837
import * as Sentry from "@sentry/react-native";
@@ -106,7 +95,7 @@ Note that when the device is offline, the feedback will be stored locally and se
10695

10796
### Session Replay
10897

109-
The User Feedback widget integrates seamlessly with Session Replay. When the widget is opened, the SDK buffers up to 30 seconds of the user's session. If feedback is submitted, this replay is sent along with the feedback, allowing you to view both the feedback and the user's actions leading up to the feedback submission.
98+
The User Feedback Form integrates seamlessly with Session Replay. When the widget is opened, the SDK buffers up to 30 seconds of the user's session. If feedback is submitted, this replay is sent along with the feedback, allowing you to view both the feedback and the user's actions leading up to the feedback submission.
11099

111100
## User Feedback API
112101

0 commit comments

Comments
 (0)