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

[RNMobile] Add error boundry handling for Android #6690

Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
76eabd4
Update Gutenberg ref
fluiddot Feb 20, 2024
b753732
Add error logging setup
fluiddot Feb 20, 2024
24f4aa0
Update Gutenberg ref
fluiddot Feb 22, 2024
ae8851c
Add bundle and source map files to gitignore
fluiddot Feb 22, 2024
4556a29
Include source map when generating the xcframework
fluiddot Feb 22, 2024
2afe0f4
Update Gutenberg ref
fluiddot Feb 22, 2024
6fd1862
Upload source map artifact during JS bundle generation
fluiddot Feb 22, 2024
b3db684
Update Gutenberg ref
fluiddot Feb 23, 2024
ecb8b0a
Trigger default error handler after sending an unhandled JS exception
fluiddot Feb 23, 2024
19d9b7f
Call default error handler only after the exception is sent
fluiddot Feb 23, 2024
d883dd2
Update Gutenberg ref
fluiddot Feb 26, 2024
d0b3119
Merge branch 'trunk' into add/error-boundary
fluiddot Feb 26, 2024
6a50374
Generate composed source map after creating bundles
fluiddot Feb 26, 2024
815fd89
Update Gutenberg ref
fluiddot Feb 27, 2024
61ba344
Mark exceptions detected by error handler as unhandled
fluiddot Feb 27, 2024
6bd6d87
Update Gutenberg ref
fluiddot Feb 27, 2024
2640b6d
Limit exception logging to fatal errors
fluiddot Feb 27, 2024
3785095
Update Gutenberg ref
fluiddot Feb 27, 2024
0003382
Update Gutenberg ref
fluiddot Feb 27, 2024
556f6ad
Update Gutenberg ref
fluiddot Feb 27, 2024
cdf9bfd
Update Gutenberg ref
fluiddot Feb 28, 2024
6fdcd61
Merge branch 'trunk' into add/error-boundary
fluiddot Feb 28, 2024
f1698d6
Include source map to Android assets
fluiddot Feb 28, 2024
c06df89
Update Gutenberg ref
fluiddot Feb 29, 2024
32e5e93
Update Gutenberg ref
fluiddot Feb 29, 2024
a88a073
Update Gutenberg ref
fluiddot Feb 29, 2024
aaaac21
Update gutenberg submodule hash to a16c50f34293b03500486c8a6c223d79e8…
wpmobilebot Mar 1, 2024
1066311
Update gutenberg submodule hash to b61200e6400aa5ad12cd3c84a3d33b9d63…
wpmobilebot Mar 1, 2024
47a0da3
Merge branch 'add/error-boundary' into version-toolkit/gutenberg/rnmo…
jhnstn Mar 1, 2024
fe13279
Update GB ref
jhnstn Mar 6, 2024
b4982c2
Update gutenberg submodule hash to 76644900d5de2db735c111ccacbccf1a79…
wpmobilebot Mar 6, 2024
c6152e0
Update gutenberg submodule hash to 96f53be3a2c3e5c94dfbb9842d32734c3a…
wpmobilebot Mar 6, 2024
d51231b
Update gutenberg submodule hash to f3211da5804952c2927c20465ba23b702c…
wpmobilebot Mar 7, 2024
994b58b
Update gutenberg submodule hash to d8c72e18d2941453426d65dc2e2cbed8a6…
wpmobilebot Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'trunk' into add/error-boundary
# Conflicts:
#	gutenberg
#	ios-xcframework/XCFrameworkScaffold.xcodeproj/project.pbxproj
  • Loading branch information
