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

Gutenberg/integrate release 1.28.1 #12021

Merged
merged 6 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import org.wordpress.android.editor.EditorImageSettingsListener;
import org.wordpress.android.editor.EditorMediaUploadListener;
import org.wordpress.android.editor.EditorMediaUtils;
import org.wordpress.android.editor.ExceptionLogger;
import org.wordpress.android.editor.GutenbergEditorFragment;
import org.wordpress.android.editor.ImageSettingsDialogFragment;
import org.wordpress.android.fluxc.Dispatcher;
Expand Down Expand Up @@ -226,7 +227,8 @@ public class EditPostActivity extends LocaleAwareActivity implements
PostSettingsListDialogFragment.OnPostSettingsDialogFragmentListener,
HistoryListFragment.HistoryItemClickInterface,
EditPostSettingsCallback,
PrivateAtCookieProgressDialogOnDismissListener {
PrivateAtCookieProgressDialogOnDismissListener,
ExceptionLogger {
public static final String ACTION_REBLOG = "reblogAction";
public static final String EXTRA_POST_LOCAL_ID = "postModelLocalId";
public static final String EXTRA_LOAD_AUTO_SAVE_REVISION = "loadAutosaveRevision";
Expand Down Expand Up @@ -3087,6 +3089,16 @@ public void syncPostObjectWithUiAndSaveIt(@Nullable OnPostUpdatedFromUIListener
WPMediaUtils.advertiseImageOptimization(this, listener::invoke);
}

@Override
public Consumer<Exception> getExceptionLogger() {
return (Exception e) -> CrashLoggingUtils.logException(e, T.EDITOR);
}

@Override
public Consumer<String> getBreadcrumbLogger() {
return CrashLoggingUtils::log;
}

private void updateAddingMediaToEditorProgressDialogState(ProgressDialogUiState uiState) {
mAddingMediaToEditorProgressDialog = mProgressDialogHelper
.updateProgressDialogState(this, mAddingMediaToEditorProgressDialog, uiState, mUiHelpers);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.wordpress.android.editor;

import androidx.core.util.Consumer;

public interface ExceptionLogger {
Consumer<Exception> getExceptionLogger();
Consumer<String> getBreadcrumbLogger();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.os.Bundle;
import android.view.ViewGroup;

import androidx.core.util.Consumer;
import androidx.fragment.app.Fragment;

import org.wordpress.mobile.WPAndroidGlue.RequestExecutor;
Expand Down Expand Up @@ -88,6 +89,14 @@ public void onCreate(Bundle savedInstanceState) {
Bundle translations = getArguments().getBundle(ARG_TRANSLATIONS);
boolean isDarkMode = getArguments().getBoolean(ARG_PREFERRED_COLOR_SCHEME);

Consumer<Exception> exceptionLogger = null;
Consumer<String> breadcrumbLogger = null;
if (getActivity() instanceof ExceptionLogger) {
ExceptionLogger exceptionLoggingActivity = ((ExceptionLogger) getActivity());
exceptionLogger = exceptionLoggingActivity.getExceptionLogger();
breadcrumbLogger = exceptionLoggingActivity.getBreadcrumbLogger();
}

mWPAndroidGlueCode = new WPAndroidGlueCode();
mWPAndroidGlueCode.onCreate(getContext());
mWPAndroidGlueCode.onCreateView(
Expand All @@ -101,7 +110,9 @@ public void onCreate(Bundle savedInstanceState) {
localeString,
translations,
getContext().getResources().getColor(R.color.background_color),
isDarkMode);
isDarkMode,
exceptionLogger,
breadcrumbLogger);

// clear the content initialization flag since a new ReactRootView has been created;
mHasReceivedAnyContent = false;
Expand Down
2 changes: 1 addition & 1 deletion libs/gutenberg-mobile
Submodule gutenberg-mobile updated 39 files
+16 −0 .circleci/config.yml
+4 −0 RELEASE-NOTES.txt
+39 −3 __device-tests__/gutenberg-editor-lists.test.js
+51 −1 __device-tests__/gutenberg-editor-paragraph.test.js
+4 −1 __device-tests__/helpers/utils.js
+3 −2 android/app/src/main/java/com/gutenberg/MainApplication.java
+16 −16 bundle/android/App.js
+1 −1 bundle/android/App.js.map
+1 −1 bundle/android/raw/i18ncache_data_de.json
+1 −1 bundle/android/raw/i18ncache_data_el.json
+1 −1 bundle/android/raw/i18ncache_data_es.json
+1 −1 bundle/android/raw/i18ncache_data_hr.json
+1 −1 bundle/android/raw/i18ncache_data_it.json
+1 −1 bundle/android/raw/i18ncache_data_nl.json
+1 −1 bundle/android/raw/i18ncache_data_pl.json
+1 −1 bundle/android/raw/i18ncache_data_ru.json
+1 −1 bundle/android/raw/i18ncache_data_sk.json
+1 −1 bundle/android/raw/i18ncache_data_tr.json
+16 −16 bundle/ios/App.js
+1 −1 bundle/ios/App.js.map
+1 −1 bundle/ios/assets/i18n-cache/data/de.json
+1 −1 bundle/ios/assets/i18n-cache/data/el.json
+1 −1 bundle/ios/assets/i18n-cache/data/es.json
+1 −1 bundle/ios/assets/i18n-cache/data/hr.json
+1 −1 bundle/ios/assets/i18n-cache/data/it.json
+1 −1 bundle/ios/assets/i18n-cache/data/nl.json
+1 −1 bundle/ios/assets/i18n-cache/data/pl.json
+1 −1 bundle/ios/assets/i18n-cache/data/ru.json
+1 −1 bundle/ios/assets/i18n-cache/data/sk.json
+1 −1 bundle/ios/assets/i18n-cache/data/tr.json
+1 −1 gutenberg
+4 −4 ios/Podfile.lock
+1 −1 package.json
+1 −0 react-native-aztec/android/build.gradle
+49 −0 ...ative-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/IllegalSelectionIndexException.java
+32 −2 react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java
+10 −1 react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecPackage.java
+18 −0 ...e-aztec/android/src/test/java/org/wordpress/mobile/ReactNativeAztec/IllegalSelectionIndexExceptionTest.java
+18 −14 react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java