Skip to content

Commit aee0e49

Browse files
antonisclaude
andauthored
docs(react-native): Add shake-to-report feedback documentation (#16790)
## DESCRIBE YOUR PR Document the new shake-to-report feature for React Native user feedback, based on [sentry-react-native#5754](getsentry/sentry-react-native#5754). - Add "Shake to Report" section to the user feedback setup page - Add `enableShakeToReport` to the General options configuration table ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] 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#5754 is released ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] 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 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2049e21 commit aee0e49

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The following options can be configured for the integration in `feedbackIntegrat
3939
| `showBranding` | `boolean` | `true` | Displays the Sentry logo. |
4040
| `showName` | `boolean` | `true` | Displays the name field on the feedback widget. |
4141
| `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. |
4243
| `enableScreenshot` | `boolean` | `false` | Allows the user to send a screenshot attachment with their feedback. |
4344
| `enableTakeScreenshot` | `boolean` | `false` | Determines whether the "Take Screenshot" button is displayed. |
4445
| `isNameRequired` | `boolean` | `false` | Requires the name field on the feedback widget to be filled in. |

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,26 @@ Sentry.init({
6666

6767
There are many options you can pass to the integration constructor. See the [configuration documentation](/platforms/react-native/user-feedback/configuration/) for more details.
6868

69+
### Shake to Report
70+
71+
You can enable shake-to-report so that shaking the device opens the Feedback Widget. Enable it declaratively via the `feedbackIntegration` option:
72+
73+
```javascript
74+
Sentry.feedbackIntegration({
75+
enableShakeToReport: true,
76+
});
77+
```
78+
79+
Or control it programmatically:
80+
81+
```javascript
82+
// Start listening for shake gestures to open the feedback widget
83+
Sentry.enableFeedbackOnShake();
84+
85+
// Stop listening for shake gestures
86+
Sentry.disableFeedbackOnShake();
87+
```
88+
6989
### Feedback Widget Component
7090

7191
You can also integrate the `FeedbackWidget` component manually in your app.

0 commit comments

Comments
 (0)