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

chore(feedback): Update the samples with an attachment/tags example #4322

Merged
merged 25 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
817eac8
Update the client implementation to use the new capture feedback js api
antonis Nov 27, 2024
5370a99
Updates SDK API
antonis Nov 27, 2024
42e2fa1
Adds new feedback button in the sample
antonis Nov 27, 2024
514b102
Adds changelog
antonis Nov 27, 2024
0935bbd
Removes unused mock
antonis Nov 27, 2024
fc22384
Adds event hint
antonis Nov 27, 2024
8b55e8a
Updates samples
antonis Nov 27, 2024
cd178f4
Updates changelog
antonis Nov 27, 2024
8a7018e
Fix lint issue
antonis Nov 27, 2024
fa41526
Updates changelog
antonis Nov 27, 2024
9ea5496
Update CHANGELOG.md
antonis Nov 28, 2024
da0d4ac
Directly use captureFeedback from sentry/core
antonis Nov 28, 2024
3e36c6d
Use import from core
antonis Nov 28, 2024
5f3df64
Fixes imports order lint issue
antonis Nov 28, 2024
71b28e8
Fixes build issue
antonis Nov 28, 2024
f9d2b59
Adds captureFeedback tests from sentry-javascript
antonis Nov 28, 2024
0e54497
Merge branch 'antonis/3859-newCaptureFeedbackAPI' into antonis/3859-n…
antonis Nov 28, 2024
8428d38
Removes unused import
antonis Nov 28, 2024
bd027d8
Removes unneeded PR from changelog
antonis Nov 28, 2024
d05d531
Update CHANGELOG.md
krystofwoldrich Nov 28, 2024
2bb104b
Only deprecate client captureUserFeedback
antonis Nov 28, 2024
dd4be93
Merge branch 'antonis/3859-newCaptureFeedbackAPI' into antonis/3859-n…
antonis Nov 28, 2024
3ec17bd
Upload a simple textfile
antonis Nov 28, 2024
70ce204
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-hint
antonis Dec 2, 2024
a3a83bd
Update CHANGELOG.md
krystofwoldrich Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
email: "[email protected]",
message: "Hello World!",
associatedEventId: eventId, // optional
}, {
captureContext: {
tags: { "tag-key": "tag-value" },
},
attachments: [
{
filename: 'hello.txt',
data: 'Hello, World!',
},
],
});
```

Expand Down
27 changes: 27 additions & 0 deletions samples/react-native-macos/src/components/UserFeedbackModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,33 @@ export function UserFeedbackModal(props: { onDismiss: () => void }) {
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Send feedback with attachment and tags"
color="#6C5FC7"
onPress={async () => {
onDismiss();

const userFeedback: SendFeedbackParams = {
message: comments,
name: 'John Doe',
email: '[email protected]',
};

Sentry.captureFeedback(userFeedback, {
captureContext: {
tags: { testtag: 'testvalue' },
},
attachments: [
{
filename: 'hello.txt',
data: 'Hello, World!',
},
],
});
clearComments();
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Close"
color="#6C5FC7"
Expand Down
27 changes: 27 additions & 0 deletions samples/react-native/src/components/UserFeedbackModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,33 @@ export function UserFeedbackModal(props: { onDismiss: () => void }) {
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Send feedback with attachment and tags"
color="#6C5FC7"
onPress={async () => {
onDismiss();

const userFeedback: SendFeedbackParams = {
message: comments,
name: 'John Doe',
email: '[email protected]',
};

Sentry.captureFeedback(userFeedback, {
captureContext: {
tags: { testtag: 'testvalue' },
},
attachments: [
{
filename: 'hello.txt',
data: 'Hello, World!',
},
],
});
clearComments();
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Close"
color="#6C5FC7"
Expand Down
Loading