From f80e3be28ab18c8b6a315c8c4ab6f5157263d771 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 5 Mar 2026 11:33:46 +0100 Subject: [PATCH 1/4] docs(react-native): Add shake-to-report feedback documentation Document the new `enableShakeToReport` option for `feedbackIntegration()` and the `showFeedbackOnShake()`/`hideFeedbackOnShake()` programmatic APIs. Ref: https://github.com/getsentry/sentry-react-native/pull/5754 Co-Authored-By: Claude --- .../user-feedback/configuration/index.mdx | 1 + .../react-native/user-feedback/index.mdx | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/platforms/react-native/user-feedback/configuration/index.mdx b/docs/platforms/react-native/user-feedback/configuration/index.mdx index 1cfa4cd6ab8595..f188d24849939e 100644 --- a/docs/platforms/react-native/user-feedback/configuration/index.mdx +++ b/docs/platforms/react-native/user-feedback/configuration/index.mdx @@ -39,6 +39,7 @@ The following options can be configured for the integration in `feedbackIntegrat | `showBranding` | `boolean` | `true` | Displays the Sentry logo. | | `showName` | `boolean` | `true` | Displays the name field on the feedback widget. | | `showEmail` | `boolean` | `true` | Displays the email field on the feedback widget. | +| `enableShakeToReport` | `boolean` | `false` | Opens the Feedback Widget when the user shakes the device. | | `enableScreenshot` | `boolean` | `false` | Allows the user to send a screenshot attachment with their feedback. | | `enableTakeScreenshot` | `boolean` | `false` | Determines whether the "Take Screenshot" button is displayed. | | `isNameRequired` | `boolean` | `false` | Requires the name field on the feedback widget to be filled in. | diff --git a/docs/platforms/react-native/user-feedback/index.mdx b/docs/platforms/react-native/user-feedback/index.mdx index e17f9082ccbd6d..551be52bae1e99 100644 --- a/docs/platforms/react-native/user-feedback/index.mdx +++ b/docs/platforms/react-native/user-feedback/index.mdx @@ -40,7 +40,27 @@ Sentry.showFeedbackWidget(); Sentry.hideFeedbackButton(); ``` -Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackWidget` 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. +### Shake to Report + +You can enable shake-to-report so that shaking the device opens the Feedback Widget. Enable it declaratively via the `feedbackIntegration` option: + +```javascript +Sentry.feedbackIntegration({ + enableShakeToReport: true, +}); +``` + +Or control it programmatically: + +```javascript +// Start listening for shake gestures to open the feedback widget +Sentry.showFeedbackOnShake(); + +// Stop listening for shake gestures +Sentry.hideFeedbackOnShake(); +``` + +Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackWidget`, `showFeedbackButton`, and `showFeedbackOnShake` 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. To configure the widget or the button you can use the `Sentry.feedbackIntegration({})` or add it to your Sentry initialization. From 4816e0149b9b7486d58996e60a5ad2cfa4822285 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 19 Mar 2026 10:09:32 +0100 Subject: [PATCH 2/4] Rename methods --- docs/platforms/react-native/user-feedback/index.mdx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/platforms/react-native/user-feedback/index.mdx b/docs/platforms/react-native/user-feedback/index.mdx index 551be52bae1e99..c5ff8cd615f418 100644 --- a/docs/platforms/react-native/user-feedback/index.mdx +++ b/docs/platforms/react-native/user-feedback/index.mdx @@ -54,13 +54,10 @@ Or control it programmatically: ```javascript // Start listening for shake gestures to open the feedback widget -Sentry.showFeedbackOnShake(); +Sentry.enableFeedbackOnShake(); // Stop listening for shake gestures -Sentry.hideFeedbackOnShake(); -``` - -Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackWidget`, `showFeedbackButton`, and `showFeedbackOnShake` 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. +Sentry.disableFeedbackOnShake(); To configure the widget or the button you can use the `Sentry.feedbackIntegration({})` or add it to your Sentry initialization. From a7e687cbc15647bcf971a51ec14a9af4f0552e20 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 19 Mar 2026 10:15:24 +0100 Subject: [PATCH 3/4] Move new section --- .../react-native/user-feedback/index.mdx | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/platforms/react-native/user-feedback/index.mdx b/docs/platforms/react-native/user-feedback/index.mdx index c5ff8cd615f418..178d5ca224046a 100644 --- a/docs/platforms/react-native/user-feedback/index.mdx +++ b/docs/platforms/react-native/user-feedback/index.mdx @@ -40,24 +40,7 @@ Sentry.showFeedbackWidget(); Sentry.hideFeedbackButton(); ``` -### Shake to Report - -You can enable shake-to-report so that shaking the device opens the Feedback Widget. Enable it declaratively via the `feedbackIntegration` option: - -```javascript -Sentry.feedbackIntegration({ - enableShakeToReport: true, -}); -``` - -Or control it programmatically: - -```javascript -// Start listening for shake gestures to open the feedback widget -Sentry.enableFeedbackOnShake(); - -// Stop listening for shake gestures -Sentry.disableFeedbackOnShake(); +Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackWidget` 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. To configure the widget or the button you can use the `Sentry.feedbackIntegration({})` or add it to your Sentry initialization. @@ -83,6 +66,25 @@ Sentry.init({ There are many options you can pass to the integration constructor. See the [configuration documentation](/platforms/react-native/user-feedback/configuration/) for more details. +### Shake to Report + +You can enable shake-to-report so that shaking the device opens the Feedback Widget. Enable it declaratively via the `feedbackIntegration` option: + +```javascript +Sentry.feedbackIntegration({ + enableShakeToReport: true, +}); +``` + +Or control it programmatically: + +```javascript +// Start listening for shake gestures to open the feedback widget +Sentry.enableFeedbackOnShake(); + +// Stop listening for shake gestures +Sentry.disableFeedbackOnShake(); + ### Feedback Widget Component You can also integrate the `FeedbackWidget` component manually in your app. From 40373216236876878c9530ba9a554661427d6e78 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 19 Mar 2026 10:49:28 +0100 Subject: [PATCH 4/4] Add missing close code section --- docs/platforms/react-native/user-feedback/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/platforms/react-native/user-feedback/index.mdx b/docs/platforms/react-native/user-feedback/index.mdx index 178d5ca224046a..84be88c810a1dd 100644 --- a/docs/platforms/react-native/user-feedback/index.mdx +++ b/docs/platforms/react-native/user-feedback/index.mdx @@ -84,6 +84,7 @@ Sentry.enableFeedbackOnShake(); // Stop listening for shake gestures Sentry.disableFeedbackOnShake(); +``` ### Feedback Widget Component