feat(feedback): Add onClose description to user-feedback#8484
Conversation
|
@arya-s is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey @arya-s - Thanks for the contribution! FYI, I'm going to wait until the code PRs are reviewed before taking a look at this. |
Thanks! Please let me know if there should be more documentation. As far as I've seen, |
|
hey @arya-s, we've merged in the SDK and sentry changes. We can only merge in the docs once the SDK has been released, but I think adding a code snippet is a cool idea. @shanamatthews, where do you think the best place to keep this content is? |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| | `onLoad` | n/a - **an optional callback that will be invoked when the widget opens** | | ||
| | `onClose` | n/a - **an optional callback that will be invoked when the widget closes** | |
There was a problem hiding this comment.
What does the N/A mean here? Like, what is not available about this param?
There was a problem hiding this comment.
@shanamatthews my guess was that n/a refers to there being no default value as per column name. However, the whole table could use some rework given that it's a mixture of default values and descriptions.
There was a problem hiding this comment.
Ahh, got it, thank you. Yeah, let me take a look at this and see if I can figure out a way to make it more intuitive.
I think these docs are being moved and reworked in #8528, so for now, I think we can just put a code snippet on this page as an H3 subheading under "Customizing the Widget", as the last thing before "Feedback API" Maybe something like "Using What do you think? |
I had this in mind: The optional callback handlers Sentry.showReportDialog({
// ...
onLoad() {
// Log an event to amplitude when the report dialog opens
amplitude.logEvent('report_dialog_seen');
},
onClose() {
// Refresh the page after the user closes the report dialog
location.reload();
}
});But it's going to take me a bit to write snippets for all the supported languages/frameworks, some of which I don't have too much experience in and don't have them running locally to test the code... 😅 Thoughts? |
The snippet looks good to me! @AbhiPrasad - thoughts? I would say just create code snippets for the language(s) you're comfortable with. We can wrap this section in a |
Looks good to me too, let's make that change! |
2c642d7 to
adfa206
Compare
|
@shanamatthews @AbhiPrasad Regarding the exact SDK version I wasn't sure. I'm assuming the |
AbhiPrasad
left a comment
There was a problem hiding this comment.
7.82.0 is correct - see getsentry/publish#3070
Fixes getsentry/sentry-javascript#9433
Pre-merge checklist
If you work at Sentry, you're able to merge your own PR without review, but please don't unless there's a good reason.
Description of changes
Adds
onCloseto the user-feedback section and a short description for bothonCloseandonLoad.Please see the accompanying PRs:
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Extra resources