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

Experiment - Gutenberg Android X migration #10020

Merged
merged 54 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7144286
Point to gutenberg mobile android x migraiton
marecar3 Jun 10, 2019
2f982bf
Remove force resolutionStrategy for org.webkit:android-jsc as it's no…
marecar3 Jun 10, 2019
ea6d830
Update gutenberg-mobile ref
marecar3 Jun 10, 2019
20e1019
Point to the latest aztec ref
marecar3 Jun 10, 2019
1d88e61
Update gutenberg mobile reference
marecar3 Jun 10, 2019
365bec5
Update gutenberg mobile ref
marecar3 Jun 10, 2019
ce6cf7e
Update gutenberg mobile ref
marecar3 Jun 10, 2019
b62137c
Updated gutenberg-mobile ref
marecar3 Jun 10, 2019
7db934b
Merge
marecar3 Jun 14, 2019
f10d7d1
Force android-jsc:r241213
marecar3 Jun 14, 2019
813480c
Update gutenberg mobile ref
marecar3 Jun 14, 2019
671b1ab
Point to the latest gutenberg mobile ref
marecar3 Jun 14, 2019
b6c97eb
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jun 17, 2019
27b1642
Updated gb mobile ref
marecar3 Jun 17, 2019
cb8b3a8
Gutenberg/Android X: Apply Java 1.8 compileOptions even when building…
jtreanor Jun 18, 2019
1fba7fb
Merge pull request #10055 from wordpress-mobile/fix/guteberg/android_…
daniloercoli Jun 18, 2019
13239a0
Updated gb mobile ref
marecar3 Jun 18, 2019
f215488
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jun 20, 2019
10cd05b
Update gutenberg-mobile ref
marecar3 Jun 20, 2019
8833238
Update GB-mobile ref
daniloercoli Jun 21, 2019
7faa66b
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jun 21, 2019
21ba3f5
Updated gb mobile ref
marecar3 Jun 21, 2019
9e0ba1f
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jun 22, 2019
60e2a48
Updated gb mobile ref
marecar3 Jun 22, 2019
55e1ef0
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jun 25, 2019
4647b17
Update gb-mobile ref
marecar3 Jun 25, 2019
fa776a9
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jun 26, 2019
c3e4620
Update gb mobile ref
marecar3 Jun 26, 2019
54de013
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jun 28, 2019
d84a48f
Update gb mobile ref
marecar3 Jun 28, 2019
52eea3c
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jul 2, 2019
0d3254e
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jul 3, 2019
7f3557b
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jul 5, 2019
82a81f2
Update gb mobile ref
marecar3 Jul 5, 2019
09b5be0
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jul 8, 2019
2025e75
Updated gutenberg mobile ref
marecar3 Jul 8, 2019
d573826
Updated release notes
marecar3 Jul 8, 2019
26a289b
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jul 8, 2019
f17d258
Update gutenberg mobile ref
marecar3 Jul 8, 2019
4592ba4
Added mutable siteTitle field to use for refreshing title domain sear…
cameronvoell Jul 9, 2019
ab306a3
Added tests for domain results after clear button is pressed
cameronvoell Jul 9, 2019
8f1dc24
Removed semicolons, fixed ktlint check
cameronvoell Jul 9, 2019
f627de1
Merge branch 'develop' into issue/10087-domain-suggestions-on-clear
cameronvoell Jul 9, 2019
5ec40f9
Merge pull request #10181 from cameronvoell/issue/10087-domain-sugges…
malinajirka Jul 10, 2019
7f118dd
Update gb-mobile ref
hypest Jul 10, 2019
fa7412c
Update Aztec hash
hypest Jul 10, 2019
ca80c11
Update gb-mobile hash
hypest Jul 10, 2019
bbd4cec
Merge branch 'gb/release-1.9.0' into gutenberg/android_x_migration
hypest Jul 10, 2019
c63e1e7
Update gb-mobile ref, don't use React classes
hypest Jul 10, 2019
a0c5721
Revert "Updated release notes"
marecar3 Jul 10, 2019
acc57fe
Merge branch 'develop' into gutenberg/android_x_migration
marecar3 Jul 10, 2019
07c301a
Update gutenberg ref
marecar3 Jul 10, 2019
68c66ed
Point aztec to v1.3.28
marecar3 Jul 10, 2019
b1f2537
Update gb mobile ref to point to develop
marecar3 Jul 10, 2019
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
10 changes: 4 additions & 6 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ android {
}

