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

fix(feedback): Be consistent about whether screenshot should and can render #11859

Merged
merged 2 commits into from
May 1, 2024

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented May 1, 2024

This fixes the conditions for loading and rendering the screenshot integration.... also improves the conditions for not rendering it if we're on a mobile device.

  • We should check the localoptions.showScreenshot instead of the closed-over showScreenshot because the options might have changed for this instance of the widget
  • We should combine options.showScreenshot (the desire) with isScreenshotSupported() (the possibility) to set the right expectation

Copy link
Contributor

github-actions bot commented May 1, 2024

size-limit report 📦

Path Size
@sentry/browser 21.64 KB (added)
@sentry/browser (incl. Tracing) 32.68 KB (added)
@sentry/browser (incl. Tracing, Replay) 68.03 KB (added)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.43 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.07 KB (added)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.27 KB (added)
@sentry/browser (incl. Feedback) 37.83 KB (added)
@sentry/browser (incl. sendFeedback) 26.43 KB (added)
@sentry/browser (incl. FeedbackAsync) 30.96 KB (added)
@sentry/react 24.33 KB (added)
@sentry/react (incl. Tracing) 35.64 KB (added)
@sentry/vue 25.47 KB (added)
@sentry/vue (incl. Tracing) 34.47 KB (added)
@sentry/svelte 21.77 KB (added)
CDN Bundle 24.02 KB (added)
CDN Bundle (incl. Tracing) 34.05 KB (added)
CDN Bundle (incl. Tracing, Replay) 67.72 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) 73.05 KB (added)
CDN Bundle - uncompressed 70.62 KB (added)
CDN Bundle (incl. Tracing) - uncompressed 100.98 KB (added)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.59 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 224.22 KB (added)
@sentry/nextjs (client) 34.86 KB (added)
@sentry/sveltekit (client) 33.24 KB (added)
@sentry/node 138.47 KB (added)

@ryan953 ryan953 requested a review from a team May 1, 2024 19:40
? _findIntegration<FeedbackScreenshotIntegration>(
'FeedbackScreenshot',
getScreenshotIntegration,
'feedbackScreenshotIntegration',
)
: undefined,
]);
if (!modalIntegration || (showScreenshot && !screenshotIntegration)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line was preventing the modal from rendering on a real mobile device if showScreenshot:true was set.

why?
we asked for screenshots,
but it's not supported, so we didn't load it
and this like says "we expected it to be loaded, but it's not"

fixed now!

@ryan953 ryan953 merged commit 7e6c23e into develop May 1, 2024
91 checks passed
@ryan953 ryan953 deleted the ryan953/feedback-screenshot-loading branch May 1, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants