Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(feedback): Add UF screenshot capability #9867

Merged
merged 21 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The following options can be configured for the integration in `feedbackIntegrat
| ----------------- | ------------------------ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `showName` | `boolean` | `true` | Displays the name field on the Feedback form, however will still capture the name (if available) from Sentry SDK context. |
| `showEmail` | `boolean` | `true` | Displays the email field on the Feedback form, however will still capture the email (if available) from Sentry SDK context. |
| `showScreenshot` | `boolean` | `true` | Allows the user to send a screenshot attachment with their feedback. Requires SDK v8+. |
c298lee marked this conversation as resolved.
Show resolved Hide resolved
| `isNameRequired` | `boolean` | `false` | Requires the name field on the Feedback form to be filled in. |
| `isEmailRequired` | `boolean` | `false` | Requires the email field on the Feedback form to be filled in. |
| `useSentryUser` | `Record<string, string>` | `{ email: 'email', name: 'username'}` | Map of the `email` and `name` fields to the corresponding Sentry SDK user fields that were called with `Sentry.setUser`. |
Expand Down
14 changes: 10 additions & 4 deletions docs/platforms/javascript/common/user-feedback/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ The embeddable JavaScript widget allows users to submit feedback from anywhere i

To set up the integration, add the following to your Sentry initialization. There are many options you can pass to the integration constructor. See the [configuration documentation](/platforms/javascript/user-feedback/configuration/) for more details.

### Session Replay

The User Feedback Widget integrates easily with <PlatformLink to="/session-replay/">Session Replay</PlatformLink>. First, make sure that the Session Replay integration is configured correctly and that `replaysOnErrorSampleRate` is greater than 0. When this is done, the Replay SDK will buffer up to 30 seconds worth of events until the user *opens* the User Feedback Widget. If the user submits feedback, you'll be able to view the Feedback (including the replay), inside of Sentry's web application.

<SignInNote />

<PlatformContent includePath="user-feedback/setup" />

By default, this will insert the widget into the bottom right corner of your website. You're free to customize nearly every aspect of the widget, including replacing it completely with your own UI.

On SDK v8 and above, users can send screenshots with their feedback by default. You can configure this using the `showScreenshot` option. Screenshots aren't supported on mobile devices, so the screenshot button will be hidden in this case.
c298lee marked this conversation as resolved.
Show resolved Hide resolved

<Alert level="">
Screenshots use your [attachments quota](/product/accounts/quotas/manage-attachments-quota). All plans come with 1GB of attachments, which is approxiamately 2500 screenshots.
</Alert>

### Session Replay

The User Feedback Widget integrates easily with <PlatformLink to="/session-replay/">Session Replay</PlatformLink>. First, make sure that the Session Replay integration is configured correctly and that `replaysOnErrorSampleRate` is greater than 0. When this is done, the Replay SDK will buffer up to 30 seconds worth of events until the user *opens* the User Feedback Widget. If the user submits feedback, you'll be able to view the Feedback (including the replay), inside of Sentry's web application.
c298lee marked this conversation as resolved.
Show resolved Hide resolved

</PlatformSection>

## User Feedback API
Expand Down
1 change: 1 addition & 0 deletions docs/product/user-feedback/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The User Feedback Widget is an out-of-the-box, persistent widget you can add any
Feedback collected via the Feedback Widget may have some or all of the following information (depending on what you mark as required and what’s available from the error context):

- Description from the user
- Screenshot from the user
- User email
- Associated replay event (with up to 60 seconds of replay recording before the user submitted the feedback)
- Learn more about how to set up Session Replay [here](/product/session-replay/getting-started/).
Expand Down