// Gutenberg's dependency - react-native-video is using
// Java API 1.8 so we need this when building from source
if (rootProject.ext.buildGutenbergFromSource) {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// Java API 1.8
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

flavorDimensions "buildType"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class SiteCreationDomainsViewModel @Inject constructor(
get() = bgDispatcher + job
private var isStarted = false
private var segmentId by Delegates.notNull<Long>()
private var siteTitle: String? = null

private val _uiState: MutableLiveData<DomainsUiState> = MutableLiveData()
val uiState: LiveData<DomainsUiState> = _uiState
Expand Down Expand Up @@ -92,6 +93,7 @@ class SiteCreationDomainsViewModel @Inject constructor(
return
}
this.segmentId = segmentId
this.siteTitle = siteTitle
isStarted = true
tracker.trackDomainsAccessed()
// isNullOrBlank not smart-casting for some reason..
Expand Down Expand Up @@ -119,7 +121,12 @@ class SiteCreationDomainsViewModel @Inject constructor(
}

fun updateQuery(query: String) {
updateQueryInternal(UserQuery(query))
val siteTitle: String? = this.siteTitle
if (query.isBlank() && !siteTitle.isNullOrBlank()) {
updateQueryInternal(TitleQuery(siteTitle))
} else {
updateQueryInternal(UserQuery(query))
}
}

private fun updateQueryInternal(query: DomainSuggestionsQuery?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.wordpress.android.ui.sitecreation.domains
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.lifecycle.Observer
import com.nhaarman.mockitokotlin2.firstValue
import com.nhaarman.mockitokotlin2.lastValue
import com.nhaarman.mockitokotlin2.secondValue
import com.nhaarman.mockitokotlin2.thirdValue
import com.nhaarman.mockitokotlin2.times
Expand Down Expand Up @@ -193,6 +194,34 @@ class SiteCreationDomainsViewModelTest {
)
}

/**
* Verifies the UI state after the user enters an empty query (presses clear button) with a non-empty site title
* which results in multiple domain suggestions.
*/
@Test
fun verifyClearQueryWithNonEmptyTitleUiStateAfterResponseWithMultipleResults() = testWithSuccessResponse {
viewModel.start(MULTI_RESULT_DOMAIN_FETCH_QUERY.first, SEGMENT_ID)
viewModel.updateQuery(MULTI_RESULT_DOMAIN_FETCH_QUERY.first)
viewModel.updateQuery("")
val captor = ArgumentCaptor.forClass(DomainsUiState::class.java)
verify(uiStateObserver, times(6)).onChanged(captor.capture())
verifyVisibleItemsContentUiState(captor.lastValue, false, 20)
}

/**
* Verifies the UI state after the user enters an empty query (presses clear button) with an empty site title
* which results in initial UI state
*/
@Test
fun verifyClearQueryWithEmptyTitleInitialState() = testWithSuccessResponse {
viewModel.start(null, SEGMENT_ID)
viewModel.updateQuery(MULTI_RESULT_DOMAIN_FETCH_QUERY.first)
viewModel.updateQuery("")
val captor = ArgumentCaptor.forClass(DomainsUiState::class.java)
verify(uiStateObserver, times(4)).onChanged(captor.capture())
verifyInitialContentUiState(captor.lastValue)
}

/**
* Verifies that help button is properly propagated.
*/
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ allprojects {

configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r224109'
force 'org.webkit:android-jsc:r241213'
}
}

Expand Down
2 changes: 1 addition & 1 deletion libs/editor/WordPressEditor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {

ext {
aztecVersion = 'v1.3.27'
aztecVersion = 'v1.3.28'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import androidx.lifecycle.LiveData;

import com.android.volley.toolbox.ImageLoader;
import com.facebook.react.bridge.ReadableArray;

import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
Expand Down Expand Up @@ -271,7 +270,7 @@ public void onQueryCurrentProgressForUploadingMedia() {
},
new OnEditorMountListener() {
@Override
public void onEditorDidMount(ReadableArray unsupportedBlocks) {
public void onEditorDidMount(ArrayList<Object> unsupportedBlocks) {
mEditorDidMount = true;
mEditorFragmentListener.onEditorFragmentContentReady(unsupportedBlocks.size() > 0);

Expand Down
2 changes: 1 addition & 1 deletion libs/gutenberg-mobile
Submodule gutenberg-mobile updated 61 files
+5 −11 Gutenberg.podspec
+2 −1 RNTAztecView.podspec
+76 −0 __device-tests__/gutenberg-editor-heading.test.js
+1 −0 __device-tests__/helpers/test-data.js
+21 −2 __device-tests__/helpers/utils.js
+55 −7 __device-tests__/pages/editor-page.js
+1 −6 android/app/build.gradle
+1 −1 android/build.gradle
+2 −0 android/gradle.properties
+2 −1 android/gradle/wrapper/gradle-wrapper.properties
+39 −14 bin/generate-podspecs.sh
+1 −30 ios/gutenberg.xcodeproj/project.pbxproj
+6 −6 package.json
+0 −1 react-native-aztec/.gitignore
+7 −7 react-native-aztec/android/build.gradle
+3 −0 react-native-aztec/android/gradle.properties
+1 −1 react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecManager.java
+1 −1 react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecText.java
+1 −1 react-native-aztec/android/src/main/java/org/wordpress/mobile/ReactNativeAztec/ReactAztecTextShadowNode.java
+2 −0 react-native-gutenberg-bridge/android/build.gradle
+3 −0 react-native-gutenberg-bridge/android/gradle.properties
+1 −1 ...droid/src/main/java/org/wordpress/mobile/ReactNativeGutenbergBridge/RNReactNativeGutenbergBridgeModule.java
+4 −3 react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
+7 −0 react-native-gutenberg-bridge/ios/RNReactNativeGutenbergBridge-Bridging-Header.h
+2 −0 react-native-gutenberg-bridge/third-party-podspecs/DoubleConversion.podspec.json
+27 −2 react-native-gutenberg-bridge/third-party-podspecs/Folly.podspec.json
+25 −0 react-native-gutenberg-bridge/third-party-podspecs/RNReactNativeRecyclerviewList.podspec.json
+27 −0 react-native-gutenberg-bridge/third-party-podspecs/RNSVG.podspec.json
+29 −0 react-native-gutenberg-bridge/third-party-podspecs/React-ART.podspec.json
+72 −0 react-native-gutenberg-bridge/third-party-podspecs/React-Core.podspec.json
+33 −0 react-native-gutenberg-bridge/third-party-podspecs/React-DevSupport.podspec.json
+318 −0 react-native-gutenberg-bridge/third-party-podspecs/React-Fabric.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTActionSheet.podspec.json
+29 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTAnimation.podspec.json
+38 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTBlob.podspec.json
+33 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTCameraRoll.podspec.json
+48 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTFabric.podspec.json
+33 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTImage.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTLinking.podspec.json
+29 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTNetwork.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTPushNotification.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTSettings.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTTest.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTText.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTVibration.podspec.json
+30 −0 react-native-gutenberg-bridge/third-party-podspecs/React-RCTWebSocket.podspec.json
+37 −0 react-native-gutenberg-bridge/third-party-podspecs/React-cxxreact.podspec.json
+34 −0 react-native-gutenberg-bridge/third-party-podspecs/React-graphics.podspec.json
+31 −0 react-native-gutenberg-bridge/third-party-podspecs/React-jscallinvoker.podspec.json
+46 −0 react-native-gutenberg-bridge/third-party-podspecs/React-jsi.podspec.json
+36 −0 react-native-gutenberg-bridge/third-party-podspecs/React-jsiexecutor.podspec.json
+19 −0 react-native-gutenberg-bridge/third-party-podspecs/React-jsinspector.podspec.json
+49 −0 react-native-gutenberg-bridge/third-party-podspecs/React-turbomodule-core.podspec.json
+52 −0 react-native-gutenberg-bridge/third-party-podspecs/React-turbomodule-samples.podspec.json
+44 −547 react-native-gutenberg-bridge/third-party-podspecs/React.podspec.json
+1 −0 react-native-gutenberg-bridge/third-party-podspecs/glog.podspec.json
+4 −4 react-native-gutenberg-bridge/third-party-podspecs/react-native-keyboard-aware-scroll-view.podspec.json
+3 −3 react-native-gutenberg-bridge/third-party-podspecs/react-native-safe-area.podspec.json
+1 −1 react-native-gutenberg-bridge/third-party-podspecs/react-native-video.podspec.json
+8 −7 react-native-gutenberg-bridge/third-party-podspecs/yoga.podspec.json
+200 −188 yarn.lock