(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

(1) feat: Add Feedback Form Component - #4328

Merged
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form
Jan 10, 2025
Merged

(1) feat: Add Feedback Form Component #4328
antonis merged 92 commits into
feedback-uifrom
antonis/3859-newCaptureFeedbackAPI-Form

Conversation

@antonis

@antonisantonis commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds a basic feedback form with the following fields: name, email, description.
The form text and styles can be customised.

Feedback Form Sample ButtonFeedback Form iOSFeedback Form Android
Simulator Screenshot - iPhone SE (3rd generation) - 2024-11-29 at 23 16 21Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-11 at 16 44 55Screenshot_1733913880

Subtask PRs:

💡 Motivation and Context

Fixes#4336

💚 How did you test it?

CI, Manual testing (example)

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time486.00 ms475.61 ms-10.39 ms
Size17.75 MiB20.12 MiB2.37 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8ae23a7526.83 ms513.38 ms-13.45 ms
61310e1464.42 ms452.47 ms-11.95 ms
13f280b486.16 ms472.45 ms-13.71 ms
c6f01ea486.20 ms486.98 ms0.77 ms
1d86dd6405.14 ms411.06 ms5.92 ms
cdf2bdf448.42 ms443.42 ms-5.00 ms
de59d3a486.48 ms495.66 ms9.18 ms
f06c879408.41 ms424.54 ms16.13 ms
d2c32bb448.85 ms450.19 ms1.34 ms
8ab11b6462.10 ms450.40 ms-11.70 ms

App size

RevisionPlainWith SentryDiff
8ae23a717.74 MiB20.07 MiB2.34 MiB
61310e117.74 MiB20.08 MiB2.35 MiB
13f280b17.74 MiB20.08 MiB2.34 MiB
c6f01ea17.74 MiB20.10 MiB2.36 MiB
1d86dd617.73 MiB19.86 MiB2.12 MiB
cdf2bdf17.74 MiB20.10 MiB2.36 MiB
de59d3a17.74 MiB20.10 MiB2.36 MiB
f06c87917.73 MiB19.85 MiB2.12 MiB
d2c32bb17.74 MiB20.08 MiB2.34 MiB
8ab11b617.74 MiB20.09 MiB2.35 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
41e9784450.17 ms448.69 ms-1.48 ms
cadf235462.20 ms463.34 ms1.14 ms
d33790a442.93 ms439.94 ms-3.00 ms
a06f6ba424.02 ms415.82 ms-8.20 ms
e0624b6447.67 ms441.08 ms-6.59 ms
a3ba405438.16 ms435.78 ms-2.38 ms
50c70c0496.82 ms526.02 ms29.20 ms
561640f461.96 ms458.11 ms-3.85 ms
0781f75452.32 ms457.22 ms4.91 ms
38a278b473.58 ms468.76 ms-4.82 ms

App size

RevisionPlainWith SentryDiff
41e978417.75 MiB20.12 MiB2.37 MiB
cadf23517.74 MiB20.09 MiB2.35 MiB
d33790a17.74 MiB20.10 MiB2.36 MiB
a06f6ba17.74 MiB20.09 MiB2.35 MiB
e0624b617.74 MiB20.10 MiB2.36 MiB
a3ba40517.74 MiB20.09 MiB2.35 MiB
50c70c017.74 MiB20.10 MiB2.36 MiB
561640f17.74 MiB20.09 MiB2.35 MiB
0781f7517.74 MiB20.09 MiB2.35 MiB
38a278b17.74 MiB20.10 MiB2.37 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time427.72 ms433.56 ms5.85 ms
Size7.15 MiB8.38 MiB1.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
b1e8712+dirty322.55 ms331.84 ms9.29 ms
07e58c9+dirty391.00 ms409.66 ms18.66 ms
7bc4d75+dirty420.96 ms472.25 ms51.29 ms
12427f4+dirty379.48 ms400.92 ms21.44 ms
9282172+dirty363.57 ms399.78 ms36.20 ms
43e66e0+dirty378.20 ms404.59 ms26.40 ms
eb1e19f+dirty391.37 ms418.27 ms26.90 ms
8e80789+dirty464.48 ms551.10 ms86.63 ms
cdf2bdf+dirty391.69 ms461.14 ms69.45 ms
e1ea4a8+dirty451.98 ms497.58 ms45.60 ms

App size

RevisionPlainWith SentryDiff
b1e8712+dirty7.15 MiB8.04 MiB912.27 KiB
07e58c9+dirty7.15 MiB8.35 MiB1.20 MiB
7bc4d75+dirty7.15 MiB8.35 MiB1.20 MiB
12427f4+dirty7.15 MiB8.12 MiB997.78 KiB
9282172+dirty7.15 MiB8.37 MiB1.22 MiB
43e66e0+dirty7.15 MiB8.37 MiB1.22 MiB
eb1e19f+dirty7.15 MiB8.35 MiB1.20 MiB
8e80789+dirty7.15 MiB8.37 MiB1.22 MiB
cdf2bdf+dirty7.15 MiB8.38 MiB1.23 MiB
e1ea4a8+dirty7.15 MiB8.35 MiB1.20 MiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
a3ba405+dirty359.67 ms436.86 ms77.19 ms
e0624b6+dirty359.30 ms397.94 ms38.64 ms
38a278b+dirty392.43 ms442.41 ms49.97 ms
cadf235+dirty455.51 ms451.64 ms-3.87 ms
41e9784+dirty372.23 ms395.22 ms22.99 ms
50c70c0+dirty385.30 ms433.06 ms47.76 ms
edc8020+dirty393.94 ms407.87 ms13.93 ms
03c9048+dirty397.35 ms417.73 ms20.37 ms
f4a5053+dirty391.02 ms427.04 ms36.02 ms
d33790a+dirty404.87 ms473.06 ms68.19 ms

App size

RevisionPlainWith SentryDiff
a3ba405+dirty7.15 MiB8.37 MiB1.22 MiB
e0624b6+dirty7.15 MiB8.38 MiB1.23 MiB
38a278b+dirty7.15 MiB8.38 MiB1.23 MiB
cadf235+dirty7.15 MiB8.37 MiB1.22 MiB
41e9784+dirty7.15 MiB8.38 MiB1.23 MiB
50c70c0+dirty7.15 MiB8.38 MiB1.23 MiB
edc8020+dirty7.15 MiB8.38 MiB1.23 MiB
03c9048+dirty7.15 MiB8.38 MiB1.23 MiB
f4a5053+dirty7.15 MiB8.38 MiB1.23 MiB
d33790a+dirty7.15 MiB8.38 MiB1.23 MiB

@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1234.61 ms1236.35 ms1.73 ms
Size3.19 MiB4.26 MiB1.07 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1225.07 ms1221.00 ms-4.07 ms
5a22220+dirty1246.18 ms1249.61 ms3.43 ms
13f280b+dirty1217.73 ms1229.08 ms11.35 ms
d7401ac+dirty1288.10 ms1289.54 ms1.44 ms
8fe7c9d+dirty1227.63 ms1245.28 ms17.65 ms
9385d74+dirty1239.51 ms1245.88 ms6.37 ms
cdf2f33+dirty1210.00 ms1218.50 ms8.50 ms
2534337+dirty1220.87 ms1221.47 ms0.60 ms
4297324+dirty1240.86 ms1232.04 ms-8.81 ms
12427f4+dirty1224.90 ms1231.40 ms6.50 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.92 MiB3.64 MiB740.56 KiB
5a22220+dirty2.92 MiB3.48 MiB575.81 KiB
13f280b+dirty2.92 MiB3.66 MiB758.67 KiB
d7401ac+dirty2.92 MiB3.40 MiB488.06 KiB
8fe7c9d+dirty3.19 MiB4.24 MiB1.06 MiB
9385d74+dirty2.92 MiB3.67 MiB772.40 KiB
cdf2f33+dirty2.92 MiB3.66 MiB755.50 KiB
2534337+dirty2.92 MiB3.43 MiB529.76 KiB
4297324+dirty2.92 MiB3.64 MiB741.22 KiB
12427f4+dirty2.92 MiB3.44 MiB533.29 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1247.14 ms1242.86 ms-4.28 ms
0781f75+dirty1247.90 ms1237.11 ms-10.79 ms
edc8020+dirty1245.50 ms1241.70 ms-3.80 ms
561640f+dirty1237.10 ms1229.59 ms-7.51 ms
26fc306+dirty1229.10 ms1227.88 ms-1.22 ms
03c9048+dirty1231.52 ms1225.96 ms-5.56 ms
27e1bf3+dirty1245.78 ms1244.38 ms-1.40 ms
f4a5053+dirty1233.04 ms1240.02 ms6.98 ms
e0624b6+dirty1229.19 ms1232.18 ms3.00 ms
a06f6ba+dirty1235.31 ms1238.76 ms3.45 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.92 MiB3.67 MiB773.59 KiB
0781f75+dirty2.92 MiB3.67 MiB773.83 KiB
edc8020+dirty2.92 MiB3.69 MiB793.89 KiB
561640f+dirty2.92 MiB3.67 MiB773.72 KiB
26fc306+dirty2.92 MiB3.67 MiB773.77 KiB
03c9048+dirty2.92 MiB3.67 MiB774.29 KiB
27e1bf3+dirty2.92 MiB3.67 MiB773.54 KiB
f4a5053+dirty2.92 MiB3.67 MiB774.18 KiB
e0624b6+dirty2.92 MiB3.67 MiB773.62 KiB
a06f6ba+dirty2.92 MiB3.67 MiB773.87 KiB

@antonisantonis changed the title Add simple form UIFeedback form UINov 29, 2024
@github-actions

github-actionsBot commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1233.31 ms1232.10 ms-1.20 ms
Size2.63 MiB3.69 MiB1.06 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
484813b+dirty1222.45 ms1220.79 ms-1.66 ms
5a22220+dirty1209.49 ms1220.94 ms11.45 ms
13f280b+dirty1229.25 ms1226.10 ms-3.15 ms
d7401ac+dirty1252.38 ms1275.04 ms22.66 ms
8fe7c9d+dirty1241.83 ms1244.35 ms2.51 ms
9385d74+dirty1215.18 ms1216.43 ms1.25 ms
cdf2f33+dirty1227.71 ms1233.94 ms6.22 ms
2534337+dirty1225.08 ms1230.26 ms5.17 ms
4297324+dirty1230.27 ms1232.53 ms2.27 ms
12427f4+dirty1267.15 ms1271.30 ms4.15 ms

App size

RevisionPlainWith SentryDiff
484813b+dirty2.36 MiB3.08 MiB734.18 KiB
5a22220+dirty2.36 MiB2.92 MiB570.21 KiB
13f280b+dirty2.36 MiB3.10 MiB753.43 KiB
d7401ac+dirty2.36 MiB2.83 MiB481.14 KiB
8fe7c9d+dirty2.63 MiB3.68 MiB1.04 MiB
9385d74+dirty2.36 MiB3.10 MiB759.78 KiB
cdf2f33+dirty2.36 MiB3.10 MiB751.38 KiB
2534337+dirty2.36 MiB2.88 MiB525.47 KiB
4297324+dirty2.36 MiB3.08 MiB735.61 KiB
12427f4+dirty2.36 MiB2.88 MiB530.38 KiB

Previous results on branch: antonis/3859-newCaptureFeedbackAPI-Form

Startup times

RevisionPlainWith SentryDiff
d33790a+dirty1234.19 ms1231.76 ms-2.43 ms
0781f75+dirty1222.19 ms1222.11 ms-0.08 ms
edc8020+dirty1235.24 ms1236.69 ms1.44 ms
561640f+dirty1220.45 ms1227.02 ms6.57 ms
26fc306+dirty1227.25 ms1225.85 ms-1.40 ms
03c9048+dirty1235.37 ms1238.15 ms2.77 ms
27e1bf3+dirty1230.92 ms1232.33 ms1.41 ms
f4a5053+dirty1225.32 ms1231.47 ms6.15 ms
e0624b6+dirty1221.86 ms1226.42 ms4.57 ms
a06f6ba+dirty1230.45 ms1227.09 ms-3.36 ms

App size

RevisionPlainWith SentryDiff
d33790a+dirty2.36 MiB3.11 MiB761.06 KiB
0781f75+dirty2.36 MiB3.11 MiB761.35 KiB
edc8020+dirty2.36 MiB3.13 MiB782.76 KiB
561640f+dirty2.36 MiB3.11 MiB761.19 KiB
26fc306+dirty2.36 MiB3.11 MiB761.18 KiB
03c9048+dirty2.36 MiB3.11 MiB761.74 KiB
27e1bf3+dirty2.36 MiB3.11 MiB761.03 KiB
f4a5053+dirty2.36 MiB3.11 MiB761.72 KiB
e0624b6+dirty2.36 MiB3.11 MiB761.16 KiB
a06f6ba+dirty2.36 MiB3.11 MiB761.35 KiB

Base automatically changed from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
An error occurred while trying to automatically change base from antonis/3859-newCaptureFeedbackAPI to mainDecember 2, 2024 10:46
Comment threadCHANGELOG.md Outdated

To learn how to attach context data to the feedback visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/).

