feat: Log GutenbergKit errors#21621
Conversation
Generated by 🚫 Danger |
Project dependencies changesThe following changes in project dependencies were detected (configuration listtree +--- 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 (*) |
|
| App Name | WordPress |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr21621-e3e4508 | |
| Commit | e3e4508 | |
| Direct Download | wordpress-prototype-build-pr21621-e3e4508.apk |
|
| App Name | Jetpack |
|
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr21621-e3e4508 | |
| Commit | e3e4508 | |
| Direct Download | jetpack-prototype-build-pr21621-e3e4508.apk |
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.
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.
|





Log GutenbergKit errors to the observability platform.
Related:
To Test:
local-builds.gradleto pointGutenbergKitto 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.txtif necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):