-
-
Notifications
You must be signed in to change notification settings - Fork 12
feat: User feedback API #418
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a404a0a
Add Feedback API with Cocoa implementation
limbonaut 0c648be
Add class docs
limbonaut de34e93
Add basic properties test
limbonaut cf86661
Fix property test
limbonaut 74508ce
Add native implementation
limbonaut ea69cf8
Android extension side
limbonaut 629c302
Test
limbonaut b706836
Android bridge part
limbonaut 4e0e411
Update SentryFeedback.xml
limbonaut 7b9b591
Update CHANGELOG.md
limbonaut 7ad0010
Revert "Test"
limbonaut 5008810
Update SentrySDK.xml
limbonaut 121155e
Update SentrySDK.xml
limbonaut 76389f5
Merge branch 'main' into feat/new-user-feedback-api
limbonaut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <class name="SentryFeedback" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd"> | ||
| <brief_description> | ||
| Represents user feedback in Sentry. | ||
| </brief_description> | ||
| <description> | ||
| </description> | ||
| <tutorials> | ||
| </tutorials> | ||
| <members> | ||
| <member name="associated_event_id" type="String" setter="set_associated_event_id" getter="get_associated_event_id" default=""""> | ||
| The identifier of an error event in the same project. [i]Optional[/i]. | ||
| Use this to explicitly link a related error in the feedback UI. | ||
| </member> | ||
| <member name="contact_email" type="String" setter="set_contact_email" getter="get_contact_email" default=""""> | ||
| The email of the user who submitted the feedback. [i]Optional[/i]. | ||
| If excluded, Sentry attempts to fill this in with user context. Anonymous feedbacks (no name or email) are still accepted. | ||
| </member> | ||
| <member name="message" type="String" setter="set_message" getter="get_message" default=""""> | ||
| Comments of the user, describing what happened and/or sharing feedback. [i]Required[/i]. | ||
| The max length is 4096 characters. | ||
| </member> | ||
| <member name="name" type="String" setter="set_name" getter="get_name" default=""""> | ||
| The name of the user who submitted the feedback. [i]Optional[/i]. | ||
| If excluded, Sentry attempts to fill this in with user context. Anonymous feedbacks (no name or email) are still accepted. | ||
| </member> | ||
| </members> | ||
| </class> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| extends GdUnitTestSuite | ||
| ## Test Feedback class. | ||
|
|
||
|
|
||
| func test_feedback_properties() -> void: | ||
| var feedback := SentryFeedback.new() | ||
|
|
||
| assert_str(feedback.associated_event_id).is_empty() | ||
| feedback.associated_event_id = "082ce03eface41dd94b8c6b005382d5e" | ||
| assert_str(feedback.associated_event_id).is_equal("082ce03eface41dd94b8c6b005382d5e") | ||
|
|
||
| assert_str(feedback.name).is_empty() | ||
| feedback.name = "Bob" | ||
| assert_str(feedback.name).is_equal(feedback.name) | ||
|
|
||
| assert_str(feedback.contact_email).is_empty() | ||
| feedback.contact_email = "[email protected]" | ||
| assert_str(feedback.contact_email).is_equal("[email protected]") | ||
|
|
||
| assert_str(feedback.message).is_empty() | ||
| feedback.message = "something happened" | ||
| assert_str(feedback.message).is_equal("something happened") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| uid://m3p77wja6wk0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #include "sentry_feedback.h" | ||
|
|
||
| #include "sentry/util/simple_bind.h" | ||
|
|
||
| namespace sentry { | ||
|
|
||
| void SentryFeedback::_bind_methods() { | ||
| BIND_PROPERTY(SentryFeedback, PropertyInfo(Variant::STRING, "name"), set_name, get_name); | ||
| BIND_PROPERTY(SentryFeedback, PropertyInfo(Variant::STRING, "contact_email"), set_contact_email, get_contact_email); | ||
| BIND_PROPERTY(SentryFeedback, PropertyInfo(Variant::STRING, "message"), set_message, get_message); | ||
| BIND_PROPERTY(SentryFeedback, PropertyInfo(Variant::STRING, "associated_event_id"), set_associated_event_id, get_associated_event_id); | ||
| } | ||
|
|
||
| } //namespace sentry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #pragma once | ||
|
|
||
| #include <godot_cpp/classes/ref_counted.hpp> | ||
|
|
||
| using namespace godot; | ||
|
|
||
| namespace sentry { | ||
|
|
||
| class SentryFeedback : public RefCounted { | ||
| GDCLASS(SentryFeedback, RefCounted); | ||
|
|
||
| private: | ||
| String name; | ||
| String contact_email; | ||
| String message; | ||
| String associated_event_id; | ||
|
|
||
| protected: | ||
| static void _bind_methods(); | ||
|
|
||
| public: | ||
| String get_name() const { return name; } | ||
| void set_name(const String &p_name) { name = p_name; } | ||
|
|
||
| String get_contact_email() const { return contact_email; } | ||
| void set_contact_email(const String &p_contact_email) { contact_email = p_contact_email; } | ||
|
|
||
| String get_message() const { return message; } | ||
| void set_message(const String &p_message) { message = p_message; } | ||
|
|
||
| String get_associated_event_id() const { return associated_event_id; } | ||
| void set_associated_event_id(const String &p_associated_event_id) { associated_event_id = p_associated_event_id; } | ||
| }; | ||
|
|
||
| } //namespace sentry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.