-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Log GutenbergKit errors #21621
Conversation
Generated by 🚫 Danger |
Project dependencies changesThe following changes in project dependencies were detected (configuration list
tree +--- project :libs:editor
-| +--- org.wordpress.gutenbergkit:android:trunk-cc52214a50893b41898607ac0bff7f2787b085bb
-| | +--- androidx.core:core-ktx:1.13.1 (*)
-| | +--- androidx.appcompat:appcompat:1.7.0 (*)
-| | +--- com.google.android.material:material:1.12.0 (*)
-| | +--- androidx.webkit:webkit:1.11.0 -> 1.12.1 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0 -> 1.9.10 (*)
+| +--- org.wordpress.gutenbergkit:android:trunk-fb31301ea6a94376237947afb4242f75c074f43c
+| | +--- androidx.core:core-ktx:1.13.1 (*)
+| | +--- androidx.appcompat:appcompat:1.7.0 (*)
+| | +--- com.google.android.material:material:1.12.0 (*)
+| | +--- androidx.webkit:webkit:1.11.0 -> 1.12.1 (*)
+| | +--- com.google.code.gson:gson:2.8.9 -> 2.11.0
+| | | \--- com.google.errorprone:error_prone_annotations:2.27.0
+| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0 -> 1.9.10 (*)
-| \--- com.google.code.gson:gson:2.11.0
-| \--- com.google.errorprone:error_prone_annotations:2.27.0
+| \--- com.google.code.gson:gson:2.11.0 (*)
-\--- org.wordpress.gutenbergkit:android:trunk-cc52214a50893b41898607ac0bff7f2787b085bb (*)
+\--- org.wordpress.gutenbergkit:android:trunk-fb31301ea6a94376237947afb4242f75c074f43c (*) |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #21621 +/- ##
=======================================
Coverage 39.44% 39.44%
=======================================
Files 2119 2119
Lines 99485 99485
Branches 15308 15308
=======================================
Hits 39246 39246
Misses 56760 56760
Partials 3479 3479 ☔ View full report in Codecov by Sentry. |
val stackTraceElements = exception.stackTrace.map { stackTrace -> | ||
JsExceptionStackTraceElement( | ||
stackTrace.fileName, | ||
stackTrace.lineNumber, | ||
stackTrace.colNumber, | ||
stackTrace.function | ||
) | ||
} | ||
|
||
val jsException = JsException( | ||
exception.type, | ||
exception.message, | ||
stackTraceElements, | ||
exception.context, | ||
exception.tags, | ||
exception.isHandled, | ||
exception.handledBy | ||
) | ||
|
||
val callback = object : JsExceptionCallback { | ||
override fun onReportSent(success: Boolean) { | ||
// Do nothing | ||
} | ||
} |
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.
I dislike placing all of this GBK-specific logic in this file. I imagine it would require a larger refactor to avoid this, and I feel less confident envisioning what that might resemble. As one may notice, this addition mimics similar logic around it.
I welcome any thoughts of simple improvements, as well as long-term refactor ideas for decoupling the various editors. Transparently, the current Android editor logic is very confusing to me.
This comment was marked as resolved.
This comment was marked as resolved.
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.
@dcalhoun I verified that this is working as expected. Feel free to merge when ready!
Quality Gate passedIssues Measures |
Log GutenbergKit errors to the observability platform.
Related:
To Test:
local-builds.gradle
to pointGutenbergKit
to your local clone of the GBK repository.Example error diff
Regression Notes
Regressions in Gutenberg Mobile or Aztec editors.
Manually tested.
Deemed unnecessary for the experimental editor.
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):