Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Feedback Widget for React Native #4435

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

feat: Feedback Widget for React Native #4435

wants to merge 2 commits into from

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Jan 10, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

TODO

Subtask PRs:

💡 Motivation and Context

Fixes #4302

💚 How did you test it?

CI and manual testing of individual PRs

📝 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

* Update the client implementation to use the new capture feedback js api

* Updates SDK API

* Adds new feedback button in the sample

* Adds changelog

* Removes unused mock

* Update CHANGELOG.md

Co-authored-by: Krystof Woldrich <[email protected]>

* Directly use captureFeedback from sentry/core

* Use import from core

* Fixes imports order lint issue

* Fixes build issue

* Adds captureFeedback tests from sentry-javascript

* Update CHANGELOG.md

* Only deprecate client captureUserFeedback

* Add simple form UI

* Adds basic form functionality

* Update imports

* Update imports

* Remove useState hook to avoid multiple react instances issues

* Move types and styles in different files

* Removes attachment button to be added back separately along with the implementation

* Add basic field validation

* Adds changelog

* Updates changelog

* Updates changelog

* Trim whitespaces from the submitted feedback

* Adds tests

* Renames FeedbackFormScreen to FeedbackForm

* Add beta label

* Extract default text to constants

* Moves constant to a separate file and aligns naming with JS

* Adds input text labels

* Close screen before sending the feedback to minimise wait time

Co-authored-by: LucasZF <[email protected]>

* Rename file for consistency

* Flatten configuration hierarchy and clean up

* Align required values with JS

* Use Sentry user email and name when set

* Simplifies email validation

* Show success alert message

* Aligns naming with JS and unmounts the form by default

* Use the minimum config without props in the changelog

* Adds development not for unimplemented function

* Show email and name conditionally

* Adds sentry branding (png logo)

* Adds sentry logo resource

* Add assets in module exports

* Revert "Add assets in module exports"

This reverts commit 5292475.

* Revert "Adds sentry logo resource"

This reverts commit d6e9229.

* Revert "Adds sentry branding (png logo)"

This reverts commit 8c56753.

* Add last event id

* Mock lastEventId

* Adds beta note in the changelog

* Updates changelog

* Align colors with JS

* Update CHANGELOG.md

Co-authored-by: Krystof Woldrich <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Krystof Woldrich <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Krystof Woldrich <[email protected]>

* Use regular fonts for both buttons

* Handle keyboard properly

* Adds an option on whether the email should be validated

* Merge properties only once

* Loads current user data on form construction

* Remove unneeded extra padding

* Fix background color issue

* Fixes changelog typo

* Updates styles background color

Co-authored-by: Krystof Woldrich <[email protected]>

* Use defaultProps

* Correct defaultProps

* Adds test to verify when getUser is called