- User Feedback Form Component Beta ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed with 9853630

Comment on lines +24 to +47
let feedbackFormHandler: (() => void) | null = null;

const setFeedbackFormHandler = (handler: () => void): void => {
feedbackFormHandler = handler;
};

const clearFeedbackFormHandler = (): void => {
feedbackFormHandler = null;
};

type Navigation = {
navigate: (screen: string, params?: Record<string, unknown>) => void;
};

export const showFeedbackForm = (navigation: Navigation): void => {
setFeedbackFormHandler(() => {
navigation?.navigate?.('FeedbackForm');
});
if (feedbackFormHandler) {
feedbackFormHandler();
} else {
logger.error('FeedbackForm handler is not set. Please ensure it is initialized.');
}
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was merged from #4370


I would keep the auto inject out of the this PR.

I think we should not export this helper, because to use it user still have to create a screen which will present the FeedbackForm component. Only then the helper shows the form.


The auto inject should work without manually specifying the FeedbackForm component and should be independent of any nav library. (We can create helper for specific bav libs later...)

I imagine when I call showFeedbackForm() the form will just show, no need to setup anything besides Sentry.init/Sentry.wrap(since we can't inject to dom as on web).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense @krystofwoldrich 👍
I reverted the change with e7a9484 and will iterate on the auto inject on a separate PR.

@antonisantonis mentioned this pull request Jan 10, 2025
@krystofwoldrich
krystofwoldrich changed the base branch from main to feedback-uiJanuary 10, 2025 09:27
@krystofwoldrich

Copy link
Copy Markdown
Contributor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.


public handleFeedbackSubmit: () => void = () => {
const { name, email, description } = this.state;
const { onFormClose } = this.props;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@krystofwoldrichkrystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, just did a last check and run the sample, looks great!

@antonis
antonis merged commit bda351c into feedback-uiJan 10, 2025
@antonis
antonis deleted the antonis/3859-newCaptureFeedbackAPI-Form branch January 10, 2025 10:32
@antonis

Copy link
Copy Markdown
ContributorAuthor

To avoid blocking the chain of the feedback PRs, I changed the target to https://github.com/getsentry/sentry-react-native/tree/feedback-ui

Where we can merge all the current PRs after they are reviewed and then we can merge https://github.com/getsentry/sentry-react-native/tree/feedback-ui to main and release the first feedback beta.

Thank you @krystofwoldrich 🙇
I've drafted a PR #4435 to keep track of the changes merged on the feedback-ui branch.

Sign up for freeto 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.

Implement basic capture feedback form UI

4 participants

@antonis@krystofwoldrich@lucas-zimerman@github-advanced-security