-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(feedback): Add notes about async loading the Feedback integration #10108
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content wise, this seems good. I think there's some wordsmithing needed, but will leave that up to the pros
|
||
2. `feedbackAsyncIntegration` | ||
|
||
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button the integration will asyncronously load inrernal integrations that show the form, and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asyncronous loading can fail when the user interacts with the button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button the integration will asyncronously load inrernal integrations that show the form, and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asyncronous loading can fail when the user interacts with the button. | |
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button, the integration will asynchronously load internal integrations that show the form and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asynchronous loading can fail when the user interacts with the button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention ad blocker as an example?
Should we describe how/where the async code is loaded from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 I think it'd be helpful to explain a bit more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i put some notes in there about loading from our CDN and ad-blockers. take another look at the whole paragraph and lmk
|
||
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button the integration will asyncronously load inrernal integrations that show the form, and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asyncronous loading can fail when the user interacts with the button. | ||
|
||
All of the code examples on this page use `feedbackIntegration` as a default because it is available whether you have chosen the CDN or NPM installation method. However the implementation of `feedbackIntegration` is different depending on the installation method. For CDN users `feedbackIntegration` is an alias of `feedbackAsyncIntegration`, while for NPM users `feedbackIntegration` is an alias of `feedbackSyncIntegration`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we usually use NPM as the terminology for a local bundle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions
|
||
2. `feedbackAsyncIntegration` | ||
|
||
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button the integration will asyncronously load inrernal integrations that show the form, and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asyncronous loading can fail when the user interacts with the button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 I think it'd be helpful to explain a bit more
The `feedbackIntegration` is special among our integrations because it is a user-facing integration. Therefore, we have two strategies available to help you control bundle size. What strategies are available depend on how you have installed the SDK into your application. | ||
|
||
<Note> | ||
In every case, we recommend using `feedbackIntegration` in your `Sentry.init` call. | ||
</Note> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `feedbackIntegration` is special among our integrations because it is a user-facing integration. Therefore, we have two strategies available to help you control bundle size. What strategies are available depend on how you have installed the SDK into your application. | |
<Note> | |
In every case, we recommend using `feedbackIntegration` in your `Sentry.init` call. | |
</Note> | |
Because the `feedbackIntegration` is a user-facing integration, we offer two loading strategies that have implications on bundle size. | |
<Note> | |
In every case, we recommend using `feedbackIntegration` in your `Sentry.init` call. | |
</Note> | |
All of the code examples on this page use `feedbackIntegration` as a default because it is available whether you have chosen the CDN or NPM installation method. However, the implementation of `feedbackIntegration` is different depending on the installation method. For NPM users `feedbackIntegration` is an alias of `feedbackSyncIntegration`. For CDN users, `feedbackIntegration` is an alias of `feedbackAsyncIntegration`. |
1. `feedbackSyncIntegration` | ||
|
||
This integration includes all the code needed to render the "Send Feedback" button, as well as the form that is triggered when the button is clicked. Choosing this loading strategy means accepting the largest bundle size in your application. The benefit of this is that the feedback widget is guaranteed to work when the user interacts with it. | ||
|
||
This loading strategy is not available if you have installed the SDK via the CDN. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. `feedbackSyncIntegration` | |
This integration includes all the code needed to render the "Send Feedback" button, as well as the form that is triggered when the button is clicked. Choosing this loading strategy means accepting the largest bundle size in your application. The benefit of this is that the feedback widget is guaranteed to work when the user interacts with it. | |
This loading strategy is not available if you have installed the SDK via the CDN. | |
#### `feedbackSyncIntegration` | |
If you have installed the SDK with NPM, this loading strategy is used by default. This strategy is not available if you have installed the SDK via the CDN. | |
This integration includes all the code needed to render the "Send Feedback" button, as well as the form that is triggered when the button is clicked. Choosing this loading strategy means accepting the largest bundle size in your application. The benefit of this is that the feedback widget is guaranteed to work when the user interacts with it. |
I don't think numbering these makes sense since it's not ordered so let's just make it a smaller heading. I'd also put at the top who this strategy is for.
2. `feedbackAsyncIntegration` | ||
|
||
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button the integration will asyncronously load inrernal integrations that show the form, and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asyncronous loading can fail when the user interacts with the button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. `feedbackAsyncIntegration` | |
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button the integration will asyncronously load inrernal integrations that show the form, and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asyncronous loading can fail when the user interacts with the button. | |
#### `feedbackAsyncIntegration` | |
If you installed the SDK with the CDN, this loading strategy is used by default. If you used NPM, you can still choose to use this loading strategy by adding this integration to your `Sentry.init` call. | |
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button, the integration will asynchronously load internal integrations that show the form and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asynchronous loading can fail when the user interacts with the button. |
|
||
This integration includes the minimum amount of code needed to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button the integration will asyncronously load inrernal integrations that show the form, and let the user type out their feedback message. This has the benefit of being the lowest bundle size. The drawback is that asyncronous loading can fail when the user interacts with the button. | ||
|
||
All of the code examples on this page use `feedbackIntegration` as a default because it is available whether you have chosen the CDN or NPM installation method. However the implementation of `feedbackIntegration` is different depending on the installation method. For CDN users `feedbackIntegration` is an alias of `feedbackAsyncIntegration`, while for NPM users `feedbackIntegration` is an alias of `feedbackSyncIntegration`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the code examples on this page use `feedbackIntegration` as a default because it is available whether you have chosen the CDN or NPM installation method. However the implementation of `feedbackIntegration` is different depending on the installation method. For CDN users `feedbackIntegration` is an alias of `feedbackAsyncIntegration`, while for NPM users `feedbackIntegration` is an alias of `feedbackSyncIntegration`. |
Would move this info up to the top since it's useful to know what the default behavior is before learning more about the strategies.
dce95e9
to
3632fb0
Compare
Bundle ReportChanges will decrease total bundle size by 6 bytes ⬇️
|
|
||
If you have installed the SDK with NPM, this loading strategy is used by default. This strategy is not available if you have installed the SDK via the CDN. | ||
|
||
This integration includes all the code needed to render the "Send Feedback" button, as well as the form that is triggered when the button is clicked. Choosing this loading strategy means accepting the largest bundle size in your application. The benefit of this is that the feedback widget is guaranteed to work when the user interacts with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The benefit of this is that the feedback widget is guaranteed to work when the user interacts with it.
We might want to rephrase this, it won't "work" in terms of sending the feedback if the user has adblock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to:
The benefit of this is that the feedback widget is guaranteed to open when the user interacts with it, but in either case network connectivity is required to send the feedback message.
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few suggestions, otherwise this looks good to me, thanks for adding!
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
…ndex.mdx Co-authored-by: Liza Mock <liza.mock@sentry.io>
Co-authored-by: Liza Mock <liza.mock@sentry.io>
#10108) * docs(feedback): Add notes about async loading * review notes * tweak copy * Apply suggestions from code review Co-authored-by: Francesco Novy <francesco.novy@sentry.io> * Update docs/platforms/javascript/common/user-feedback/configuration/index.mdx Co-authored-by: Liza Mock <liza.mock@sentry.io> * Apply suggestions from code review Co-authored-by: Liza Mock <liza.mock@sentry.io> --------- Co-authored-by: Francesco Novy <francesco.novy@sentry.io> Co-authored-by: Liza Mock <liza.mock@sentry.io>
#10108) * docs(feedback): Add notes about async loading * review notes * tweak copy * Apply suggestions from code review Co-authored-by: Francesco Novy <francesco.novy@sentry.io> * Update docs/platforms/javascript/common/user-feedback/configuration/index.mdx Co-authored-by: Liza Mock <liza.mock@sentry.io> * Apply suggestions from code review Co-authored-by: Liza Mock <liza.mock@sentry.io> --------- Co-authored-by: Francesco Novy <francesco.novy@sentry.io> Co-authored-by: Liza Mock <liza.mock@sentry.io>
This adds documentation for a new feature/behavior within the User Feedback SDK -> different strategies for bundling the SDK code within your app.
I tried to be verbose about what's available, and what the defaults are. I hope it makes sense.
Relates to getsentry/sentry#70862