* (2.2) feat: Add Feedback Form UI Branding logo (#4357)

* Adds sentry branding logo as a base64 encoded png

---------

Co-authored-by: LucasZF <[email protected]>

* Autoinject feedback form (#4370)

* Align changelog entry

* Update changelog

* Revert "Autoinject feedback form (#4370)"

This reverts commit da0e3ea.

---------

Co-authored-by: Krystof Woldrich <[email protected]>
Co-authored-by: LucasZF <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 10, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Feedback Widget for React Native ([#4435](https://github.com/getsentry/sentry-react-native/pull/4435))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 078cb37

@antonis antonis mentioned this pull request Jan 10, 2025
10 tasks
@antonis antonis changed the title Feedback Widget for React Native feat: Feedback Widget for React Native Jan 10, 2025
Copy link
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 491.48 ms 486.13 ms -5.35 ms
Size 17.75 MiB 20.12 MiB 2.37 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8ae23a7 526.83 ms 513.38 ms -13.45 ms
61310e1 464.42 ms 452.47 ms -11.95 ms
13f280b 486.16 ms 472.45 ms -13.71 ms
c6f01ea 486.20 ms 486.98 ms 0.77 ms
1d86dd6 405.14 ms 411.06 ms 5.92 ms
cdf2bdf 448.42 ms 443.42 ms -5.00 ms
de59d3a 486.48 ms 495.66 ms 9.18 ms
f06c879 408.41 ms 424.54 ms 16.13 ms
d2c32bb 448.85 ms 450.19 ms 1.34 ms
8ab11b6 462.10 ms 450.40 ms -11.70 ms

App size

Revision Plain With Sentry Diff
8ae23a7 17.74 MiB 20.07 MiB 2.34 MiB
61310e1 17.74 MiB 20.08 MiB 2.35 MiB
13f280b 17.74 MiB 20.08 MiB 2.34 MiB
c6f01ea 17.74 MiB 20.10 MiB 2.36 MiB
1d86dd6 17.73 MiB 19.86 MiB 2.12 MiB
cdf2bdf 17.74 MiB 20.10 MiB 2.36 MiB
de59d3a 17.74 MiB 20.10 MiB 2.36 MiB
f06c879 17.73 MiB 19.85 MiB 2.12 MiB
d2c32bb 17.74 MiB 20.08 MiB 2.34 MiB
8ab11b6 17.74 MiB 20.09 MiB 2.35 MiB

Copy link
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 424.10 ms 466.63 ms 42.53 ms
Size 7.15 MiB 8.38 MiB 1.23 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b1e8712+dirty 322.55 ms 331.84 ms 9.29 ms
07e58c9+dirty 391.00 ms 409.66 ms 18.66 ms
7bc4d75+dirty 420.96 ms 472.25 ms 51.29 ms
12427f4+dirty 379.48 ms 400.92 ms 21.44 ms
9282172+dirty 363.57 ms 399.78 ms 36.20 ms
43e66e0+dirty 378.20 ms 404.59 ms 26.40 ms
eb1e19f+dirty 391.37 ms 418.27 ms 26.90 ms
8e80789+dirty 464.48 ms 551.10 ms 86.63 ms
cdf2bdf+dirty 391.69 ms 461.14 ms 69.45 ms
e1ea4a8+dirty 451.98 ms 497.58 ms 45.60 ms

App size

Revision Plain With Sentry Diff
b1e8712+dirty 7.15 MiB 8.04 MiB 912.27 KiB
07e58c9+dirty 7.15 MiB 8.35 MiB 1.20 MiB
7bc4d75+dirty 7.15 MiB 8.35 MiB 1.20 MiB
12427f4+dirty 7.15 MiB 8.12 MiB 997.78 KiB
9282172+dirty 7.15 MiB 8.37 MiB 1.22 MiB
43e66e0+dirty 7.15 MiB 8.37 MiB 1.22 MiB
eb1e19f+dirty 7.15 MiB 8.35 MiB 1.20 MiB
8e80789+dirty 7.15 MiB 8.37 MiB 1.22 MiB
cdf2bdf+dirty 7.15 MiB 8.38 MiB 1.23 MiB
e1ea4a8+dirty 7.15 MiB 8.35 MiB 1.20 MiB

Copy link
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1232.82 ms 1231.19 ms -1.63 ms
Size 2.63 MiB 3.69 MiB 1.06 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
484813b+dirty 1222.45 ms 1220.79 ms -1.66 ms
5a22220+dirty 1209.49 ms 1220.94 ms 11.45 ms
13f280b+dirty 1229.25 ms 1226.10 ms -3.15 ms
d7401ac+dirty 1252.38 ms 1275.04 ms 22.66 ms
8fe7c9d+dirty 1241.83 ms 1244.35 ms 2.51 ms
9385d74+dirty 1215.18 ms 1216.43 ms 1.25 ms
cdf2f33+dirty 1227.71 ms 1233.94 ms 6.22 ms
2534337+dirty 1225.08 ms 1230.26 ms 5.17 ms
4297324+dirty 1230.27 ms 1232.53 ms 2.27 ms
12427f4+dirty 1267.15 ms 1271.30 ms 4.15 ms

App size

Revision Plain With Sentry Diff
484813b+dirty 2.36 MiB 3.08 MiB 734.18 KiB
5a22220+dirty 2.36 MiB 2.92 MiB 570.21 KiB
13f280b+dirty 2.36 MiB 3.10 MiB 753.43 KiB
d7401ac+dirty 2.36 MiB 2.83 MiB 481.14 KiB
8fe7c9d+dirty 2.63 MiB 3.68 MiB 1.04 MiB
9385d74+dirty 2.36 MiB 3.10 MiB 759.78 KiB
cdf2f33+dirty 2.36 MiB 3.10 MiB 751.38 KiB
2534337+dirty 2.36 MiB 2.88 MiB 525.47 KiB
4297324+dirty 2.36 MiB 3.08 MiB 735.61 KiB
12427f4+dirty 2.36 MiB 2.88 MiB 530.38 KiB

Copy link
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1233.67 ms 1239.80 ms 6.12 ms
Size 3.19 MiB 4.26 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
484813b+dirty 1225.07 ms 1221.00 ms -4.07 ms
5a22220+dirty 1246.18 ms 1249.61 ms 3.43 ms
13f280b+dirty 1217.73 ms 1229.08 ms 11.35 ms
d7401ac+dirty 1288.10 ms 1289.54 ms 1.44 ms
8fe7c9d+dirty 1227.63 ms 1245.28 ms 17.65 ms
9385d74+dirty 1239.51 ms 1245.88 ms 6.37 ms
cdf2f33+dirty 1210.00 ms 1218.50 ms 8.50 ms
2534337+dirty 1220.87 ms 1221.47 ms 0.60 ms
4297324+dirty 1240.86 ms 1232.04 ms -8.81 ms
12427f4+dirty 1224.90 ms 1231.40 ms 6.50 ms

App size

Revision Plain With Sentry Diff
484813b+dirty 2.92 MiB 3.64 MiB 740.56 KiB
5a22220+dirty 2.92 MiB 3.48 MiB 575.81 KiB
13f280b+dirty 2.92 MiB 3.66 MiB 758.67 KiB
d7401ac+dirty 2.92 MiB 3.40 MiB 488.06 KiB
8fe7c9d+dirty 3.19 MiB 4.24 MiB 1.06 MiB
9385d74+dirty 2.92 MiB 3.67 MiB 772.40 KiB
cdf2f33+dirty 2.92 MiB 3.66 MiB 755.50 KiB
2534337+dirty 2.92 MiB 3.43 MiB 529.76 KiB
4297324+dirty 2.92 MiB 3.64 MiB 741.22 KiB
12427f4+dirty 2.92 MiB 3.44 MiB 533.29 KiB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feedback Widget for React Native
1 participant