-
-
Notifications
You must be signed in to change notification settings - Fork 452
New User Feedback form #4384
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
base: main
Are you sure you want to change the base?
New User Feedback form #4384
Conversation
Added Scopes.captureFeedback API Changed the MainActivity sample app to use the new API
captureFeedback does not update scope lastEventId anymore
added SentryOptions.beforeSendFeedback implemented SentryClient.captureFeedback
# Conflicts: # CHANGELOG.md # sentry/api/sentry.api # sentry/src/main/java/io/sentry/SentryClient.java
added first draft of SentryUserFeedbackDialog
…idget # Conflicts: # CHANGELOG.md
added feedbackOptions to SentryOptions added callbacks to SentryUserFeedbackDialog
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
c3914aa | 401.70 ms | 437.38 ms | 35.68 ms |
b79d17c | 431.40 ms | 488.06 ms | 56.66 ms |
ded4b06 | 409.00 ms | 469.23 ms | 60.23 ms |
f362a97 | 414.44 ms | 463.76 ms | 49.32 ms |
a83c559 | 459.20 ms | 529.53 ms | 70.34 ms |
560a588 | 466.82 ms | 493.07 ms | 26.25 ms |
9f19891 | 402.73 ms | 525.00 ms | 122.27 ms |
1792f53 | 430.40 ms | 486.48 ms | 56.08 ms |
75996c3 | 414.94 ms | 454.02 ms | 39.08 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
c3914aa | 1.58 MiB | 2.12 MiB | 548.00 KiB |
b79d17c | 1.58 MiB | 2.09 MiB | 517.60 KiB |
ded4b06 | 1.58 MiB | 2.09 MiB | 517.61 KiB |
f362a97 | 1.58 MiB | 2.12 MiB | 548.01 KiB |
a83c559 | 1.58 MiB | 2.09 MiB | 515.74 KiB |
560a588 | 1.58 MiB | 2.12 MiB | 548.00 KiB |
9f19891 | 1.58 MiB | 2.09 MiB | 515.84 KiB |
1792f53 | 1.58 MiB | 2.12 MiB | 547.60 KiB |
75996c3 | 1.58 MiB | 2.12 MiB | 547.61 KiB |
added feedback message truncation SentryClient doesn't check for backfillable feedbacks anymore
…idget # Conflicts: # CHANGELOG.md
added dialog theme to sample app MainActivity "send user feedback" button now opens feedback dialog instead of sending feedback
# Conflicts: # sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.java # sentry/api/sentry.api # sentry/src/main/java/io/sentry/HubAdapter.java # sentry/src/main/java/io/sentry/HubScopesWrapper.java # sentry/src/main/java/io/sentry/IScopes.java # sentry/src/main/java/io/sentry/NoOpHub.java # sentry/src/main/java/io/sentry/NoOpScopes.java # sentry/src/main/java/io/sentry/Scopes.java # sentry/src/main/java/io/sentry/ScopesAdapter.java # sentry/src/main/java/io/sentry/SentryClient.java # sentry/src/main/java/io/sentry/transport/RateLimiter.java
fixed feedback form behaviour added manifest options
updated changelog
updated changelog
added delegate listener to avoid user overwriting our OnDismissListener for the feedback dialog
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I left a few comments around the API, let's sort those out before merging. On top of that: Do you know if other SDKs provide default i18n for the widget? Or is it really up the the user to provide their own?
@@ -2,7 +2,8 @@ | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<uses-permission android:name="android.permission.INTERNET"/> | |||
|
|||
<application> | |||
<application | |||
android:supportsRtl="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to set supportsRtl
? I'm wondering if this could cause manifest merging issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
i think it's because of the start/end properties of the dialog
like layout_alignEnd
I can change it to layout_alignRight
and see if i can skip the supportsRtl
super(context); | ||
} | ||
|
||
public SentryUserFeedbackDialog( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a ctor or a Dialog builder which takes SentryFeedbackOptions
as input? IMHO I would even do that in favor of Manifest options, as it allows you to e.g. use localized labels
android:layout_below="@id/sentry_dialog_user_feedback_txt_description" /> | ||
|
||
<Button | ||
android:id="@+id/sentry_dialog_user_feedback_btn_send" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have the buttons horizontally, side by side? At least that would be more Android-ish.
See https://developer.android.com/develop/ui/views/components/dialogs
android:id="@+id/sentry_dialog_user_feedback_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="Report a Bug" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use "tools:text"
instead for some nice preview, as it all will be overwritten anyway right?
📜 Description
Continuation of #4286
Add the new User Feedback form (an AlertDialog)
Add all relevant options for customizations and callbacks
Here is the result.
How the form is shown in the example app with light theme and no customization

How the form is shown in the example app with dark theme and no customization

How the form is shown in the example app with (pretty bad) customization

💡 Motivation and Context
Implements first part of #3613
💚 How did you test it?
ui test (
UserFeedbackUiTest
)📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps
Next PR will have the widget (the button that actually show the form)
After that, we'll have screenshots and whatever