Media - Add large and medium image sizes#16875
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the Jetpack changes on this Pull Request by downloading an installable build (jetpack-installable-build-pr16875-0c0415e.apk), or scanning this QR code: |
|
You can test the WordPress changes on this Pull Request by downloading an installable build (wordpress-installable-build-pr16875-0c0415e.apk), or scanning this QR code: |
derekblank
left a comment
There was a problem hiding this comment.
I was able to test and verify the steps following the Testing Instructions on WordPress/gutenberg#42178. LGTM! 🚀
|
Hey @mkevins 👋 I was wondering if you would have some spare time to check this PR since you've worked on media uploads and block processors before. We've already tested it in different scenarios so we are looking for another check for the native changes. Please let me know if you can check it out, if not I'll look for someone else. Thank you! |
# Conflicts: # build.gradle
| String mediaURL; | ||
| if (!TextUtils.isEmpty(mediaFile.getFileUrlLargeSize())) { | ||
| mediaURL = mediaFile.getFileUrlLargeSize(); | ||
| } else if (!TextUtils.isEmpty(mediaFile.getFileUrlMediumSize())) { | ||
| mediaURL = mediaFile.getFileUrlMediumSize(); | ||
| } else { | ||
| mediaURL = mediaFile.getFileURL(); | ||
| } |
There was a problem hiding this comment.
I wonder if we can extract this to a method on the MediaFile, e.g. something like mediaFile.getOptimalFileURL, since we use the same logic here. Wdyt?
There was a problem hiding this comment.
I've updated it from your comments, let me know if you can give it another check!
Thanks for updating it! I've left a couple more minor comments that maybe we could simplify it even further. Thanks for your work on this!
| mediaURL = mediaFile.getFileURL(); | ||
| } | ||
|
|
||
| getGutenbergContainerFragment().mediaFileUploadSucceeded(Integer.valueOf(localMediaId), mediaURL, |
There was a problem hiding this comment.
Not sure if linting rules changed, but I'm seeing suggestions in AS to replace Integer.valueOf with Integer.parseInt.. OTOH, there are other places with the same suggestion that are not part of this PR 🤷♂️ . Please consider this non-blocking - just mentioning it, since I noticed it. 😄
There was a problem hiding this comment.
Thanks for the suggestion! I didn't realize that the code was being highlighted by AS 😅. I updated it in 1fff96f#diff-3d055f27ee69cf53a3055662daab1fc04df6e0eba7deadfd63c3a79df8e96dc5R1347-R1348
Thanks for reaching out @geriux 😄 . It looks good, and seems to safely preserve the correct behavior for files that do not have the other sizes. I left a couple of minor comments about the code. Thanks for the work on this! |
Thank you so much for reviewing the code @mkevins and for the feedback! I've updated it from your comments, let me know if you can give it another check! Thanks! |
|
Thanks again for the help with the review @mkevins! After discussing internally and applying the latest changes I'll go ahead and start merging. 🎉 |
|
Found 1 violations: The PR caused the following dependency changes:-+--- org.wordpress:fluxc:{strictly 1.47.0} -> 1.47.0
-| +--- org.wordpress:wellsql:1.7.0
-| | \--- org.wordpress.wellsql:wellsql-annotations:1.7.0
-| +--- org.wordpress.fluxc:fluxc-annotations:1.47.0
-| +--- org.greenrobot:eventbus:3.3.1 (*)
-| +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.9.2 (*)
-| +--- com.android.volley:volley:1.1.1 -> 1.2.0
-| +--- androidx.paging:paging-runtime:2.1.2
-| | +--- androidx.paging:paging-common:2.1.2
-| | | +--- androidx.annotation:annotation:1.0.0 -> 1.2.0
-| | | \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
-| | +--- androidx.arch.core:core-runtime:2.0.0 -> 2.1.0 (*)
-| | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.4.1 (*)
-| | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.4.1 (*)
-| | \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
-| +--- com.goterl:lazysodium-android:5.0.2
-| +--- net.java.dev.jna:jna:5.5.0
-| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
-| +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.10 (*)
-| +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
-| +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
-| +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.2.0 (*)
-| +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2
-| | +--- com.squareup.okhttp3:okhttp:4.9.2 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.10 (*)
-| +--- com.google.code.gson:gson:2.8.5
-| +--- org.apache.commons:commons-text:1.1 (*)
-| +--- androidx.room:room-runtime:2.4.2 (*)
-| +--- androidx.room:room-ktx:2.4.2
-| | +--- androidx.room:room-common:2.4.2 (*)
-| | +--- androidx.room:room-runtime:2.4.2 (*)
-| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
-| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
-| +--- com.google.dagger:dagger:2.42 (*)
-| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.5.2 (*)
-| \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.5.2 (*)
++--- org.wordpress:fluxc:{strictly trunk-11dadf65d5e3e383f0fd169f8b88600ff91953ec} -> trunk-11dadf65d5e3e383f0fd169f8b88600ff91953ec
+| +--- org.wordpress:wellsql:1.7.0
+| | \--- org.wordpress.wellsql:wellsql-annotations:1.7.0
+| +--- org.wordpress.fluxc:fluxc-annotations:trunk-11dadf65d5e3e383f0fd169f8b88600ff91953ec
+| +--- org.greenrobot:eventbus:3.3.1 (*)
+| +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.9.2 (*)
+| +--- com.android.volley:volley:1.1.1 -> 1.2.0
+| +--- androidx.paging:paging-runtime:2.1.2
+| | +--- androidx.paging:paging-common:2.1.2
+| | | +--- androidx.annotation:annotation:1.0.0 -> 1.2.0
+| | | \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
+| | +--- androidx.arch.core:core-runtime:2.0.0 -> 2.1.0 (*)
+| | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.4.1 (*)
+| | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.4.1 (*)
+| | \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
+| +--- com.goterl:lazysodium-android:5.0.2
+| +--- net.java.dev.jna:jna:5.5.0
+| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
+| +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.10 (*)
+| +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
+| +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
+| +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.2.0 (*)
+| +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2
+| | +--- com.squareup.okhttp3:okhttp:4.9.2 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.10 (*)
+| +--- com.google.code.gson:gson:2.8.5
+| +--- org.apache.commons:commons-text:1.1 (*)
+| +--- androidx.room:room-runtime:2.4.2 (*)
+| +--- androidx.room:room-ktx:2.4.2
+| | +--- androidx.room:room-common:2.4.2 (*)
+| | +--- androidx.room:room-runtime:2.4.2 (*)
+| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
+| +--- com.google.dagger:dagger:2.42 (*)
+| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.5.2 (*)
+| \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.5.2 (*)
-+--- org.wordpress:utils:{strictly 2.6.0} -> 2.6.0
++--- org.wordpress:utils:{strictly trunk-68e2995962a5134770e6f9e5b9f258a339e123b2} -> trunk-68e2995962a5134770e6f9e5b9f258a339e123b2
+--- project :libs:editor
-| \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.80.0-alpha2
-| +--- com.facebook.fresco:animated-gif:2.0.0
-| | +--- com.parse.bolts:bolts-tasks:1.4.0
-| | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.1
-| | | +--- com.facebook.soloader:annotation:0.10.1
-| | | \--- com.facebook.soloader:nativeloader:0.10.1
-| | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
-| | \--- com.facebook.fresco:animated-base:2.0.0
-| | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
-| | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0
-| | | +--- com.facebook.infer.annotation:infer-annotation:0.18.0
-| | | | +--- com.google.code.findbugs:jsr305:3.0.1 -> 3.0.2
-| | | | \--- org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.72
-| | | +--- com.facebook.soloader:annotation:0.10.1
-| | | +--- com.parse.bolts:bolts-tasks:1.4.0
-| | | \--- com.facebook.fresco:fbcore:2.5.0
-| | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0
-| | | +--- com.facebook.soloader:nativeloader:0.10.1
-| | | +--- com.facebook.soloader:annotation:0.10.1
-| | | +--- com.parse.bolts:bolts-tasks:1.4.0
-| | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | \--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
-| | +--- com.facebook.fresco:animated-drawable:2.0.0
-| | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
-| | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0
-| | | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0
-| | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
-| | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0
-| | | | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | | | \--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | | +--- com.facebook.fresco:memory-type-native:2.5.0
-| | | | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
-| | | | | \--- com.facebook.soloader:nativeloader:0.10.1
-| | | | +--- com.facebook.fresco:memory-type-java:2.5.0
-| | | | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | | | \--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
-| | | | +--- com.facebook.fresco:ui-common:2.5.0
-| | | | | \--- com.facebook.fresco:fbcore:2.5.0
-| | | | \--- com.facebook.fresco:middleware:2.5.0
-| | | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | | \--- com.facebook.fresco:ui-common:2.5.0 (*)
-| | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
-| | \--- com.parse.bolts:bolts-tasks:1.4.0
-| +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
-| +--- com.facebook.react:react-native:0.66.2
-| | +--- com.facebook.infer.annotation:infer-annotation:0.18.0 (*)
-| | +--- com.facebook.yoga:proguard-annotations:1.19.0
-| | +--- javax.inject:javax.inject:1
-| | +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
-| | +--- androidx.autofill:autofill:1.1.0 (*)
-| | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
-| | +--- com.facebook.fresco:fresco:2.5.0
-| | | +--- com.facebook.fresco:soloader:2.5.0
-| | | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
-| | | +--- com.facebook.soloader:nativeloader:0.10.1
-| | | +--- com.facebook.fresco:ui-common:2.5.0 (*)
-| | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | +--- com.facebook.fresco:drawee:2.5.0 (*)
-| | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
-| | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
-| | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
-| | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
-| | | +--- com.facebook.fresco:nativeimagefilters:2.5.0
-| | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
-| | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
-| | | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
-| | | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
-| | | | +--- com.facebook.soloader:nativeloader:0.10.1
-| | | | +--- com.parse.bolts:bolts-tasks:1.4.0
-| | | | \--- com.facebook.fresco:fbcore:2.5.0
-| | | \--- com.facebook.fresco:nativeimagetranscoder:2.5.0
-| | | +--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
-| | | +--- com.facebook.soloader:nativeloader:0.10.1
-| | | +--- com.parse.bolts:bolts-tasks:1.4.0
-| | | \--- com.facebook.fresco:fbcore:2.5.0
-| | +--- com.facebook.fresco:imagepipeline-okhttp3:2.5.0
-| | | +--- com.facebook.fresco:fbcore:2.5.0
-| | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
-| | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
-| | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
-| | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
-| | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
-| | | \--- com.squareup.okhttp3:okhttp:3.12.1 -> 4.9.2 (*)
-| | +--- com.facebook.fresco:ui-common:2.5.0 (*)
-| | +--- com.facebook.soloader:soloader:0.10.1 (*)
-| | +--- com.google.code.findbugs:jsr305:3.0.2
-| | +--- com.squareup.okhttp3:okhttp:4.9.1 -> 4.9.2 (*)
-| | +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.1 -> 4.9.2 (*)
-| | +--- com.squareup.okio:okio:2.9.0 (*)
-| | \--- com.facebook.fbjni:fbjni-java-only:0.2.2
-| | \--- com.facebook.soloader:nativeloader:0.10.1
-| +--- org.wordpress-mobile:react-native-svg:9.13.6
-| | \--- com.facebook.react:react-native:0.66.2 (*)
-| +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-2
-| | +--- com.facebook.react:react-native:0.66.2 (*)
-| | +--- com.google.android.exoplayer:exoplayer:2.13.3
-| | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
-| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
-| | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | | \--- com.google.guava:guava:27.1-android
-| | | | | +--- com.google.guava:failureaccess:1.0.1
-| | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
-| | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
-| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
-| | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
-| | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
-| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
-| | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
-| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
-| | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
-| | | \--- androidx.media:media:1.2.1 (*)
-| | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
-| | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
-| | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
-| | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
-| | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
-| +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-2
-| | \--- com.facebook.react:react-native:0.66.2 (*)
-| +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-2
-| | \--- com.facebook.react:react-native:0.66.2 (*)
-| +--- org.wordpress-mobile:react-native-get-random-values:1.4.0
-| | \--- com.facebook.react:react-native:0.66.2 (*)
-| +--- org.wordpress-mobile:react-native-masked-view:0.2.6
-| | \--- com.facebook.react:react-native:0.66.2 (*)
-| +--- org.wordpress-mobile:react-native-screens:2.9.0
-| | +--- com.facebook.react:react-native:0.66.2 (*)
-| | +--- androidx.appcompat:appcompat:1.1.0 -> 1.3.1 (*)
-| | +--- androidx.fragment:fragment:1.2.1 -> 1.4.1 (*)
-| | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
-| | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
-| | \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
-| +--- org.wordpress-mobile:react-native-safe-area-context:3.2.0
-| | \--- com.facebook.react:react-native:0.66.2 (*)
-| +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-3
-| +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-2
-| | +--- com.facebook.react:react-native:0.66.2 (*)
-| | \--- androidx.appcompat:appcompat:1.0.0 -> 1.3.1 (*)
-| +--- org.wordpress-mobile:react-native-webview:11.6.2
-| | +--- com.facebook.react:react-native:0.66.2 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.10 (*)
-| +--- org.wordpress-mobile:react-native-clipboard:1.9.0
-| | \--- com.facebook.react:react-native:0.66.2 (*)
-| +--- org.wordpress-mobile:react-native-fast-image:8.5.11
-| | +--- com.facebook.react:react-native:0.66.2 (*)
-| | +--- com.github.bumptech.glide:glide:4.12.0 (*)
-| | \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
-| | +--- com.github.bumptech.glide:glide:4.12.0 (*)
-| | +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.9.2 (*)
-| | \--- androidx.annotation:annotation:1.0.0 -> 1.2.0
-| +--- com.github.wordpress-mobile:react-native-gesture-handler:2.3.2-wp-1
-| | +--- com.facebook.react:react-native:0.66.2 (*)
-| | +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1 -> 2.4.1-wp-3
-| | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
-| | +--- androidx.core:core-ktx:1.6.0 -> 1.7.0 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.10 (*)
-| +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.80.0-alpha2
-| | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
-| | +--- androidx.gridlayout:gridlayout:1.0.0 (*)
-| | +--- androidx.cardview:cardview:1.0.0 (*)
-| | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
-| | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
-| | +--- com.facebook.react:react-native:0.66.2 (*)
-| | +--- org.wordpress:aztec:v1.6.0 (*)
-| | +--- org.wordpress.aztec:wordpress-shortcodes:v1.6.0 (*)
-| | +--- org.wordpress.aztec:wordpress-comments:v1.6.0 (*)
-| | +--- org.wordpress.aztec:glide-loader:v1.6.0
-| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
-| | | +--- org.wordpress:aztec:v1.6.0 (*)
-| | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.12.0 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.10 (*)
-| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.10 (*)
-| \--- org.wordpress-mobile:hermes-release-mirror:0.66.2
+| \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.80.0-alpha3
+| +--- com.facebook.fresco:animated-gif:2.0.0
+| | +--- com.parse.bolts:bolts-tasks:1.4.0
+| | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.1
+| | | +--- com.facebook.soloader:annotation:0.10.1
+| | | \--- com.facebook.soloader:nativeloader:0.10.1
+| | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+| | \--- com.facebook.fresco:animated-base:2.0.0
+| | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+| | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0
+| | | +--- com.facebook.infer.annotation:infer-annotation:0.18.0
+| | | | +--- com.google.code.findbugs:jsr305:3.0.1 -> 3.0.2
+| | | | \--- org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.72
+| | | +--- com.facebook.soloader:annotation:0.10.1
+| | | +--- com.parse.bolts:bolts-tasks:1.4.0
+| | | \--- com.facebook.fresco:fbcore:2.5.0
+| | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0
+| | | +--- com.facebook.soloader:nativeloader:0.10.1
+| | | +--- com.facebook.soloader:annotation:0.10.1
+| | | +--- com.parse.bolts:bolts-tasks:1.4.0
+| | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | \--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
+| | +--- com.facebook.fresco:animated-drawable:2.0.0
+| | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+| | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0
+| | | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0
+| | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
+| | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0
+| | | | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | | | \--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | | +--- com.facebook.fresco:memory-type-native:2.5.0
+| | | | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+| | | | | \--- com.facebook.soloader:nativeloader:0.10.1
+| | | | +--- com.facebook.fresco:memory-type-java:2.5.0
+| | | | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | | | \--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+| | | | +--- com.facebook.fresco:ui-common:2.5.0
+| | | | | \--- com.facebook.fresco:fbcore:2.5.0
+| | | | \--- com.facebook.fresco:middleware:2.5.0
+| | | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | | \--- com.facebook.fresco:ui-common:2.5.0 (*)
+| | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+| | \--- com.parse.bolts:bolts-tasks:1.4.0
+| +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
+| +--- com.facebook.react:react-native:0.66.2
+| | +--- com.facebook.infer.annotation:infer-annotation:0.18.0 (*)
+| | +--- com.facebook.yoga:proguard-annotations:1.19.0
+| | +--- javax.inject:javax.inject:1
+| | +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
+| | +--- androidx.autofill:autofill:1.1.0 (*)
+| | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
+| | +--- com.facebook.fresco:fresco:2.5.0
+| | | +--- com.facebook.fresco:soloader:2.5.0
+| | | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
+| | | +--- com.facebook.soloader:nativeloader:0.10.1
+| | | +--- com.facebook.fresco:ui-common:2.5.0 (*)
+| | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | +--- com.facebook.fresco:drawee:2.5.0 (*)
+| | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+| | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
+| | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
+| | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
+| | | +--- com.facebook.fresco:nativeimagefilters:2.5.0
+| | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+| | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
+| | | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
+| | | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
+| | | | +--- com.facebook.soloader:nativeloader:0.10.1
+| | | | +--- com.parse.bolts:bolts-tasks:1.4.0
+| | | | \--- com.facebook.fresco:fbcore:2.5.0
+| | | \--- com.facebook.fresco:nativeimagetranscoder:2.5.0
+| | | +--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
+| | | +--- com.facebook.soloader:nativeloader:0.10.1
+| | | +--- com.parse.bolts:bolts-tasks:1.4.0
+| | | \--- com.facebook.fresco:fbcore:2.5.0
+| | +--- com.facebook.fresco:imagepipeline-okhttp3:2.5.0
+| | | +--- com.facebook.fresco:fbcore:2.5.0
+| | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+| | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+| | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
+| | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
+| | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
+| | | \--- com.squareup.okhttp3:okhttp:3.12.1 -> 4.9.2 (*)
+| | +--- com.facebook.fresco:ui-common:2.5.0 (*)
+| | +--- com.facebook.soloader:soloader:0.10.1 (*)
+| | +--- com.google.code.findbugs:jsr305:3.0.2
+| | +--- com.squareup.okhttp3:okhttp:4.9.1 -> 4.9.2 (*)
+| | +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.1 -> 4.9.2 (*)
+| | +--- com.squareup.okio:okio:2.9.0 (*)
+| | \--- com.facebook.fbjni:fbjni-java-only:0.2.2
+| | \--- com.facebook.soloader:nativeloader:0.10.1
+| +--- org.wordpress-mobile:react-native-svg:9.13.6
+| | \--- com.facebook.react:react-native:0.66.2 (*)
+| +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-2
+| | +--- com.facebook.react:react-native:0.66.2 (*)
+| | +--- com.google.android.exoplayer:exoplayer:2.13.3
+| | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
+| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
+| | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | | \--- com.google.guava:guava:27.1-android
+| | | | | +--- com.google.guava:failureaccess:1.0.1
+| | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+| | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
+| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+| | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
+| | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+| | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
+| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+| | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
+| | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+| | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
+| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+| | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
+| | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
+| | | \--- androidx.media:media:1.2.1 (*)
+| | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
+| | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
+| | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
+| | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
+| | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
+| +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-2
+| | \--- com.facebook.react:react-native:0.66.2 (*)
+| +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-2
+| | \--- com.facebook.react:react-native:0.66.2 (*)
+| +--- org.wordpress-mobile:react-native-get-random-values:1.4.0
+| | \--- com.facebook.react:react-native:0.66.2 (*)
+| +--- org.wordpress-mobile:react-native-masked-view:0.2.6
+| | \--- com.facebook.react:react-native:0.66.2 (*)
+| +--- org.wordpress-mobile:react-native-screens:2.9.0
+| | +--- com.facebook.react:react-native:0.66.2 (*)
+| | +--- androidx.appcompat:appcompat:1.1.0 -> 1.3.1 (*)
+| | +--- androidx.fragment:fragment:1.2.1 -> 1.4.1 (*)
+| | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
+| | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
+| | \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
+| +--- org.wordpress-mobile:react-native-safe-area-context:3.2.0
+| | \--- com.facebook.react:react-native:0.66.2 (*)
+| +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-3
+| +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-2
+| | +--- com.facebook.react:react-native:0.66.2 (*)
+| | \--- androidx.appcompat:appcompat:1.0.0 -> 1.3.1 (*)
+| +--- org.wordpress-mobile:react-native-webview:11.6.2
+| | +--- com.facebook.react:react-native:0.66.2 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.10 (*)
+| +--- org.wordpress-mobile:react-native-clipboard:1.9.0
+| | \--- com.facebook.react:react-native:0.66.2 (*)
+| +--- org.wordpress-mobile:react-native-fast-image:8.5.11
+| | +--- com.facebook.react:react-native:0.66.2 (*)
+| | +--- com.github.bumptech.glide:glide:4.12.0 (*)
+| | \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
+| | +--- com.github.bumptech.glide:glide:4.12.0 (*)
+| | +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.9.2 (*)
+| | \--- androidx.annotation:annotation:1.0.0 -> 1.2.0
+| +--- com.github.wordpress-mobile:react-native-gesture-handler:2.3.2-wp-1
+| | +--- com.facebook.react:react-native:0.66.2 (*)
+| | +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1 -> 2.4.1-wp-3
+| | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
+| | +--- androidx.core:core-ktx:1.6.0 -> 1.7.0 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.10 (*)
+| +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.80.0-alpha3
+| | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
+| | +--- androidx.gridlayout:gridlayout:1.0.0 (*)
+| | +--- androidx.cardview:cardview:1.0.0 (*)
+| | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
+| | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
+| | +--- com.facebook.react:react-native:0.66.2 (*)
+| | +--- org.wordpress:aztec:v1.6.0 (*)
+| | +--- org.wordpress.aztec:wordpress-shortcodes:v1.6.0 (*)
+| | +--- org.wordpress.aztec:wordpress-comments:v1.6.0 (*)
+| | +--- org.wordpress.aztec:glide-loader:v1.6.0
+| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+| | | +--- org.wordpress:aztec:v1.6.0 (*)
+| | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.12.0 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.10 (*)
+| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.10 (*)
+| \--- org.wordpress-mobile:hermes-release-mirror:0.66.2
\--- org.wordpress:login:0.15.0
- \--- org.wordpress:fluxc:trunk-1436f46fc296ede0e65e117bbfced38fa34cec6d -> 1.47.0 (*)
+ \--- org.wordpress:fluxc:trunk-1436f46fc296ede0e65e117bbfced38fa34cec6d -> trunk-11dadf65d5e3e383f0fd169f8b88600ff91953ec (*)
Please review and act accordingly
|
Related PRs:
Gutenberg Mobile PR-> Gallery block improvements gutenberg-mobile#5007Gutenberg PR-> [Mobile] - Gallery block - Add useGetMedia native variant WordPress/gutenberg#42178WordPress FluxC PR-> Add Large and Medium Urls from images WordPress-FluxC-Android#2456WordPress Utils PR-> MediaFile - Add large and medium URLs WordPress-Utils-Android#108This PR adds support for the
largeandmediumsizes for images, this data is already available from both the REST API and XMLRPC but it is only stored for self-hosted sites, this PR includes REST API WPCOM sites as well. Having these images allows using a lower size within the editor which improves the performance once images are uploaded.Now once an image is uploaded from the editor, it will use the
largesize if available, if not it will fall back to themediumsize and if none are available it will use thefullsize. This change is done to the Gutenberg processors for the Image and Gallery block.A new
getOptimalFileURLmethod was added inMediaFileto get the final URL. Due to this, some changes to the test mocks were needed, kudos to @mkevins for the help with that.For test instructions and screencast please check the Gutenberg PR description.
Regression Notes
It should only affect the Gutenberg editor media uploads.
Manual testing:
None, we do manual testing with media uploads from the editor.
PR submission checklist:
RELEASE-NOTES.txtif necessary.