diff --git a/docs/platforms/react-native/common/user-feedback/index.mdx b/docs/platforms/react-native/common/user-feedback/index.mdx index a7ccd6c7cbf4f3..ff6fe7c7d6eae0 100644 --- a/docs/platforms/react-native/common/user-feedback/index.mdx +++ b/docs/platforms/react-native/common/user-feedback/index.mdx @@ -93,6 +93,52 @@ Note that when the device is offline, the feedback will be stored locally and se +### Opening the Feedback Form Over a Presented Sheet on iOS + +On iOS, `Sentry.showFeedbackForm()`, shake-to-report, and the auto-injected feedback button present the Feedback Form inside a React Native `Modal`. UIKit only allows one presentation per view controller, so when a native-stack screen is already presented as a sheet (`presentation: "formSheet"` or `"modal"` with `@react-navigation/native-stack`), UIKit refuses the second presentation and the form doesn't appear. Android is unaffected. + +To collect feedback while such a sheet is open, render the [`FeedbackForm`](#feedback-form-component) component yourself and control its visibility. On iOS, wrap it in react-native-screens' `FullWindowOverlay` so it draws above the presented sheet: + +```jsx +import { useState } from "react"; +import { Button, Modal, Platform, StyleSheet, View } from "react-native"; +import { FeedbackForm } from "@sentry/react-native"; +import { FullWindowOverlay } from "react-native-screens"; + +function FeedbackButton() { + const [visible, setVisible] = useState(false); + const close = () => setVisible(false); + + // Pass the same options you'd give `feedbackIntegration(...)` + // (formTitle, namePlaceholder, styles, imagePicker, and so on). + const form = ( + + + + ); + + return ( + <> +