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 reason argument to onFormClose callback #12811

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Jul 8, 2024

Adds a reason argument to onFormClose so folks can tell the difference between users who've clicked the intentional "Cancel" button, vs. clicks outside of the feedback form which might've unintentionally hidden the form.

Relates to #12812

@ryan953 ryan953 requested a review from a team as a code owner July 8, 2024 22:58
@ryan953 ryan953 force-pushed the ryan953/73901-add-reason-to-onFormClose branch from 3590265 to d916488 Compare July 8, 2024 23:04
Copy link
Contributor

github-actions bot commented Jul 8, 2024

size-limit report 📦

Path Size
@sentry/browser 22.31 KB (0%)
@sentry/browser (incl. Tracing) 33.64 KB (0%)
@sentry/browser (incl. Tracing, Replay) 69.42 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.75 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.47 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 86.17 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 88.03 KB (+0.06% 🔺)
@sentry/browser (incl. metrics) 26.59 KB (0%)
@sentry/browser (incl. Feedback) 39.03 KB (+0.13% 🔺)
@sentry/browser (incl. sendFeedback) 26.92 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.56 KB (+0.06% 🔺)
@sentry/react 25.05 KB (0%)
@sentry/react (incl. Tracing) 36.69 KB (0%)
@sentry/vue 26.41 KB (0%)
@sentry/vue (incl. Tracing) 35.53 KB (0%)
@sentry/svelte 22.44 KB (0%)
CDN Bundle 23.53 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing) 35.42 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.53 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.75 KB (+0.02% 🔺)
CDN Bundle - uncompressed 69.03 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 104.79 KB (+0.02% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 215.18 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 227.91 KB (+0.02% 🔺)
@sentry/nextjs (client) 36.57 KB (0%)
@sentry/sveltekit (client) 34.3 KB (0%)
@sentry/node 130.81 KB (0%)
@sentry/node - without tracing 91.89 KB (0%)
@sentry/aws-serverless 117.06 KB (-0.01% 🔽)

@ryan953 ryan953 changed the title feat(feedback): Add reason argument to onFormClose callback feat(feedback): Add reason argument to onFormClose callback Jul 9, 2024
@@ -16,6 +16,21 @@ export default [
},
}),
),
...makeBundleConfigVariants(
Copy link
Member

Choose a reason for hiding this comment

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

what's this needed for?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, this isn't needed. I think it's leftover when i was playing with bundle-size measurements. This isn't a real bundle that we should be shipping.

@@ -2,7 +2,7 @@ import type { Integration } from '@sentry/types';
import { consoleSandbox } from '@sentry/utils';
import { FAKE_FUNCTION } from './common';

const FEEDBACK_INTEGRATION_METHODS = ['attachTo', 'createWidget', 'remove'] as const;
const FEEDBACK_INTEGRATION_METHODS = ['attachTo', 'createForm', 'createWidget', 'remove'] as const;
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 shim was missing before, nice to get it in

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.

2 participants