From 265acf0d88e2264c6d162804faf697a2c992dd68 Mon Sep 17 00:00:00 2001 From: Ryan Albrecht Date: Wed, 9 Jul 2025 15:35:25 -0700 Subject: [PATCH 1/3] docs(feedback): Update docs for onSubmitSuccess to include eventID and how to link to sentry.io --- .../javascript/common/user-feedback/configuration/index.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx index 65de3d1ca72aa3..1a03d9c4abb323 100644 --- a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx +++ b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx @@ -239,13 +239,17 @@ Sentry.init({ Sentry.feedbackIntegration({ onFormOpen: () => {}, onFormClose: () => {}, - onSubmitSuccess: (data: FeedbackFormData) => {}, + onSubmitSuccess: (data: FeedbackFormData, eventID: string) => {}, onSubmitError: (error: Error) => {}, }), ], }); ``` +You can link directly to a saved feedback item by implementing the `onSubmitSuccess` callback. The url you need to construct is `https://\$\{orgSlug}.sentry.io/issues/feedback/?projectSlug=\$\{projectSlug}&eventId=\$\{eventId}`. + +*Note:* In v9 and below of the SDK the signature of `onSubmitSuccess` was `(data: FeedbackFormData) => {}`. + ### Bring Your Own Button You can use your own button instead of the default injected button to trigger the form being displayed, by calling `feedback.attachTo()` to have the SDK attach a click listener to your button. You can also supply the same customization options that the constructor accepts (for example, for text labels and colors). From 7650e714c3d09392768110c95d061e85f0c52be5 Mon Sep 17 00:00:00 2001 From: Ryan Albrecht Date: Wed, 9 Jul 2025 16:56:13 -0700 Subject: [PATCH 2/3] Apply suggestion from @michellewzhang Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- .../javascript/common/user-feedback/configuration/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx index 1a03d9c4abb323..69027380bcd3bf 100644 --- a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx +++ b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx @@ -246,7 +246,7 @@ Sentry.init({ }); ``` -You can link directly to a saved feedback item by implementing the `onSubmitSuccess` callback. The url you need to construct is `https://\$\{orgSlug}.sentry.io/issues/feedback/?projectSlug=\$\{projectSlug}&eventId=\$\{eventId}`. +You can link directly to a saved feedback item by implementing the `onSubmitSuccess` callback. The URL you need to construct is `https://\$\{orgSlug}.sentry.io/issues/feedback/?projectSlug=\$\{projectSlug}&eventId=\$\{eventId}`. *Note:* In v9 and below of the SDK the signature of `onSubmitSuccess` was `(data: FeedbackFormData) => {}`. From c2995103a7db8d2807fb16f33eb4002e1113af95 Mon Sep 17 00:00:00 2001 From: Ryan Albrecht Date: Wed, 9 Jul 2025 16:56:18 -0700 Subject: [PATCH 3/3] Apply suggestion from @michellewzhang Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- .../javascript/common/user-feedback/configuration/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx index 69027380bcd3bf..1abbbdb60adbf6 100644 --- a/docs/platforms/javascript/common/user-feedback/configuration/index.mdx +++ b/docs/platforms/javascript/common/user-feedback/configuration/index.mdx @@ -248,7 +248,7 @@ Sentry.init({ You can link directly to a saved feedback item by implementing the `onSubmitSuccess` callback. The URL you need to construct is `https://\$\{orgSlug}.sentry.io/issues/feedback/?projectSlug=\$\{projectSlug}&eventId=\$\{eventId}`. -*Note:* In v9 and below of the SDK the signature of `onSubmitSuccess` was `(data: FeedbackFormData) => {}`. +*Note:* In v9 and below of the SDK, the signature of `onSubmitSuccess` was `(data: FeedbackFormData) => {}`. ### Bring Your Own Button