fluiddot committed Feb 26, 2024
commit d0b3119c2ba9849d040aa6e0f815cb67d6b02075
4 changes: 4 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ steps:
plugins:
- *nvm_plugin
- *ci_toolkit_plugin
- *git-cache-plugin
agents:
queue: android
command: .buildkite/commands/unit-tests-android.sh
@@ -71,6 +72,7 @@ steps:
plugins:
- *nvm_plugin
- *ci_toolkit_plugin
- *git-cache-plugin
agents:
queue: android
command: .buildkite/commands/unit-tests-ios.sh
@@ -113,6 +115,8 @@ steps:
- android-unit-tests
- ios-unit-tests
key: js-bundles
agents:
queue: android
plugins:
# The following plugins are disabled temporarily until PHP is available.
# In the meantime, we'll keep using the GB-mobile docker container.
4 changes: 4 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Unreleased
---
* [**] Introduce VideoPress v5 support, to fix issues using video block with dotcom and Jetpack sites [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6634]
* [*] Prevent crash when autoscrolling to blocks [https://github.com/WordPress/gutenberg/pull/59110]
* [*] Remove opacity change when images are being uploaded [https://github.com/WordPress/gutenberg/pull/59264]
* [*] Media & Text blocks correctly show an error message when the attached video upload fails [https://github.com/WordPress/gutenberg/pull/59288]

1.112.0
---
7 changes: 6 additions & 1 deletion bundle/android/strings.xml
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@
<!-- translators: displays audio file extension. e.g. MP3 audio file -->
<string name="gutenberg_native_audio_file" tools:ignore="UnusedResources">audio file</string>
<string name="gutenberg_native_audio_player" tools:ignore="UnusedResources">Audio Player</string>
<string name="gutenberg_native_autoplay_may_cause_usability_issues_for_some_users" tools:ignore="UnusedResources">Autoplay may cause usability issues for some users</string>
<string name="gutenberg_native_block_cannot_be_rendered_because_it_is_deeply_nested_tap_here_for" tools:ignore="UnusedResources">Block cannot be rendered because it is deeply nested. Tap here for more details.</string>
<!-- translators: displayed right after the block is copied. -->
<string name="gutenberg_native_block_copied" tools:ignore="UnusedResources">Block copied</string>
@@ -160,6 +161,7 @@
<string name="gutenberg_native_edit_media" tools:ignore="UnusedResources">Edit media</string>
<string name="gutenberg_native_edit_using_web_editor" tools:ignore="UnusedResources">Edit using web editor</string>
<string name="gutenberg_native_edit_video" tools:ignore="UnusedResources">Edit video</string>
<string name="gutenberg_native_edit_video_024aee6d" tools:ignore="UnusedResources">Edit video</string>
<!-- translators: %s: name of the host app (e.g. WordPress) -->
<string name="gutenberg_native_editing_synced_patterns_is_not_yet_supported_on_s_for_android" tools:ignore="UnusedResources">Editing synced patterns is not yet supported on %s for Android</string>
<!-- translators: %s: name of the host app (e.g. WordPress) -->
@@ -389,10 +391,13 @@ translators: %s: Select control option value e.g: "Auto, 25%". -->
<string name="gutenberg_native_upgrade_your_plan_to_use_video_covers" tools:ignore="UnusedResources">Upgrade your plan to use video covers</string>
<string name="gutenberg_native_uploading" tools:ignore="UnusedResources">Uploading…</string>
<string name="gutenberg_native_use_icon_button" tools:ignore="UnusedResources">Use icon button</string>
<!-- translators: accessibility text. Empty video caption. -->
<string name="gutenberg_native_video_caption_empty" tools:ignore="UnusedResources">Video caption. Empty</string>
<!-- translators: accessibility text. Empty video caption. -->
<string name="gutenberg_native_video_caption_empty_663aab49" tools:ignore="UnusedResources">Video caption. Empty</string>
<!-- translators: accessibility text. %s: video caption. -->
<string name="gutenberg_native_video_caption_s" tools:ignore="UnusedResources">Video caption. %s</string>
<!-- translators: accessibility text. %s: video caption. -->
<string name="gutenberg_native_video_caption_s_0141bd20" tools:ignore="UnusedResources">Video caption. %s</string>
<string name="gutenberg_native_waiting_for_connection" tools:ignore="UnusedResources">Waiting for connection</string>
<string name="gutenberg_native_warning_message" tools:ignore="UnusedResources">Warning message</string>
<string name="gutenberg_native_we_are_working_hard_to_add_more_blocks_with_each_release" tools:ignore="UnusedResources">We are working hard to add more blocks with each release.</string>
1 change: 1 addition & 0 deletions bundle/ios/GutenbergNativeTranslations.swift
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ private func dummy() {
_ = NSLocalizedString("Audio caption. Empty", comment: "translators: accessibility text. Empty Audio caption.")
_ = NSLocalizedString("audio file", comment: "translators: displays audio file extension. e.g. MP3 audio file")
_ = NSLocalizedString("Audio Player", comment: "")
_ = NSLocalizedString("Autoplay may cause usability issues for some users", comment: "")
_ = NSLocalizedString("Block cannot be rendered because it is deeply nested. Tap here for more details.", comment: "")
_ = NSLocalizedString("Block copied", comment: "translators: displayed right after the block is copied.")
_ = NSLocalizedString("Block cut", comment: "translators: displayed right after the block is cut.")
12 changes: 12 additions & 0 deletions ios-xcframework/XCFrameworkScaffold.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@

/* Begin PBXBuildFile section */
1D9EA4BE2B87A2570086B30F /* App.composed.js.map in Resources */ = {isa = PBXBuildFile; fileRef = 1D9EA4BD2B87A2470086B30F /* App.composed.js.map */; };
2F4F38292B86842C006EF573 /* external-style-overrides.css in Resources */ = {isa = PBXBuildFile; fileRef = 2F4F38282B86842C006EF573 /* external-style-overrides.css */; };
2F4F382B2B86844A006EF573 /* extra-localstorage-entries.js in Resources */ = {isa = PBXBuildFile; fileRef = 2F4F382A2B86844A006EF573 /* extra-localstorage-entries.js */; };
2F4F382D2B868457006EF573 /* remove-nux.js in Resources */ = {isa = PBXBuildFile; fileRef = 2F4F382C2B868457006EF573 /* remove-nux.js */; };
3F1235FE29F680F900AF54A4 /* GutenbergBridgeDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F1235FB29F680F900AF54A4 /* GutenbergBridgeDelegate.swift */; };
3F1235FF29F680F900AF54A4 /* GutenbergBridgeDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F1235FC29F680F900AF54A4 /* GutenbergBridgeDataSource.swift */; };
3F12360029F680F900AF54A4 /* Gutenberg.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F1235FD29F680F900AF54A4 /* Gutenberg.swift */; };
@@ -41,6 +44,9 @@

/* Begin PBXFileReference section */
1D9EA4BD2B87A2470086B30F /* App.composed.js.map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; name = App.composed.js.map; path = ../../../bundle/ios/App.composed.js.map; sourceTree = "<group>"; };
2F4F38282B86842C006EF573 /* external-style-overrides.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = "external-style-overrides.css"; path = "../../../resources/unsupported-block-editor/external-style-overrides.css"; sourceTree = "<group>"; };
2F4F382A2B86844A006EF573 /* extra-localstorage-entries.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "extra-localstorage-entries.js"; path = "../../../resources/unsupported-block-editor/extra-localstorage-entries.js"; sourceTree = "<group>"; };
2F4F382C2B868457006EF573 /* remove-nux.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "remove-nux.js"; path = "../../../resources/unsupported-block-editor/remove-nux.js"; sourceTree = "<group>"; };
3F1235FB29F680F900AF54A4 /* GutenbergBridgeDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = GutenbergBridgeDelegate.swift; path = "../../gutenberg/packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift"; sourceTree = "<group>"; };
3F1235FC29F680F900AF54A4 /* GutenbergBridgeDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = GutenbergBridgeDataSource.swift; path = "../../gutenberg/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift"; sourceTree = "<group>"; };
3F1235FD29F680F900AF54A4 /* Gutenberg.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Gutenberg.swift; path = "../../gutenberg/packages/react-native-bridge/ios/Gutenberg.swift"; sourceTree = "<group>"; };
@@ -91,6 +97,9 @@
3F12363C29F6B1E900AF54A4 /* Resources */ = {
isa = PBXGroup;
children = (
2F4F382C2B868457006EF573 /* remove-nux.js */,
2F4F382A2B86844A006EF573 /* extra-localstorage-entries.js */,
2F4F38282B86842C006EF573 /* external-style-overrides.css */,
3FA0C5802A1C8C9700600A9A /* App.js */,
1D9EA4BD2B87A2470086B30F /* App.composed.js.map */,
3F12363F29F6B21300AF54A4 /* content-functions.js */,
@@ -248,6 +257,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2F4F382D2B868457006EF573 /* remove-nux.js in Resources */,
2F4F382B2B86844A006EF573 /* extra-localstorage-entries.js in Resources */,
3F8D0D482A8CB297008A5891 /* assets in Resources */,
3FE06AD329F3F6DA00F752AD /* Project-Debug.xcconfig in Resources */,
3F12364E29F6B21300AF54A4 /* local-storage-overrides.json in Resources */,
@@ -266,6 +277,7 @@
3F12365029F6B23300AF54A4 /* supported-blocks.json in Resources */,
3FA0C5812A1C8C9700600A9A /* App.js in Resources */,
1D9EA4BE2B87A2570086B30F /* App.composed.js.map in Resources */,
2F4F38292B86842C006EF573 /* external-style-overrides.css in Resources */,
3F12364729F6B21300AF54A4 /* insert-block.js in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
2 changes: 1 addition & 1 deletion jetpack
Submodule jetpack updated 1707 files
14 changes: 13 additions & 1 deletion src/jetpack-editor-setup.js
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@ import {
registerLoomVariation,
registerSmartframeVariation,
} from '../jetpack/projects/plugins/jetpack/extensions/extended-blocks/core-embed';
import '../jetpack/projects/plugins/jetpack/extensions/blocks/videopress/editor';

// When adding new blocks to this list please also consider updating `./block-support/supported-blocks.json`
const supportedJetpackBlocks = {
@@ -129,6 +128,14 @@ export function registerJetpackEmbedVariations( { capabilities } ) {
} );
}

export function enableVideoPressV5Support( { capabilities } ) {
if ( ! isActive() || ! capabilities.videoPressV5Support ) {
return;
}

require( '../jetpack/projects/plugins/jetpack/extensions/blocks/videopress/editor' );
}

const setupHooks = () => {
// Hook triggered before the editor is rendered
addAction( 'native.pre-render', 'gutenberg-mobile-jetpack', ( props ) => {
@@ -142,6 +149,11 @@ const setupHooks = () => {
// block type registration, so it’s required to add them before
// the core blocks are registered.
registerJetpackEmbedVariations( props );

// VideoPress v5 conversion also uses WP hooks that are attached to
// block type registration, so it’s required to add them before
// the core blocks are registered.
enableVideoPressV5Support( props );
} );

// Hook triggered after the editor is rendered
You are viewing a condensed version of this merge commit. You can view the full changes here.